This project is a Node.js web application for a gym chain, providing features like membership management, class scheduling, and user account handling. The app uses SQLite as the database, with asynchronous SQLite queries for efficient data handling.
https://gymlab.onrender.com/home
- User authentication and account management
- Membership purchase and management
- Class scheduling and booking
- Gym location and services information
- Contact form for inquiries
- Backend: Node.js, Express.js
- Database: SQLite, async-sqlite
- Frontend: HTML, CSS, JavaScript
- Templating Engine: Handlebars.js
Before you begin, ensure you have the following installed:
- Node.js (v14.x or later)
- npm (v6.x or later)
-
Clone the repository:
git clone https://github.com/Zevgoula/GymWebsite.git
-
Create a .env file in the root of your project with the following content:
MODEL=sqlite-async LOGIN_CONTROLLER=login-controller-password SESSION_SECRET= aBigString SESSION_NAME=gymChain-session SESSION_LIFETIME=1000 * 60 * 60 * 2 PORT=9999
-
Install all necessary dependencies
npm install
-
Run in local server
npm run watch
Contains route handling logic.
Contains database models and queries using async-sqlite.
Contains Handlebars templates for rendering HTML.
Contains static assets (CSS, JS, images).
Contains route definitions.
- User: Stores user account information.
- Membership: Stores membership details.
- Class: Stores gym class information.
- Session: Stores class session details (the weekly schedule for each gym)
- Books: Stores class booking information.
- Belongs Stores customers' home gym
- Customer Stores customers' details
- Gym Stores gym details
- Includes Stores which class each membership includes
- Message Stores messages sent by visitors and users
- Represents Stores which class each session represents