A secure, production-ready, and Dockerized backend API to manage issue tickets. It supports JWT auth, RBAC, Alembic migrations, and is built with a focus on modularity and testability.
- Features
- Tech Stack
- Architecture
- Project Structure
- Setup
- Testing
- Linting & Formatting
- Deployment
- Project Status
- JWT authentication (access & refresh tokens)
- Role-Based Access Control (Admin/User)
- Issue ticket CRUD operations
- Token revocation (logout functionality)
- Alembic for DB migrations
- Pytest test suite
- Dockerized development & production setup
- Pre-commit hooks (Black, isort, flake8)
- Pydantic for request validation
| Category | Tools & Libraries |
|---|---|
| Framework | Flask |
| ORM | SQLAlchemy |
| Auth | JWT (with blacklist support) |
| Database | PostgreSQL |
| Migrations | Alembic |
| Testing | Pytest |
| Dev Tools | Docker, Docker Compose, uv, Black, isort, pre-commit |
┌────────────┐
│ Client │
└────┬───────┘
│
HTTP API Requests
│
┌────▼──────┐
│ Flask App │
└────┬──────┘
┌────────────┴────────────┐
│ │
┌─────▼─────┐ ┌───────▼────────┐
│ Auth Layer│ │ Issue Routes │
└─────┬─────┘ └────────┬───────┘
│ │
┌─────▼───────┐ ┌────────▼────────┐
│JWT & RBAC │ │CRUD + Validation│
└─────┬───────┘ └────────┬────────┘
│ │
┌───▼────┐ ┌─────▼─────┐
│Database│ ◄──────────── │ SQLAlchemy│
└────────┘ └───────────┘
issue-tracker-api/
├── app/
│ ├── core/ # Config & extensions
│ ├── models/ # SQLAlchemy models
│ ├── routes/ # Flask blueprints
│ └── __init__.py # App factory
├── tests/ # Pytest test cases
├── migrations/ # Alembic migrations
├── Dockerfile
├── docker-compose.dev.yml
├── docker-compose.prod.yml
├── .pre-commit-config.yaml
├── .gitignore
├── pyproject.toml
├── run.py
└── README.md
git clone https://github.com/Savvythelegend/issue-tracker-api.git
cd issue-tracker-apiuv pip install .[dev]Create a .env file in the project root:
FLASK_CONFIG=development
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/issue_tracker
JWT_SECRET_KEY=your-secret-keyflask db upgrade
flask rundocker compose -f docker-compose.dev.yml up --buildpytestpre-commit run --all-filesUse docker-compose.prod.yml or a PaaS provider like Render, Railway, or Northflank.
Ensure production environment variables are set:
FLASK_CONFIG=production
DATABASE_URL=<your-production-db-url>
JWT_SECRET_KEY=<your-secure-key>Actively maintained with regular updates and improvements. Open to issues and contributions!