尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗Fitness class discovery and booking platform. Studios and private coaches post classes; users search, browse, and book.
| Role | Description |
|---|---|
USER | Searches and books classes, requests private sessions from coaches |
STUDIO | Studio or gym owner — posts group classes, manages profile |
COACH | Private coach — posts classes, receives and responds to session requests |
ADMIN | Platform administrator — manages all users and classes |
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router, Turbopack) |
| Language | TypeScript 5, React 19 |
| UI | Mantine v9 |
| Auth | NextAuth v4 (credentials provider, JWT) |
| ORM | Prisma v6 |
| Database | Supabase (PostgreSQL) |
| Monorepo | Turborepo + npm workspaces |
| Deployment | Vercel |
el-captain/
├── apps/
│ └── web/ # Next.js application
│ ├── app/
│ │ ├── (frontend)/ # UI pages
│ │ │ ├── page.tsx # Homepage / class search
│ │ │ ├── classes/[id]/ # Class detail + booking
│ │ │ ├── clients/[id]/ # Studio public profile
│ │ │ ├── coaches/[id]/ # Coach public profile
│ │ │ ├── auth/ # Login + register
│ │ │ └── dashboard/ # Role-specific dashboards
│ │ │ ├── admin/ # ADMIN overview
│ │ │ ├── bookings/ # USER bookings (upcoming/past)
│ │ │ ├── classes/ # STUDIO/COACH class management
│ │ │ ├── sessions/ # COACH session requests
│ │ │ └── profile/ # STUDIO/COACH profile edit
│ │ └── (backend)/
│ │ └── api/ # API routes
│ ├── components/ # Shared React components
│ ├── lib/ # prisma.ts, auth.ts
│ └── prisma/
│ ├── schema.prisma
│ └── migrations/
└── packages/
└── types/ # Shared TypeScript interfaces (ClassDTO, etc.)
Copy apps/web/.env.example to apps/web/.env and fill in:
# Supabase pooler URL (port 6543) — used at runtime
DATABASE_URL="postgresql://..."
# Supabase direct URL (port 5432) — used for migrations
DIRECT_URL="postgresql://..."
# Generate with: openssl rand -base64 32
NEXTAUTH_SECRET="..."
# next-auth takes its base URL from the request (always on Vercel), so no NEXTAUTH_URL is needed
AUTH_TRUST_HOST=true
# Base URL for links in emails
APP_URL="http://localhost:3000"
# Email via Resend. Leave empty locally: emails (with their links) print to the server console.
RESEND_API_KEY=""
MAIL_FROM="El Captain <[email protected]>"
npm install
cd apps/web && npm run dev
# Apply migrations (uses DIRECT_URL)
cd apps/web && npx prisma migrate dev
# Seed with sample data
cd apps/web && npm run db:seed
cd apps/web && npm run build:prodapps/web/.nextDATABASE_URL, DIRECT_URL, NEXTAUTH_SECRET, APP_URL, RESEND_API_KEY, MAIL_FROMbuild:prod runs prisma migrate deploy (applies migrations), prisma generate, then next build. vercel.json uses it, so every deploy migrates the database; it needs DIRECT_URL (migrations can't run through the pooler).
See docs/api.md for full endpoint documentation.
User ──< Booking >── Class
│ │
├── ClientProfile └── (posted by STUDIO or COACH user)
├── CoachProfile
└──< SessionRequest >── (to a COACH user)
Class is posted by a User with role STUDIO or COACHBooking links a USER to a Class (unique per user/class)SessionRequest links a USER to a COACH (message-based, not time-specific)