/Quorix

A hyper-scalable, asynchronous event booking microservice, engineered with FastAPI and Celery for mission-critical performance and a reactive, event-driven architecture.

Primary LanguagePythonMIT LicenseMIT

Quorix

An event booking , waitlist, advanced analytics and notification microservice engineered product.

License Last Commit Open Issues Open PRs

Quorix is a robust and scalable microservice for managing event bookings, user notifications, and more. It's built with FastAPI, SQLAlchemy, and Celery to provide a high-performance, asynchronous, and reliable system.

โœจ Key Features

  • ๐Ÿš€ Fast & Asynchronous: Built on FastAPI and Starlette for high-performance, non-blocking I/O.
  • ๐ŸŽŸ๏ธ Event & Booking Management: Create, manage, and book events with ease.
  • ๐Ÿ”” Notification System: Keep users informed with email notifications for bookings, cancellations, and reminders.
  • ๐Ÿ‘ฅ User Authentication: Secure user authentication and authorization using JWT.
  • โณ Waitlist Functionality: Automatically manage waitlists for fully booked events.
  • ๐Ÿ“Š Analytics: (Optional) Endpoints for gathering insights on event and booking metrics.
  • โš™๏ธ Background Tasks: Offload tasks like sending emails to a Celery worker for a responsive API.
  • ๐Ÿ—„๏ธ Database Migrations: Use Alembic to manage database schema changes.

๐Ÿ› ๏ธ Tech Stack

๐Ÿ›๏ธ System Design

This repository includes a detailed system design document covering concurrency controls, database modeling, scalability patterns, API design, and optional features.

โžก๏ธ View the full System Design Document

๐Ÿš€ Getting Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/techySPHINX/Quorix.git
    cd evently
  2. Install dependencies using Poetry:

    poetry install
  3. Set up environment variables:

    Create a .env file in the root directory by copying the example file:

    cp .env.example .env

    Update the .env file with your database credentials, SendGrid API key, and other settings.

Running the Application

With Docker (Recommended)

This is the easiest way to get the application and its services (PostgreSQL, Redis) up and running.

  1. Build and start the containers:

    docker-compose up -d --build
  2. Run database migrations:

    docker-compose exec app alembic upgrade head

The API will be available at http://localhost:8000.

Locally (Without Docker)

  1. Activate the virtual environment:

    poetry shell
  2. Run database migrations:

    alembic upgrade head
  3. Start the FastAPI server:

    uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
  4. Start the Celery worker:

    celery -A app.celery_app.celery worker -Q default,email,notifications -l info

๐Ÿงช Testing

The test suite uses pytest and an in-memory SQLite database by default for speed and reliability.

To run the tests:

poetry run pytest -q

๐Ÿค Contributing

Contributions are welcome! Please read our Contributing Guidelines to get started.

๐Ÿ“„ License

This project is licensed under the MIT License. See the LICENSE file for details.