Skip to content

This project is a Gym Management System designed to provide essential functionalities for gym users and administrators.

Notifications You must be signed in to change notification settings

felipesscreator/fastify-gym-solid

Repository files navigation

Fastify Gym SOLID

TypeScript NodeJS Fastify Vite Prisma ESLint

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.

Functional

  1. User Management:
  • Users can register an account.
  • Users can authenticate using their credentials.
  • Users can retrieve their profiles.
  1. 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.
  1. 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.
  1. Admin Operations:
  • Admins can register a new gym.
  • Admins can validate user check-ins.
  • Admins can register with a unique email.

Getting Started

Ensure you have the following tools installed:

Node.js PostgreSQL

  1. Clone the repositor:
git clone https://github.com/Feelpe/fastify-gym-solid
  1. Enter the project directory:
cd fastify-gym-solid
  1. Install dependencies:
npm install
  1. 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

  1. Run database migrations:
npx prisma migrate dev
  1. Start the application:
npm run dev

The application will be available at http://localhost:3000.

About

This project is a Gym Management System designed to provide essential functionalities for gym users and administrators.

Topics

Resources

Stars

Watchers

Forks