Add self-hosted auth, admin API, and owner web dashboard
- Replace Clerk with self-hosted JWT auth (register/login/verify, bcrypt passwords, Gmail OTP with console fallback) - Add lib/db.ts pg pool + transaction helpers; seed script migrates legacy Clerk-era schema (drop clerk_id, enforce UUID ids and unique email) - Add owner-gated admin API: stats, users, drivers CRUD, rides - Add dashboard/ Vite React owner dashboard (login, overview, users, fleet, rides) with dev-server proxy to avoid Expo CORS middleware - Add scripts/set-owner.mjs for role management
This commit is contained in:
Vendored
+18
-3
@@ -4,12 +4,27 @@ export {};
|
||||
declare global {
|
||||
namespace NodeJS {
|
||||
interface ProcessEnv {
|
||||
// clerk publishable key
|
||||
EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY: string;
|
||||
// self-hosted auth
|
||||
AUTH_JWT_SECRET: string;
|
||||
GOOGLE_OAUTH_CLIENT_ID: string;
|
||||
|
||||
// postgres db url (neon db)
|
||||
// postgres db url (self-hosted)
|
||||
DATABASE_URL: string;
|
||||
|
||||
// expo api server url
|
||||
EXPO_PUBLIC_SERVER_URL: string;
|
||||
|
||||
// google oauth client ids
|
||||
EXPO_PUBLIC_GOOGLE_AUTH_WEB_CLIENT_ID: string;
|
||||
EXPO_PUBLIC_GOOGLE_AUTH_IOS_CLIENT_ID: string;
|
||||
EXPO_PUBLIC_GOOGLE_AUTH_ANDROID_CLIENT_ID: string;
|
||||
|
||||
// gmail api
|
||||
GMAIL_CLIENT_ID: string;
|
||||
GMAIL_CLIENT_SECRET: string;
|
||||
GMAIL_REFRESH_TOKEN: string;
|
||||
GMAIL_FROM: string;
|
||||
|
||||
// geoapify api key
|
||||
EXPO_PUBLIC_GEOAPIFY_API_KEY: string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user