Welcome to C-Fitness! This application is designed to help you maintain an active and healthy lifestyle. With it, you can create an account, search for exercises, create custom routines, save your routines, and organize your workouts in a calendar for better control and tracking.
This is a web application developed with React using Next.js on the front-end. Users can:
-
Create an account and log in.
-
Search for exercises and create custom routines.
-
Save routines in their profile.
-
Add routines to a calendar to plan workouts.
-
Modify or delete routines as needed.
The back-end of the application was developed with NestJS and uses PostgreSQL as the database. The API is documented with Swagger for easier use and understanding. Authentication is handled using JWT (JSON Web Tokens).
🔗 Backend Repository: Fitness-Backend
|
|
|
|
|
Follow these steps to install and run the project on your local machine:
-
Clone the repository:
git clone https://github.com/jhosbel/FitnessWebApp.git cd FitnessWebApp -
Install front-end dependencies:
npm install
-
Set up environment variables:
Create a .env file inside the frontend folder and add the following variables: NEXT_PUBLIC_BACKEND_URL=http://localhost:7000/api NEXTAUTH_SECRET=no_hacer_publica_esta_variable
-
Start the front-end server:
npm run dev
-
Open your browser and visit:
http://localhost:3000
-
Access the API documentation:
http://localhost:7000/docs
Environment Variables
Make sure to configure the following environment variables in the .env file:
-
NEXT_PUBLIC_BACKEND_URL: Backend URL for HTTP requests. -
NEXTAUTH_SECRET: Secret key for JWT authentication. Do not share it publicly.
Dependencies
This application uses the following main dependencies:
-
Next.js: React framework for server-side rendering and static site generation.
-
Tailwind CSS: CSS framework for styling the application.
-
JWT (JSON Web Tokens): For user authentication.
-
Sign Up: Go to
/registerto create a new account. -
Login: Go to
/loginto log in. -
Search Exercises: Once authenticated, search for exercises on the home page.
-
Create Routines: Select exercises and create custom routines.
-
Save Routines: Store your routines in your personal profile.
-
Training Calendar: Add routines to a calendar to plan your workouts.
-
Modify Routines: Edit or delete routines as needed.
Front-End:
-
React: JavaScript library for building user interfaces.
-
Next.js: React framework for server-side rendering.
-
Tailwind CSS: CSS framework for styling the application.
Authentication:
- JWT (JSON Web Tokens): For user authentication.
/FitnessWebApp
├── public
├── src
│ ├── app
│ │ ├── api
│ │ │ ├── auth
│ │ ├── dashboard
│ │ ├── feeding
│ │ ├── login
│ │ ├── profile
│ │ ├── register
│ │ ├── settings
│ │ ├── training
│ │ ├── ui
│ │ ├── globals.css
│ │ ├── layout.tsx
│ │ ├── page.tsx
│ ├── components
│ │ ├── icons
│ │ ├── Navigation.jsx
│ │ ├── CalendarData.jsx
│ │ ├── UsersData.jsx
│ │ └── ...
│ ├── context
│ ├── interfaces
│ ├── types
│ ├── middleware.ts
├── .env
├── package.json
└── README.md
This project is licensed under the MIT License. See the LICENSE file for more details.




