{"id":28069590,"url":"https://github.com/tukue/fitness-tracker-api","last_synced_at":"2026-05-16T00:39:05.156Z","repository":{"id":292855554,"uuid":"981719236","full_name":"tukue/fitness-tracker-api","owner":"tukue","description":"The Fitness Tracker API is a RESTful API designed to help users manage their fitness activities. It supports user authentication, exercise management, workout planning, scheduling, and progress tracking. Built with Node.js, TypeScript, Express, and PostgreSQL, it leverages Prisma ORM for database operations and provides comprehensive API documentat","archived":false,"fork":false,"pushed_at":"2025-05-12T14:15:00.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-12T14:43:50.281Z","etag":null,"topics":["api-development","database-postgresql","front-end-development","mvc-architecture","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tukue.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-11T18:32:42.000Z","updated_at":"2025-05-12T14:15:03.000Z","dependencies_parsed_at":"2025-05-12T14:43:52.850Z","dependency_job_id":"564d4d6e-d122-4af6-910c-252bd8b782af","html_url":"https://github.com/tukue/fitness-tracker-api","commit_stats":null,"previous_names":["tukue/fitness-tracker-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tukue%2Ffitness-tracker-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tukue%2Ffitness-tracker-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tukue%2Ffitness-tracker-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tukue%2Ffitness-tracker-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tukue","download_url":"https://codeload.github.com/tukue/fitness-tracker-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253805860,"owners_count":21967053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-development","database-postgresql","front-end-development","mvc-architecture","nodejs","typescript"],"created_at":"2025-05-12T19:10:30.819Z","updated_at":"2025-10-26T19:20:53.600Z","avatar_url":"https://github.com/tukue.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Workout Tracker API\n\nA RESTful API for a workout tracker application that allows users to sign up, log in, create workout plans, and track their progress.\n\n## Features\n\n- User authentication with JWT\n- Exercise management\n- Workout plan creation and management\n- Workout scheduling\n- Workout completion tracking\n- Progress reporting\n\n## Tech Stack\n\n- Node.js with Express\n- TypeScript\n- PostgreSQL database\n- Prisma ORM\n- JWT for authentication\n- Jest for testing\n\n## Prerequisites\n\n- Node.js (v20 or higher)\n- PostgreSQL database\n\n## Getting Started\n\n1. Clone the repository\n2. Install dependencies:\n   ```\n   npm install\n   ```\n3. Configure environment variables:\n   - Copy `.env.example` to `.env` (if not already done)\n   - Update the `DATABASE_URL` with your PostgreSQL connection string\n   - Set a secure `JWT_SECRET`\n\n4. Run the setup script to initialize the database and start the server:\n   ```\n   node setup-and-run.js\n   ```\n\n   This script will:\n   - Create database migrations\n   - Seed the database with exercise data\n   - Build the TypeScript code\n   - Start the server\n\n## API Endpoints\n\n### Authentication\n\n- `POST /api/auth/register` - Register a new user\n- `POST /api/auth/login` - Login a user\n\n### Exercises\n\n- `GET /api/exercises` - Get all exercises\n- `GET /api/exercises/:id` - Get exercise by ID\n- `GET /api/exercises/categories` - Get all exercise categories\n- `GET /api/exercises/muscle-groups` - Get all muscle groups\n\n### Workout Plans\n\n- `POST /api/workouts` - Create a new workout plan\n- `GET /api/workouts` - Get all workout plans for the authenticated user\n- `GET /api/workouts/:id` - Get workout plan by ID\n- `PUT /api/workouts/:id` - Update workout plan\n- `DELETE /api/workouts/:id` - Delete workout plan\n\n### Workout Scheduling\n\n- `POST /api/schedule` - Schedule a workout\n- `GET /api/schedule` - Get scheduled workouts\n- `POST /api/schedule/complete` - Mark a workout as completed\n- `GET /api/schedule/completed` - Get completed workouts\n\n### Reports\n\n- `GET /api/reports` - Generate workout reports\n\n## Testing\n\nRun tests with:\n\n```\nnpm test\n```\n\n### Database Connection Testing\n\nTest your database connection with:\n\n```\nnpm run test:db\n```\n\nThis will verify that your application can connect to the PostgreSQL database using the connection string in your `.env` file.\n\nIf you need to troubleshoot database connection issues:\n\n1. Check that your PostgreSQL server is running\n2. Verify the connection details in your `.env` file\n3. Ensure special characters in your password are properly URL-encoded\n4. Make sure the database exists (create it if needed)\n\n### Sample Data\n\nTo populate your database with sample data for testing:\n\n```\nnpm run seed:sample\n```\n\nThis will create sample users, workout plans, exercises, and workout records.\n\n## API Documentation\n\nAPI documentation is available using OpenAPI Specification. After starting the server, you can access the documentation at:\n\n```\nhttp://localhost:3000/api-docs\n```\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftukue%2Ffitness-tracker-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftukue%2Ffitness-tracker-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftukue%2Ffitness-tracker-api/lists"}