Skip to content

Amrita Canteen Management is a proposed idea for implementation in our campus

Notifications You must be signed in to change notification settings

solvedbiscuit71/acm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backend

Prerequisites

Python Environment

Setup a new python virtual environment

cd api
pip3 -m venv .venv

And activate the virutal environment

For MacOs

source .venv/bin/activate.fish

For Windows

env/Scripts/Activate.ps1 

Then, install the dependencies using

pip3 install -r requirement.txt

NOTE: VSCode can identify requirement.txt as pip file and prompt to create a virtual enviroment

CLI

To load menu data into the database, run

python3 script.py --menu

To load waiter's credentials into the database, run

python3 script.py --waiter

To initiate the sequence generator for orders, run

python3 script.py --order

To generate a bcrpyt salt, run

python3 script.py --salt

Or, to run all the above command

python3 script.py --all

Environment variables

ALGORITHM=HS256
ORIGINS=<list-of-origins>
SALT=<salt-for-hashing>
SECRET=<jwt-secret>
WAITER_SECRET=<jwt-secret-for-waiter>
SEQ_START=<integer>
WAITER_PASSWORD=<password-for-waiter>
CLOSE_TIME=<isoformat-time HH:MM:SS>

Run

# Inside your api directory run the following command
uvicorn main:app

# for development, use --reload
uvicorn main:app --reload

This runs the server at localhost:8000 and API documentation can be found at localhost:8000/docs

Frontend

Prerequisites

  • Nodejs
  • NPM

Run the following command to install the node packages,

cd frontent
npm install

Run

# for development purpose
npm run dev

# for production purpose
npm run build
npm run preview

This runs the frontend server at localhost:8080 for both development and production

About

Amrita Canteen Management is a proposed idea for implementation in our campus

Topics

Resources

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •