Skip to content

Latest commit

 

History

522 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DjangoCon US Automation

Django Project to automate tasks for the DjangoCon US.

Getting Started

Prerequisites

Quick Setup

  1. Clone and setup environment:

    just bootstrap

    This will:

    • Install/upgrade pip and uv
    • Copy .env-dist to .env if it doesn't exist
    • Build the Docker image
    • Run database migrations
  2. Start the development server:

    just up

    Access the application at http://localhost:8000

Manual Setup (without Just)

If you don't have Just installed:

  1. Create environment file:

    cp .env-dist .env
  2. Build and start:

    docker compose build
    docker compose up

Development Commands

Setup & Initialization

  • just bootstrap - Bootstrap the project: install Python tools, create .env file, and build Docker images
  • just update - Update the project: upgrade pip/uv, pull latest images, and rebuild containers

Docker & Services

  • just up / just server - Start all services (web, db, worker) in the foreground
  • just start - Start services in detached/background mode
  • just down / just stop - Stop and remove all running containers (preserves volumes)
  • just restart [service] - Restart one or more services (e.g., 'just restart web')
  • just build - Build or rebuild the Docker images without cache
  • just console - Open an interactive bash shell inside the web container
  • just logs - View container logs (use -f to follow, --tail N to limit lines)
  • just tail - Follow the last 100 lines of logs in real-time
  • just clean - Remove all containers, volumes, and locally built images

Django Operations

  • just migrate - Apply all pending database migrations
  • just makemigrations - Create new migration files for model changes
  • just createsuperuser - Create a superuser account for Django admin access
  • just shell - Open Django's interactive Python shell with project context
  • just runserver - Run Django's built-in development server (bypasses Docker)
  • just run [command] - Run any Django management command (e.g., 'just run collectstatic')
  • just check - Validate Django project configuration and settings

Testing & Code Quality

  • just test [path] - Run the test suite with pytest (optionally specify test paths)
  • just lint - Run pre-commit hooks on all files (formatting, linting, type checks)
  • just fmt - Format this justfile using Just's built-in formatter (requires --unstable flag)

Dependency Management

  • just lock - Generate pinned requirements.txt from requirements.in
  • just upgrade - Update all Python dependencies to their latest compatible versions

Utilities

  • just bump [--dry] - Update version number using bumpver (--dry for preview, omit for actual bump)

Project Structure

Django Applications

  • tickets/ - Ticket link distribution system for event access
  • titowebhooks/ - Webhook receiver and sales dashboards for the Tito event platform
  • emailoctopus/ - Email marketing integration with the Email Octopus API
  • volunteers/ - Attendee volunteer shift sign-ups, coordinator dashboard, and schedule sync
  • thunderdome/ - Talk/program review and scoring
  • travel_safety/ - Travel safety check-in registration
  • social_monitor/ - Social media monitoring

Key Features

  • Email-based ticket claiming - Attendees can claim unique ticket links
  • Admin ticket management - Bulk creation and monitoring of tickets
  • Volunteer scheduling - Shift sign-ups, coverage dashboard, and iCal sync from the conference schedule
  • GitHub OAuth authentication - Staff login via GitHub
  • Email subscription management - Integration with Email Octopus for marketing
  • Webhook processing - Handle Tito purchase events

Deployment

Deployments are managed by Coolify and happen automatically whenever something is merged into the main branch.

Production URL: https://automation.defna.org

Configuration

Edit .env file to configure:

  • Database: DATABASE_URL (defaults to local PostgreSQL)
  • Email: EMAILOCTOPUS_API_KEY for Email Octopus integration
  • Slack: SLACK_OAUTH_TOKEN for notifications
  • Debug: DJANGO_DEBUG=True for development

Setting up GitHub OAuth

1. Create a GitHub OAuth App

  1. Go to GitHub → Settings → Developer settings → OAuth Apps → New OAuth App
  2. Fill in:
    • Application name: DjangoCon US Automation (or your app name)
    • Homepage URL: https://automation.defna.org
    • Authorization callback URL: https://automation.defna.org/accounts/github/login/callback/
  3. Click Register application
  4. Copy the Client ID
  5. Click Generate a new client secret and copy it

2. Add the SocialApp in Django Admin

  1. Go to /admin/
  2. Navigate to Social applicationsAdd
  3. Fill in:
    • Provider: GitHub
    • Name: GitHub
    • Client id: (paste from GitHub)
    • Secret key: (paste from GitHub)
    • Sites: Add your site (make sure Site ID 1 exists with correct domain)
  4. Save

3. Verify Site Configuration

In Django Admin → Sites, ensure the site with ID 1 has:

  • Domain name: automation.defna.org
  • Display name: DjangoCon US Automation (or similar)

Architecture

  • Backend: Django 6.0 with Python 3.13
  • Database: PostgreSQL (via psycopg) with atomic transactions
  • Task Queue: django-q2 for background processing (qcluster worker)
  • Frontend: Tailwind CSS (django-tailwind-cli) with minimal JavaScript (htmx)
  • Navigation: django-simple-nav
  • Authentication: django-allauth with GitHub OAuth
  • App server: Gunicorn, run via django-prodserver
  • Containerization: Docker / Docker Compose (web, worker, db, utility services)
  • Hosting: Coolify, auto-deploying on merge to main (https://automation.defna.org)

Contributors

Languages