A RESTful API server for managing fitness tracking data, built with Node.js and Fastify.
- User authentication and registration
- Workout and exercise tracking
- Progress monitoring and analytics
- Secure REST API endpoints
- Node.js (v14+)
- npm or yarn
git clone https://github.com/egorka13/fitness-app-server.git
cd fitness-app-server
npm installCreate a .env file in the root directory and set the following variables:
PORT=8000
NODE_ENV=development
ALLOWED_ORIGINS=http://localhost:3000
DATABASE_URL=...
SUPABASE_JWT=...
npm startThe server will run on http://localhost:8000.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/exercises | List all exercises |
| GET | /api/exercises/:id | Get exercise by ID |
| POST | /api/exercises | Create a new exercise |
| GET | /api/exercises/:id/history | List all sets for a specific exercise |
| POST | /api/exercises/:id/history | Create a new set for a specific exercise |
/src
/controllers
/db
/models
/repositories
/routes
/services