This is a Next.js project bootstrapped with create-next-app
.
First, install the dependencies
npm install
Then create a .env.local
file with the following environment variables
LOCAL_URL=Your Local mongoDB URL
MONGO_URL=Production mongoDB URL
NEXTAUTH_URL=http://localhost:3000/ | YOUR APP STARTING POINT URL
NEXTAUTH_SECRET=Secret to hash your tokens
Before running the app, ensure your local mongodb server is running or skip this part if you're using an online database
# In your command-line, go to where your mongodb bin is installed by running the following command (Tweak in accordance with your mongodb installation folder)
cd ../../mongodb/bin
# Then start the mongodb server by running the following command
net start mongodb
Then, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
This project uses next/font
to automatically optimize and load Inter, a custom Google Font.
The app has 3 types of users, namely :
Upon creating an account (by signing up), the default role assigned to the newly created account is that of a client.
The 3 users have the following permissions:
I. Doctor
A doctor has full admin rights to CREATE, EDIT, DELETE a user account, and can assign any role to that account i.e, the doctor can assign that newly created account the role of a doctor, nurse or client.
A doctor also has full admin rights to ADD, EDIT and REMOVE employees
II. Nurses
III. Client
Once you fork this repo, signup atleast one account and then go to your database and change the role of that account to "doctor" and that's it, you have full admin rights.
To learn more about Next.js, take a look at the following resources:
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.