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
+12 -1
View File
@@ -10,10 +10,20 @@ const FindRide = () => {
const {
userAddress,
destinationAddress,
userLatitude,
userLongitude,
destinationLatitude,
destinationLongitude,
setDestinationLocation,
setUserLocation,
} = useLocationStore();
const canFind =
!!userLatitude &&
!!userLongitude &&
!!destinationLatitude &&
!!destinationLongitude;
return (
<RideLayout title="Ride" snapPoints={["85%"]}>
<View className="my-3">
@@ -43,7 +53,8 @@ const FindRide = () => {
<CustomButton
title="Find now"
onPress={() => router.push("/(root)/confirm-ride")}
className="mt-5"
disabled={!canFind}
className={`mt-5 ${!canFind ? "opacity-50" : ""}`}
/>
</RideLayout>
);