This is a fullstack monorepo app setup with:
- Web: React + Next.js
- Mobile: React Native + Expo
- Backend: Express + Prisma + Clerk Auth
- DB: PostgreSQL via Docker
fullstack-app/
├── apps/
│ ├── web/ # React + Next.js
│ └── mobile/ # React Native + Expo
├── backend/ # Express + Prisma + Clerk Auth
│ ├── routes/, middleware/, utils/, swagger.js
├── prisma/ # Prisma schema & migrations
├── shared/ # Shared utilities & types
├── docker-compose.yml
├── .env, .env.example
├── package.json # Workspaces config
└── turbo.json # Turborepo config
To scaffold the web app, in app directory:
npx create-next-app
cd apps/web
npm install
npm run dev
(Call it 'web')
To scaffold the mobile app, in app directory:
npx create-expo-app
cd apps/mobile
npm install
npx expo start
(Call it 'mobile')
# 1. Ensure Docker is running
# 2. Start PostgreSQL
docker compose up -d
# 3. Apply Prisma schema
npx prisma migrate dev --schema=prisma/schema.prisma
# 4. (Optional) Generate Prisma client
npx prisma generate --schema=prisma/schema.prisma
# 5. Start backend API
cd backend
npm install
npm run dev
or
node index.js
Clerk handles authentication via their frontend SDKs:
- Frontend (web/mobile): Users log in using Clerk UI (email/password, magic link, social logins, etc.)
- Backend (Express): Authenticated requests include a JWT in headers:
Authorization: Bearer <JWT>
- The backend validates this token with Clerk’s SDK and makes the
userId
available viareq.userId
.
Login/logout is handled 100% on the frontend. Backend routes are secured using Clerk's token verification only.
Your .env
must include:
CLERK_SECRET_KEY=sk_test_...your_key_here
Once the backend is running, visit Swagger UI:
http://localhost:4000/api-docs
- Web: Vercel
- Backend: Railway, Fly.io, Supabase Edge Functions
- Mobile: Expo EAS Build → Play Store & App Store
- PRs welcome
- Follow Prettier/ESLint (to be added)
- Use descriptive commit messages
For issues, contact the repo maintainer.
Want to contribute a module or improve the docs? Go for it 🚀