Refactor: Consolidate documentation into README and enhance production setup#1
Merged
Conversation
…ioning - Update all dependencies to latest (Django 6.0.6, DRF 3.17.1, redis 8, ruff 0.15, pytest 9.0.3, etc.) and regenerate uv.lock - Add production packages: gunicorn, psycopg, whitenoise, drf-spectacular - Switch API versioning to AcceptHeaderVersioning: version is passed via Accept header (application/json; version=v1), URLs drop the /v1/ prefix - Add OpenAPI schema, Swagger UI and ReDoc endpoints (drf-spectacular) - Add /health/ endpoint checking database and Redis - Fill in dev/prod settings: security hardening (HSTS, secure cookies, SSL redirect), whitenoise static storage, Redis cache, logging, DATABASE_URL-based config, DRF pagination/throttling/permissions - Fix entrypoint.sh: config.wsgi instead of core.wsgi, drop unused gevent/celery commands, wait for PostgreSQL - Add PostgreSQL service to docker-compose with healthcheck and wiring - Add GitHub Actions CI (lint + tests), expand Makefile targets - Add header-versioning tests, fix all ruff/bandit findings - Rewrite README with quickstart, versioning guide and configuration docs https://claude.ai/code/session_01YZr4TbzTw6EkkFqZz2onTF
- Merge commons/ and externals/ into a single core/ package (mixins, redis client, integrations) per HackSoft/cookiecutter-django conventions: apps/ = business logic, core/ = reusable infra, config/ = configuration only - Move health-check view from config/views.py to core/health.py - Remove docs/ directory - Rewrite README: animated header/footer (capsule-render), typing SVG, shields.io badges, emoji sections, mermaid architecture diagram, collapsible configuration sections https://claude.ai/code/session_01YZr4TbzTw6EkkFqZz2onTF
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
This PR consolidates scattered styleguide documentation into a comprehensive README, enhances production-readiness with proper security settings and health checks, and improves the overall developer experience with better tooling integration.
Key Changes
Documentation & README
services_and_selectors.md,api_view.md,docstring.md) that were fragmented and hard to maintainREADME.mdas a comprehensive project guide with:Production & Security
core/health.pywith/health/endpoint that checks database and Redis connectivity (returns 503 if unhealthy) — ready for Kubernetes probesconfig/settings/prod.pywith:config/settings/base.py:.envoptional (graceful fallback if missing)CSRF_TRUSTED_ORIGINSsupportdrf-spectacularfor OpenAPI/SwaggerAcceptHeaderVersioning(version inAcceptheader, not URL)django-filtersand pagination defaultsAPI & Versioning
AcceptHeaderVersioning— clients specify version viaAccept: application/json; version=v1header instead of URL paths/api/v1/users/...to/api/users/...(version now in header)@extend_schemadecorators for OpenAPI documentationDocker & Deployment
docker-compose.ymlwith health checks and persistent volumesentrypoint.shto wait for both PostgreSQL and Redis before migrations3.13without patch version)Makefilewith comprehensive targets:install,migrate,test,lint,format,up,down,logsCI/CD
.github/workflows/ci.ymlwith:Dependencies
gunicorn,psycopg[binary,pool],whitenoise,drf-spectacularruff0.15.17,bandit1.9.4,pytest-django4.12.0, addedpytest-envCode Quality
Notable Implementation Details
API Versioning: The
AcceptHeaderVersioningapproach keeps URLs clean and stable while allowing multiple API versions to coexist. Default version isv1; unsupported versions return 406.Health Check: The
/health/endpoint is non-authenticated and checks both database and