How infinitewarp/quips works
Project type and purpose
• This is a full-stack, monolithic Django web application (“quips”) that serves HTML pages via Django’s “website” app, exposes a read-only REST API under /quips/api/, provides a CSV import management command for bulk data ingestion, and integrates with Slack via its “slackapp” module.
• It’s containerized with Docker Compose for Django/Gunicorn, Nginx, and PostgreSQL.
File structure
• Top-level:
• Docker and CI configs (docker-compose.yml, compose/ subfolders, .github/workflows/, gitlab-ci.yml)
• Django project entrypoint (manage.py) and project settings under config/
• Main Django apps under quips/:
– api/ (serializers, views, URLs, tests)
– quips/ (core models, filters, stats, import command)
– slackapp/ (Slack webhook handlers)
– website/ (HTML views, templates, static assets)
• Static and template assets in quips/static/ and quips/templates/.
• PostgreSQL scripts in compose/postgres/.
• Build/entry scripts for Docker in each compose/ directory.
README for additional insights
• Local development uses dev.yml for Podman/Docker Compose, which stands up three containers: Django, Nginx, Postgres.
• A management command importquips loads CSV data into the database.
• The REST API exposes speaker and clique resources.
a. Main components
• Client (Browser or Slack)
• Nginx reverse proxy
• Gunicorn WSGI server running the Django project
• Django components (split into apps: website, API, slackapp, import command)
• PostgreSQL database
• External Slack API (for outgoing notifications or slash-command callbacks)
b. Relationships and interactions
1. Browser → HTTP → Nginx → HTTP → Gunicorn → Django “website” or “api” apps → ORM queries → PostgreSQL
2. Slack platform ↔ HTTP webhooks → Nginx → Gunicorn → Django “slackapp” endpoints
3. importquips executed inside the Django container reads CSV → invokes Django ORM → writes to PostgreSQL
4. Static files served directly by Nginx from /static/ mapped volume
c. Architectural patterns and design principles
• Monolithic MVC (Django): models in quips/quips/models.py, views/serializers per app, URL routing in each app
• Twelve-factor app principles: containers, config via env vars, separate build/run stages (Dockerfile, entrypoint scripts)
• Clear separation between runtime (Gunicorn) and reverse proxy (Nginx)
d. Key technologies and frameworks
• Python 3 / Django
• Gunicorn (WSGI)
• Nginx (reverse proxy + static file server)
• PostgreSQL
• Docker Compose for orchestration
• GitHub Actions / GitLab CI for CI/CD