This project is a Gym Management System designed to provide essential functionalities for gym users and administrators. It covers a range of features, including user registration, authentication, profile retrieval, check-in history, searching for nearby gyms, checking in at gyms, and registering new gyms.
- User Management:
- Users can register an account.
- Users can authenticate using their credentials.
- Users can retrieve their profiles.
- Check-In:
- Users can check in at a gym.
- Users can validate their check-ins.
- Users can view their check-in history.
- Users cannot check in twice on the same day.
- Users must be within 100 meters of the gym to check-in.
- Gym Management:
- Users can search for gyms nearby (within 10km).
- Users can search for gyms by name.
- Users can view the number of check-ins at a gym.
- Admin Operations:
- Admins can register a new gym.
- Admins can validate user check-ins.
- Admins can register with a unique email.
Ensure you have the following tools installed:
Node.js PostgreSQL
- Clone the repositor:
git clone https://github.com/Feelpe/fastify-gym-solid
- Enter the project directory:
cd fastify-gym-solid
- Install dependencies:
npm install
- Create a .env file based on the provided .env.example and fill in the required credentials.
JWT_SECRET=any-secret
DATABASE_URL="database-url"
If you want to use Docker just run the following command
docker compose up
And use the URl already set on .env.example
- Run database migrations:
npx prisma migrate dev
- Start the application:
npm run dev
The application will be available at http://localhost:3000.