AlexHerbertGit/Python-FastAPI
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
# Kobra Kai FastAPI Prototype This is a lightweight prototype built with **Python / FastAPI** to demonstrate the core functionality of the Kobra Kai charity website. The prototype implements user registration and login with JWT authentication, role-based access (beneficiary vs member), meal listings, order placement, and token transactions. A minimal HTML/JS frontend client is included for testing the API. --- ## 🚀 Features - Register and login as **beneficiary** (receives 10 tokens) or **member**. - JWT-based authentication and role-based access control. - Members can **create meals** with title, description, dietary tags, portions, delivery days, and token cost. - Beneficiaries can **order meals**, with tokens deducted automatically. - Members can **deliver or cancel orders**; cancelled orders refund tokens. - Simple HTML/JS frontend for manual testing in addition to Swagger UI. --- ## 🛠️ Installation & Setup ### 1. Clone the repo ```bash git clone https://github.com/<your-username>/<your-repo>.git cd <your-repo> python -m venv .venv # Activate (choose your shell): # Git Bash source .venv/Scripts/activate # PowerShell .\.venv\Scripts\Activate.ps1 # Command Prompt .\.venv\Scripts\activate.bat pip install --upgrade pip pip install -r requirements.txt python -m uvicorn app.main:app --reload The API will be available at: 👉 http://127.0.0.1:8000 Swagger UI: http://127.0.0.1:8000/docs cd client python -m http.server 5500 Go to 👉 http://127.0.0.1:5500 in your browser.