Next.js 16 + Mongoose app for running social 30-day pushup challenges.
- Username/password authentication
- Server-side session management with secure httpOnly cookies
- Circle creation with slug and invite token
- Invite sharing via URL and QR code
- Public join flow at /c/[slug]?t=token
- Daily rep logging and leaderboard totals
- Evidence links attached to daily entries
Copy .env.example to .env.local and set:
- MONGODB_URI
- MONGODB_DB_NAME
- NEXT_PUBLIC_BASE_URL
npm install
npm run devOpen http://localhost:3000.
Mongoose models are in lib/models:
- User
- Session
- Circle
- Membership
- DailyEntry
- Evidence
- POST /api/auth/register
- POST /api/auth/login
- POST /api/auth/logout
- GET /api/me
- GET /api/circles
- POST /api/circles
- GET /api/circles/[slug]
- POST /api/circles/[slug]/join
- POST /api/circles/[slug]/entries
- GET /api/circles/[slug]/stats
- POST /api/daily-entries/[entryId]/evidence