fitzone.1.mp4
FitZone Gym is a comprehensive web platform designed for fitness enthusiasts and gym management. It provides a seamless user experience for browsing membership programs, secure user authentication, and community engagement features.
The platform features a fully responsive landing page with interactive components:
- Dynamic Hero Section: A prominent call-to-action with subscription popup functionality.
- Intuitive Navigation: Smooth transitions between Home, About, Programmes, and Contact sections.
- Unified Authentication Flow: Dedicated Login and Sign-Up pages with consistent design.
- Subscription Management: Interactive modal for lead capture from the landing page.
- Program Showcase: Detailed cards highlighting equipment, trainers, and community aspects.
- Contact System: Interactive form for user inquiries to gym management.
- Secure Authentication:
- Professional login interface with error handling.
- Multi-field registration with password confirmation.
- User Dashboard: Protected routes for authenticated users to manage profiles.
- Responsive Design: Optimized for all device types.
- Frontend: React, React Router DOM, Axios
- Backend: Node.js, Express.js
- Database: MongoDB with Mongoose ODM
- Authentication: JWT (JSON Web Tokens), bcrypt for password hashing
- Styling: Custom CSS
- Additional Libraries: WebSockets (ws), Nodemailer for email services, Express Validator for input validation
- Node.js (v14 or higher)
- MongoDB (local installation or cloud service like MongoDB Atlas)
- npm or yarn package manager
-
Navigate to the backend directory:
cd sport/backend/src -
Install dependencies:
npm install
-
Create a
.envfile in thesport/backend/srcdirectory with the following environment variables:PORT=8080 MONGODB_URI=mongodb://localhost:27017/fitzone JWT_SECRET=your_super_secret_jwt_key_here EMAIL_USER=your_email@example.com EMAIL_PASS=your_email_password -
Start the backend server in development mode:
npm run dev
-
Navigate to the frontend directory:
cd sport -
Install dependencies:
npm install
-
Start the React development server:
npm start
The application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8080
POST /api/auth/register- User registrationPOST /api/auth/login- User loginGET /api/auth/verify- Token verification
GET /api/user/profile- Get user profilePUT /api/user/profile- Update user profile
GET /api/programs- Get all programsGET /api/programs/:id- Get specific program
POST /api/contact- Send contact message
- Home Page: Explore gym offerings and subscribe via popup.
- Registration/Login: Create account or sign in for personalized features.
- Dashboard: Manage profile (authentication required).
- Programmes: Browse available fitness programs.
- Contact: Send inquiries via contact form.
- About: Learn about FitZone's mission and hours.
sport/
├── backend/
│ └── src/
│ ├── config/
│ │ └── db.js
│ ├── controllers/
│ │ ├── authController.js
│ │ ├── contactController.js
│ │ ├── programController.js
│ │ └── userController.js
│ ├── middleware/
│ │ ├── authMiddleware.js
│ │ └── optionalAuth.js
│ ├── models/
│ │ ├── Contact.js
│ │ ├── programModel.js
│ │ └── User.js
│ ├── routes/
│ │ ├── authRoutes.js
│ │ ├── contactRoutes.js
│ │ ├── programRoutes.js
│ │ └── userRoutes.js
│ ├── services/
│ │ ├── contactService.js
│ │ └── userService.js
│ ├── utils/
│ │ ├── app.js
│ │ └── tokenUtils.js
│ ├── server.js
│ └── package.json
├── src/
│ ├── Components/
│ │ ├── contactForm/
│ │ │ ├── LoginForm.js
│ │ │ └── form-validation.js
│ │ ├── Footer.js
│ │ ├── Navbar.js
│ │ ├── profile.js
│ │ ├── ProtectedRoute.js
│ │ ├── Register.css
│ │ ├── Signup.js
│ │ └── WebsocnetComponent.js
│ ├── context/
│ │ └── UserContext.js
│ ├── Logo/
│ │ └── logo.jpg
│ ├── Pages/
│ │ ├── About.js
│ │ ├── Contact.js
│ │ ├── ContactPage.js
│ │ ├── Dashboard.js
│ │ ├── Home.js
│ │ ├── MainPage.js
│ │ ├── NotFound.js
│ │ ├── Programmes.js
│ │ ├── Register.js
│ │ └── subscription.js
│ ├── APIs/
│ │ └── db.json
│ ├── App.js
│ ├── App.test.js
│ ├── ErrorBoundary.js
│ ├── index.css
│ ├── index.js
│ ├── logo.svg
│ ├── reportWebVitals.js
│ ├── setupTests.js
│ └── validateResponse.js
├── public/
│ ├── favicon.ico
│ ├── index.html
│ ├── manifest.json
│ └── robots.txt
├── package.json
└── README.md
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or support, please contact us through the contact form on the website or reach out to the development team.
nd the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Note: this is a one-way operation. Once you eject, you can't go back!
If you aren't satisfied with the build tool and configuration choices, you can eject at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
You don't have to ever use eject. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.