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:
Krikorios
2026-08-23 16:38:41 +03:00
parent fbe92c9d16
commit a0b297285a
75 changed files with 5158 additions and 2837 deletions
+3 -4
View File
@@ -28,10 +28,8 @@
"uber-clone",
"uber",
"expo-router",
"clerk",
"postgresql",
"alert",
"neon-postgres",
"zustand",
"mysql",
"google-maps",
@@ -72,17 +70,16 @@
}
],
"dependencies": {
"@clerk/clerk-expo": "^2.2.5",
"@expo/metro-runtime": "~3.2.3",
"@expo/vector-icons": "^14.0.2",
"@gorhom/bottom-sheet": "^4.6.4",
"@neondatabase/serverless": "^0.9.4",
"@react-navigation/native": "^6.0.2",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"expo": "~51.0.28",
"expo-auth-session": "~5.5.2",
"expo-constants": "~16.0.2",
"expo-crypto": "^57.0.1",
"expo-font": "~12.0.9",
"expo-linking": "^6.3.1",
"expo-location": "^17.0.1",
@@ -93,6 +90,7 @@
"expo-system-ui": "~3.0.7",
"expo-web-browser": "~13.0.3",
"nativewind": "^2.0.11",
"pg": "^8.23.0",
"prettier": "^3.3.3",
"react": "18.2.0",
"react-dom": "18.2.0",
@@ -111,6 +109,7 @@
"devDependencies": {
"@babel/core": "^7.20.0",
"@types/jest": "^29.5.12",
"@types/pg": "^8.23.1",
"@types/react": "~18.2.45",
"@types/react-test-renderer": "^18.0.7",
"eslint": "^8.57.0",