Skip to content

jschhie/Sunright-Cafe-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

125 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sunright Cafe | Full-Stack Ordering System 🧋


Tech Stack

Component Tech Used
Backend Python, Flask
Data SQLite, SQL, JSON
Frontend Logic JavaScript, Jinja Templating
UI/Styling Bootstrap
Deployment PythonAnywhere

Overview

  • Full-stack Flask cafe ordering system
  • Customizable drink options, search filters, and business hours restrictions
  • Admin dashboard for managing the cafe database

🔖 Table of Contents


Website Demo

Cafe Menu

Customize Drink

Required: sweetness, ice level, and milk type

Optional: toppings

Cart

Receipt

Admin Dashboard

Admin access to CRUD dashboard to manage Drinks, Toppings, MilkTypes, Orders, and CustomDrinks


Running the Site Manually

1. Clone this repository:

git clone https://github.com/jschhie/Sunright-Cafe-App.git [folderNameHere]

2. Navigate into the folder:

cd [folderNameHere]

3. Create and activate virtual environment (venv):

To isolate the project's dependencies

python3 -m venv venv
source venv/bin/activate

4. Install the required packages:

pip3 install -r requirements.txt

5. Configure environment variables

5a. Create a .env file in the root directory:

vim .env

5b. Open the .env file and define the following:

FLASK_SECRET_KEY=random_secret_key_here
FLASK_ADMIN_USERNAME=secret_admin_username_here
FLASK_ADMIN_PASSWORD=secret_admin_password_here

6. Run the Flask app:

python3 main.py

The application will automatically generate a cafe_database.db database in the website directory.

Access the website at: http://127.0.0.1:5000/ via any browser.

Admin users can access the CRUD dashboard at: http://127.0.0.1:5000/admin/home after configuring credentials (username & password) in the __init__.py. See "Step 5" in above section.