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.
- 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.
- Framework: FastAPI (Python)
- ORM & Database: SQLAlchemy (Async support recommended), Alembic
- Package Management: uv (and
requirements.txtfallback) - Real-time: WebSockets, SSE, Pusher
- File Storage: Cloudinary
- Testing: Pytest
- Python 3.10+ (Refer to
.python-version) - A supported Relational Database (e.g., PostgreSQL or MySQL)
- uv package manager (recommended for speed) or pip.
git clone https://github.com/ahmaadn/backend-management-project.git
cd backend-management-projectCopy the example environment file and update it with your specific credentials:
cp .env.example .envMake sure to configure your database connection string, JWT secrets, Cloudinary API keys, and Pusher credentials.
Using uv (Recommended):
uv syncOr using pip:
python -m venv venv
source venv/bin/activate # On Windows use `venv\\Scripts\\activate`
pip install -r requirements.txtApply 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.seederStart the FastAPI development server:
uvicorn app.main:app --reload- Swagger UI (Interactive API Docs): http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
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
Run the automated test suite using pytest:
pytest