Skip to content

databases-CSCI3354/project1-online-commerce

Repository files navigation

Online Commerce

Install Poetry

Please follow the official installation guide to install Poetry.

Install dependencies

It is recommended to use Python virtual environment, so you don't pollute your system Python environment.

# Install dependencies
poetry install

Mac/Linux

# Activate Python virtual environment
eval "$(poetry env activate)"

Windows/Powershell

# Activate Python Virtual Environment
& .venv\Scripts\Activate.ps1

Add dependencies

If you want to add a new dependency, please use poetry add command.

For example, to add python-dotenv dependency, run:

poetry add python-dotenv

Set up environment variables

# Create .env file (by copying from .env.example)
cp .env.example .env

Style Enforcement

make lint # Run in the root of the directory

Commands

# Quick Start at root directory
flask run

# To verify that the app is running, go to the /status endpoint

Folder Structure

├── app/
│   ├── models/ # Data models used across the application
│   ├── routes/ # Routes handle the HTTP requests and render the appropriate templates (no business logic)
│   ├── services/ # Services handle the business logic of the application
│   ├── static/ # Static files like CSS
│   ├── templates/ # Jinja templates
│   ├── utils/ # Utility functions that are used across the entire application
│   ├── northwind.db # Built database file
│   └── run.py # Main executuable file
└── tests/ # Tests for each file are labelled with the file name

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •