Skip to content

Commit 437dcb8

Browse files
mattstrattonclaude
andcommitted
Update CLAUDE.md with deployment details and project status
Adds production infrastructure info (EC2, CI/CD, SSH, GHCR), documents what's implemented vs not yet, key conventions learned during development (CSRF handling, Inertia 303 redirects), and local/production URLs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 42cce22 commit 437dcb8

File tree

1 file changed

+73
-8
lines changed

1 file changed

+73
-8
lines changed

CLAUDE.md

Lines changed: 73 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44

55
A Django + Vue 3 web application replacing the Hugo static site for devopsdays.org. City organizers manage their event pages through a browser-based UI instead of git/YAML/PRs.
66

7+
**Live POC:** https://beta.devopsdays.org
8+
**Full PRD:** See `PRD.md` in this repo for the complete spec.
9+
710
## Architecture
811

912
- **Backend:** Django 5.x, PostgreSQL 16, Redis
10-
- **Public site:** Django templates + Tailwind CSS (server-rendered)
13+
- **Public site:** Django templates + Tailwind CSS (server-rendered via CDN for now)
1114
- **Editing UI:** Inertia.js + Vue 3 (SPA experience, Django handles routing and auth)
12-
- **Admin:** Django admin with customizations (for core team)
13-
- **Auth:** django-allauth with GitHub and Google OAuth
15+
- **Admin:** Django admin with django-unfold theme (for core team)
16+
- **Auth:** django-allauth with GitHub OAuth
17+
- **Branding:** devopsdays blue `#0082AB`, Roboto font, brain logo
1418

1519
## Key Conventions
1620

@@ -21,20 +25,81 @@ A Django + Vue 3 web application replacing the Hugo static site for devopsdays.o
2125
- URL patterns: public site at `/`, editing UI at `/manage/`, admin at `/admin/`
2226
- All models use `BigAutoField` as the primary key
2327
- Slugs are the primary human-readable identifiers (event slugs are `YYYY-city`)
28+
- Inertia form saves use POST with a 303 redirect response (not PUT)
29+
- CSRF token is read from cookie via axios in `frontend/src/main.js`
2430

2531
## Running Locally
2632

2733
```bash
34+
cp env.template .env
2835
docker compose up
2936
docker compose exec web python manage.py migrate
3037
docker compose exec web python manage.py shell < scripts/seed_data.py
3138
```
3239

40+
Local URLs:
41+
- Public site: http://localhost:8000
42+
- Editing UI: http://localhost:8000/manage/
43+
- Admin: http://localhost:8000/admin/ (seed script creates admin/admin superuser)
44+
- Vite HMR: http://localhost:5173
45+
- Mailpit: http://localhost:8025
46+
47+
The seed script reads real event data from the Hugo repo at `../devopsdays-web`.
48+
49+
## Deployment
50+
51+
**CI/CD:** Push to `main` triggers GitHub Actions which builds the Docker image, pushes to GHCR (`ghcr.io/devopsdays/devopsdays-web-app`), then SSHs to the EC2 instance to pull and restart.
52+
53+
**Infrastructure:**
54+
- EC2 instance at `3.227.45.155` (elastic IP)
55+
- Provisioned via Pulumi (`deploy/pulumi/`)
56+
- SSH: `ssh -i ~/.ssh/devopsdays-web-app.pem ec2-user@3.227.45.155`
57+
- App lives at `/opt/devopsdays-web-app/` on the server
58+
- SSL via Let's Encrypt (certbot), DNS on Cloudflare (grey-clouded for direct access)
59+
60+
**Production compose:** `docker-compose.prod.yml` (on the server, NOT the dev compose)
61+
- Pulls image from GHCR (no source code on server)
62+
- Runs collectstatic + migrate at startup
63+
- Nginx reverse proxy with SSL termination
64+
- Certbot for auto-renewal
65+
66+
**GitHub Actions secrets (on devopsdays/devopsdays-web-app):**
67+
- `EC2_HOST` — the elastic IP
68+
- `EC2_SSH_KEY` — contents of the SSH private key
69+
70+
**If you need to update docker-compose.prod.yml or nginx config on the server:**
71+
The CI/CD only updates the Docker image, not the compose file or nginx configs. To update those, scp the files to the server manually. The deploy script (`deploy/deploy.sh -k ~/.ssh/devopsdays-web-app.pem ec2-user@3.227.45.155 beta.devopsdays.org`) handles first-time setup.
72+
3373
## Data Model
3474

3575
Core entities: City, Event, EventPage, TeamMember, ProgramEntry, Sponsor, SponsorLevel, EventSponsor, Speaker, Talk, User, EventPermission, BlogPost, StaticPage.
3676

37-
See `apps/*/models.py` for full field definitions. The PRD at `../devopsdays-web/PRD-webapp-migration.md` has the complete data model documentation.
77+
See `apps/*/models.py` for full field definitions. The PRD has the complete data model documentation with entity relationship diagrams.
78+
79+
## What's Implemented (POC)
80+
81+
- Public homepage with upcoming/recent events
82+
- Public event detail page with sponsors, team members, nav
83+
- Public event listing with year filter
84+
- Django admin with unfold theme and organized sidebar
85+
- GitHub OAuth login
86+
- Organizer dashboard (Vue) showing all events
87+
- Event settings editor (Vue) — description, dates, location, CFP, registration, social links
88+
- Team/Pages/Sponsors tabs (read-only display)
89+
- Seed script importing real data from the Hugo repo
90+
91+
## What's NOT Implemented Yet
92+
93+
- Speaker & talk management UI
94+
- Program/schedule builder (drag-and-drop)
95+
- Content page editing (TipTap rich text editor)
96+
- Team member add/edit/reorder in the editing UI
97+
- Sponsor management in the editing UI (add from directory, set levels)
98+
- Event creation flow (core team)
99+
- User/permission management (core team)
100+
- Pretalx/Pretix integration
101+
- Static archives for pre-2020 events
102+
- Full data migration from Hugo repo (seed script only does a few events)
38103

39104
## Testing
40105

@@ -44,7 +109,7 @@ docker compose exec web python -m pytest
44109

45110
## Important Notes
46111

47-
- This is a POC. Not all features from the PRD are implemented.
48-
- The seed script (`scripts/seed_data.py`) reads from the Hugo repo at `../devopsdays-web`
49-
- Tailwind is loaded via CDN in the public templates for the POC. Production should use Vite.
50-
- The Vite dev server runs in Docker alongside Django for HMR on Vue components.
112+
- This is a POC, not production-ready
113+
- Tailwind is loaded via CDN in public templates — production should use Vite build
114+
- The Hugo site repo lives at `../devopsdays-web` (sibling directory)
115+
- The `static/img/devopsdays-brain.png` logo came from the Hugo theme

0 commit comments

Comments
 (0)