Skip to content

Repository files navigation

Backend Management Project

A robust backend API for a project management system built with FastAPI. This application utilizes a clean, domain-driven architecture and features real-time notifications, role-based access control (RBAC), and comprehensive task tracking capabilities.

Features

  • User & Role Management: Secure authentication, authorization, and role assignments (e.g., Project Manager, Member).
  • Project Tracking: Create, update, and organize projects, milestones, and specific categories.
  • Task Management: Assign tasks to users, track statuses, leave comments, and upload file attachments.
  • Real-time Notifications: Integrated support for Server-Sent Events (SSE), WebSockets, and Pusher for instant updates.
  • Audit Logging: Automatically track state changes and user actions across projects and tasks.
  • Cloud Storage: Seamless Cloudinary integration for handling task and project attachments.
  • Database Migrations: Version-controlled database schema managed via Alembic.

Tech Stack

  • Framework: FastAPI (Python)
  • ORM & Database: SQLAlchemy (Async support recommended), Alembic
  • Package Management: uv (and requirements.txt fallback)
  • Real-time: WebSockets, SSE, Pusher
  • File Storage: Cloudinary
  • Testing: Pytest

Prerequisites

  • Python 3.10+ (Refer to .python-version)
  • A supported Relational Database (e.g., PostgreSQL or MySQL)
  • uv package manager (recommended for speed) or pip.

Getting Started

1. Clone the repository

git clone https://github.com/ahmaadn/backend-management-project.git
cd backend-management-project

2. Environment Configuration

Copy the example environment file and update it with your specific credentials:

cp .env.example .env

Make sure to configure your database connection string, JWT secrets, Cloudinary API keys, and Pusher credentials.

3. Install Dependencies

Using uv (Recommended):

uv sync

Or using pip:

python -m venv venv
source venv/bin/activate  # On Windows use `venv\\Scripts\\activate`
pip install -r requirements.txt

4. Database Migrations

Apply the latest database migrations to set up your tables:

alembic upgrade head

(Optional) If the project includes a seeder script, you can populate initial data:

python -m app.seeder

5. Run the Application

Start the FastAPI development server:

uvicorn app.main:app --reload

Project Structure

app/
├── api/          # FastAPI routers and dependency injections
├── client/       # External service clients (e.g., Pegawai client)
├── core/         # Core configurations, domain events, realtime drivers, and policies
├── db/           # SQLAlchemy models, repositories, uow, and Alembic migrations
├── middleware/   # Custom request and context middlewares
├── schemas/      # Pydantic models for request/response validation
├── services/     # Core business logic layer
├── utils/        # Helper functions, cloud uploads, and mail utilities
└── main.py       # FastAPI application entry point

Testing

Run the automated test suite using pytest:

pytest

About

A robust backend API for a project management system built with FastAPI. Features real-time notifications, role-based access control (RBAC), task tracking, and a clean Domain-Driven Design architecture

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages