JohnMwendwa / vet-management-system

This is an admin dashboard built for managing hospital/vet services
https://vet-management-system.vercel.app
140 stars 20 forks source link
admin-dashboard authentication

Project Screenshot

vet-management-system vercel app_dashboard (1)

Technologies Used Hammer and Wrench

This is a Next.js project bootstrapped with create-next-app.

Getting Started Parachute

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.

User Roles and permissions

The app has 3 types of users, namely :

  1. Doctors
  2. Nurses
  3. Clients

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

II. Nurses

III. Client

How to assign yourself Full Admin Rights

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.

Learn More Open Book

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!

Deploy on Vercel Rocket

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.