Health and Fitness club management system with user authentication, role-based authorization, and more.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
git clone 'https://github.com/Andrew-Ver/COMP3005-W24-Proj.git'
cd COMP3005-W24-Proj/frontend
npm install
npm run dev
If you get the jwt_session_error, you need to make a secret for nextauth:
create .env.local
in root directory
run openssl rand -base64 32
.env.local
should be: NEXTAUTH_SECRET=[the output of that command]
- Set up and run a database in PostgreSQL
- In
.env.local
, add the following lines:
DB_HOST=[your_database_host]
DB_PORT=[your_database_port]
DB_USER=[your_database_name]
DB_PASSWORD=[your_database_password]
DB_NAME=[your_database_name]
- Create tables using following queries:
CREATE TABLE users (
id SERIAL PRIMARY KEY,
username VARCHAR(255) UNIQUE NOT NULL,
password_hash VARCHAR(255) NOT NULL,
role VARCHAR(50) NOT NULL
);
- Next.js - Web Framework
- NextAuth.js - Authentication
- Mantine 7.6.2 - Components Library
placeholder