Switch backend framework from FastAPI to Django + django-ninja#149
Merged
Brad-Edwards merged 1 commit intomainfrom Mar 8, 2026
Merged
Switch backend framework from FastAPI to Django + django-ninja#149Brad-Edwards merged 1 commit intomainfrom
Brad-Edwards merged 1 commit intomainfrom
Conversation
FastAPI required assembling 8-10 separate libraries (SQLAlchemy, Alembic, passlib, python-jose, etc.) to match what Django provides out of the box. Since zero application code existed, switching cost was zero. Django's batteries-included approach (ORM, admin, auth, permissions, migrations, multi-tenancy via django-tenants) is directly aligned with the ITRM/GRC domain which is CRUD-heavy, permissions-heavy, and admin-heavy. django-ninja preserves the same Pydantic + auto-OpenAPI DX that motivated the original FastAPI choice. ADR-010 supersedes ADR-001. All documentation updated accordingly. https://claude.ai/code/session_013EKfsxTPEFXJf5Gu9Td5tn
|
This was referenced Mar 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Migrate the Ground Control backend from FastAPI to Django 5.x with django-ninja, replacing the manual assembly of FastAPI + SQLAlchemy + Alembic + auth libraries with Django's batteries-included approach. This change is motivated by Ground Control's CRUD-heavy, permissions-heavy, admin-heavy workload profile, which aligns better with Django's strengths than FastAPI's async-first design.
Related Issues
Supersedes ADR-001 with ADR-010.
Changes
Framework migration: Replace FastAPI with Django 5.x + django-ninja
Database layer: Replace SQLAlchemy + Alembic with Django ORM + built-in migrations
Authentication: Replace python-jose + passlib with Django auth + django-oauth-toolkit
Multi-tenancy: Add django-tenants for schema-per-tenant support (ADR-006)
Audit logging: Add django-auditlog for automatic audit trails on model changes
Background tasks: Add django-q2 for Redis-backed task processing
Storage: Add django-storages[s3] for S3/cloud storage backend
Project structure: Add Django settings (base, test), urls.py, asgi.py, wsgi.py, manage.py
Dependencies: Update pyproject.toml to reflect Django ecosystem (removed: fastapi, uvicorn, starlette, sqlalchemy, alembic, asyncpg, python-jose, passlib)
Documentation: Update CODING_STANDARDS.md, ARCHITECTURE.md, CONTRIBUTING.md, and README.md to reference Django instead of FastAPI
ADR-010: New architecture decision record documenting the rationale for switching frameworks
Test Plan
pytest)mypy --strict)ruff check)Checklist
docs/CODING_STANDARDS.md)django.db.modelsfor model definitions)https://claude.ai/code/session_013EKfsxTPEFXJf5Gu9Td5tn