Skip to content

Repository files navigation

🛒 Online Sales Platform – Databases Project

📌 Overview

The system was built with a strong focus on transactional integrity, concurrency control, and security, using PostgreSQL and Python (Flask). It includes mechanisms such as:

  • ACID-compliant transactions
  • Row-level locking (SELECT FOR UPDATE)
  • Isolation levels (REPEATABLE READ)
  • Trigger-based notifications
  • Versioning of product data

⚙️ Technologies Used

  • Python (Flask, psycopg2, JWT)
  • PostgreSQL
  • Docker & Docker Compose
  • pgAdmin (for DB management)
  • Postman (for API testing)

📚 Project Structure

├── python/               # Python API source code
├── db/                   # PostgreSQL script
├── er/                   # Conceptual and physical database models (ER diagrams)
├── postman/              # Postman collection for API testing
├── report_PT/            # Report delivered

🚀 How to Run the Project

1. Prerequisites

Make sure you have the following installed:

  • Docker Desktop
  • Postman
  • pgAdmin

2. Setup Instructions

  1. Configure the database:

    • Create a PostgreSQL database.
    • Update the Python source files with your DB credentials.
  2. Edit Docker Compose:

    • Modify docker-compose-python-psql.yml with your DB settings.
  3. Start the architecture:

    sh docker-compose-python-psql.sh
  4. Import Postman collection:

    • Open Postman and import the collection from the postman/ folder.
  5. Monitor operations:

    • Use pgAdmin to inspect database activity and validate transactions.

🧠 Development Highlights

  • Product versioning
  • Unified Q&A table with boolean flag
  • Concurrency control with locks and isolation levels
  • JWT-based authentication
  • Trigger-based notifications

About

A simplified Online Sales Platform developed for the Databases course. It features user authentication, product management, order processing, feedback, and statistics — all built with Python, Flask, and PostgreSQL, following REST API architecture and ACID principles.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages