Skip to content

TechHubHQ/QuickByte

Repository files navigation

QuickByte

NOTE: This project is designed to run only in UNIX/LINUX environment

Project-Tree

QuickByte
├─ .github
│  └─ ISSUE_TEMPLATE
│     ├─ bug_report.md
│     ├─ custom.md
│     └─ feature_request.md
├─ .gitignore
├─ .replit
├─ app.py
├─ Backend
│  ├─ Build
│  │  ├─ QBbRebuildEngine.py
│  │  └─ __init__.py
│  ├─ Connections
│  │  ├─ QBcDBConnector.py
│  │  └─ __init__.py
│  ├─ Controllers
│  │  ├─ QBcrFormCreator.py
│  │  ├─ QBcrUserController.py
│  │  └─ __init__.py
│  ├─ Integration
│  │  ├─ Data
│  │  │  └─ FoodMenu.json
│  │  ├─ QBiLocationIDFetcher.py
│  │  ├─ QBiMenuFetcher.py
│  │  ├─ QBiRestaurantsFetcher.py
│  │  ├─ QBiStdAloneLocFetcher.py
│  │  └─ __init__.py
│  ├─ Logic
│  │  ├─ QBlOrderHandler.py
│  │  ├─ QBlOrderStatusEngine.py
│  │  ├─ QBlPaymentHandler.py
│  │  └─ __init__.py
│  ├─ Models
│  │  ├─ QBmAddressModel.py
│  │  ├─ QBmAdminModel.py
│  │  ├─ QBmLoadLocationID.py
│  │  ├─ QBmLoadMenu.py
│  │  ├─ QBmLoadRestaurantsByID.py
│  │  ├─ QBmNotificationModel.py
│  │  ├─ QBmOrder2ItemModel.py
│  │  ├─ QBmPaymentModel.py
│  │  ├─ QBmUserModel.py
│  │  └─ __init__.py
│  ├─ Services
│  │  ├─ Email
│  │  │  └─ WelcomeEmailTemplate.html
│  │  ├─ QBsLogStorageManager.py
│  │  ├─ QBsWelcomeAlertSender.py
│  │  └─ __init__.py
│  └─ __init__.py
├─ CODE_OF_CONDUCT.md
├─ Config
│  ├─ AppConfig.py
│  └─ __init__.py
├─ Docs
│  ├─ QuickByte.docx
│  ├─ QuickByteGuide.pdf
│  └─ test.txt
├─ Frontend
│  ├─ Static
│  │  ├─ js
│  │  │  ├─ CartRenderer.js
│  │  │  ├─ GetAddress.js
│  │  │  ├─ GetOrders.js
│  │  │  ├─ ImageGetter.js
│  │  │  ├─ MenuDetails.js
│  │  │  ├─ Navbar.js
│  │  │  ├─ OrderStatusTracker.js
│  │  │  ├─ OrderTracker.js
│  │  │  ├─ PaymentProcessor.js
│  │  │  ├─ ProfileSideBar.js
│  │  │  ├─ ProfileUploader.js
│  │  │  ├─ RestaurantGetter.js
│  │  │  ├─ StatesDropdownGetter.js
│  │  │  ├─ SupportDropDownGetter.js
│  │  │  ├─ Swiper.js
│  │  │  ├─ UserLogin.js
│  │  │  └─ UserSignUp.js
│  │  ├─ Json
│  │  │  ├─ Dist_States.json
│  │  │  └─ Support_Issues.json
│  │  └─ styles
│  │     ├─ AddressDetails.css
│  │     ├─ Associate.css
│  │     ├─ Cart.css
│  │     ├─ FAQ.css
│  │     ├─ Help_Center.css
│  │     ├─ Home.css
│  │     ├─ Landing.css
│  │     ├─ Login.css
│  │     ├─ Menu.css
│  │     ├─ MyAddress.css
│  │     ├─ MyOrders.css
│  │     ├─ OrderStatusTracker.css
│  │     ├─ OrderTracker.css
│  │     ├─ Payment.css
│  │     ├─ Profile.css
│  │     ├─ Restaurants.css
│  │     ├─ Settings.css
│  │     └─ SignUp.css
│  └─ Templates
│     ├─ AddressDetails.html
│     ├─ Associate.html
│     ├─ Cart.html
│     ├─ FAQ.html
│     ├─ Help_Center.html
│     ├─ Home.html
│     ├─ Landing.html
│     ├─ Login.html
│     ├─ Menu.html
│     ├─ MyAddress.html
│     ├─ MyOrders.html
│     ├─ OrderStatusTracker.html
│     ├─ OrderTracker.html
│     ├─ Payment.html
│     ├─ Profile.html
│     ├─ Restaurants.html
│     ├─ Settings.html
│     └─ SignUp.html
├─ LICENSE
├─ poetry.lock
├─ pyproject.toml
├─ README.md
├─ requirements.txt
├─ setup.py
└─ Tests
   ├─ FoodMenuApiTest.py
   ├─ OrderStatusTester.py
   └─ __init__.py

TECH-STACK

Backend

Linux Flask Python

DataBase

SQLite3

Frontend

HTML CSS JavaScript

PRE REQUISITES

1. Linux -- (VirtualMachine/WSL) 
2. Python -- (Installed in Linux)
3. other requirements/libraries will automatically be installed with setup script

SETUP

On App start-up run the below command to get the setup done for the APP automatically

python3 setup.py

# If asked sudo access 
sudo python3 setup.py

FETCH DATA

After running the setup, the app needs data to function. We need to fetch data from the API to DB to get the Restaurants and Menu details.

Go to Travel Advisor API

Get your API-KEY and store it in .env file -- path (QuickByte/Config/.env)

# Run below script to fetch location IDs

sudo python3 Backend/Integration/QBiStdAloneLocFetcher.py

This will fetch the location IDs from the Travel Advisor API and store it in the SQLite database.

# Run below script to fetch Restaurants for each location

sudo python3 Backend/Integration/QBiRestaurantsFetcher.py

This will fetch the restaurant details for each location ID from the Travel Advisor API and store it in the SQLite database.

#Run below script to fetch Menu details

sudo python3 Backend/Integration/QBiMenuFetcher.py

This will fetch the menu details for each restaurant ID from the static FoodMenu.json file

Run the APP Locally

-- Run the app with the below command

Run Prod Server

python3 app.py --PROD <CORE_DEV>

# If asked for admin access 
sudo python3 app.py  --PROD <CORE_DEV>

# after this check localhost:8080

Run Dev Server

python3 app.py --debug

# If asked for admin access
sudo python3 app.py --debug

# after this check localhost:5000

for running PROD server, you should be part of CORE_DEV team

Contribution

Pull this repository

# If SSH/GPG keys added to GitHub
git clone [email protected]:TechHubHQ/QuickByte.git

# Else
git clone https://github.com/TechHubHQ/QuickByte.git

Create two branches as below

git branch ACC_<USERNAME>-<BRANCH_NO_OF_USER>_<FEATURE/ISSUE_DESCRIPTION>
git branch <USERNAME>-<BRANCH_NO_OF_USER>_<FEATURE/ISSUE_DESCRIPTION>

# Example
git branch ACC_JOHN-DOE-1_Feature_Description
git branch JOHN-DOE-1_Feature_Description

push the two empty branches first

git checkout ACC_<USERNAME>-<BRANCH_NO_OF_USER>_<FEATURE/ISSUE_DESCRIPTION>
git push -u origin HEAD

git checkout <USERNAME>-<BRANCH_NO_OF_USER>_<FEATURE/ISSUE_DESCRIPTION>
git push -u origin HEAD

make Changes

git checkout <USERNAME>-<BRANCH_NO_OF_USER>_<FEATURE/ISSUE_DESCRIPTION>

# make the code changes 

Add the code to Staging

git gui

# Add only the relevant code files as per branch description in which the code is changes to staging area in gui

Push the code to ACC_branch

# In git gui push the code into ACC_<USERNAME>-<BRANCH_NO_OF_USER>_<FEATURE/ISSUE_DESCRIPTION>

# not onto master branch

Create PR

# In GitHub create pull request with mentioning anyone of our team member for code review

ISSUES/BUGS

Please check out .github/ISSUE_TEMPLATE/bug_report.md or custom.md for submitting an issue

Feature Request

Please check out .github/ISSUE_TEMPLATE/feature_request.md for submitting as feature request

Sample .env file

# APIs

## LOCATIONS
LOC_API = "https://travel-advisor.p.rapidapi.com/locations/search"
LOC_API_KEY = "your-travel-advisor-api-key"
LOC_API_HOST = "travel-advisor.p.rapidapi.com"

## RESTAURANTS
REST_API = "https://travel-advisor.p.rapidapi.com/restaurants/list"
REST_API_KEY = "your-travel-advisor-api-key"
REST_API_HOST = "travel-advisor.p.rapidapi.com"

# Logs
APP_LOG_DIR = 'define-your-logs-path'
INTEGRATION_LOG_DIR = 'define-your-logs-path'
LOGIC_LOG_DIR = 'define-your-logs-path'
SERVICES_LOG_DIR = 'define-your-logs-path'
BUILD_LOG_DIR = 'define-your-logs-path'
MODEL_LOG_DIR = 'define-your-logs-path'