A fitness-focused social networking platform connecting athletes with trainers and nutritionists.
FitHub bridges the gap between athletes and fitness professionals. Athletes can discover trainers and nutritionists, follow their public content, and register for a personalized private feed of coaching posts. Professionals can publish workout routines and nutrition plans, build a following, and track engagement — all within a single platform.
The system supports three distinct user roles — Athlete, Trainer, and Nutritionist — each with tailored functionality and access control.
Authentication & Roles
- Credential-based sign-up and sign-in with NextAuth.js
- Three user roles: Athlete, Trainer, Nutritionist
- JWT session management with route-level middleware protection
- Password hashing with bcrypt
Content & Posts
- Professionals create posts with title, content, and image upload
- Trainer posts include structured exercise details (exercise, sets, reps)
- Nutritionist posts include nutrition details (food, calories)
- Public / Private post visibility control
Feeds
- Public Feed — all public posts from trainers and nutritionists, searchable by title
- Private Feed — personalized feed for athletes from their registered professionals only
Social Engagement
- Like and unlike posts
- Comment on posts
- Professional popularity tracking via athlete likes
Discovery
- Search users by username across all roles
- Search public posts by title
Profiles
- Athletes: height, weight, body description, diet description, registered professionals
- Professionals: bio, post count, registered athlete count, engagement metrics
| Layer | Technology |
|---|---|
| Frontend | Next.js 15, React 19, TypeScript |
| UI | Material UI (MUI), Ant Design, Tailwind CSS, Emotion |
| Authentication | NextAuth.js (JWT, CredentialsProvider) |
| Backend | Next.js API Routes (REST) |
| Database | PostgreSQL via Neon (serverless) |
| ORM / Queries | Parameterized SQL with @neondatabase/serverless |
| File Upload | UploadThing |
| Package Manager | pnpm |
Collaborated with Moe Myint Mo San and Thet Myat Noe Thwin
Assumption University Thailand
Academic Use Only — Assumption University Thailand, 2024