From 23a6d7d6ad8874a8a918961b0ce18c0e3e5dea60 Mon Sep 17 00:00:00 2001 From: nitrix Date: Wed, 4 Mar 2026 03:01:56 +0100 Subject: [PATCH] Fix outdated README and defer self-hosting docs to implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove aspirational self-hosting section (docker-compose, config table, image storage) — will be written when features are actually implemented - Fix build commands: mvn → ./mvnw, npm test → npm run test:unit - Remove nonexistent Dockerfile from project structure tree - Remove Testcontainers from prerequisites (not yet a dependency) - Add README documentation ACs to US-13 (MAX_ACTIVE_EVENTS) and US-16 (UNSPLASH_API_KEY + volume mount) Co-Authored-By: Claude Opus 4.6 --- README.md | 70 ++++----------------------------------------- spec/userstories.md | 3 +- 2 files changed, 7 insertions(+), 66 deletions(-) diff --git a/README.md b/README.md index b65987d..765abd7 100644 --- a/README.md +++ b/README.md @@ -41,71 +41,12 @@ A privacy-focused, self-hostable web app for event announcements and RSVPs. An a | Architecture | SPA + RESTful API, hexagonal/onion backend | | Deployment | Single Docker container | -## Self-hosting - -### Prerequisites - -- Docker and Docker Compose -- A PostgreSQL instance (self-hosted or managed) - -### Quick start - -```yaml -# docker-compose.yml -services: - fete: - image: fete:latest - ports: - - "8080:8080" - environment: - DATABASE_URL: "jdbc:postgresql://db:5432/fete" - # Optional: limit simultaneous active events - # MAX_ACTIVE_EVENTS: 100 - # Optional: enable Unsplash image search for event headers - # UNSPLASH_API_KEY: your-api-key - depends_on: - - db - - db: - image: postgres:17 - environment: - POSTGRES_DB: fete - POSTGRES_USER: fete - POSTGRES_PASSWORD: changeme - volumes: - - pgdata:/var/lib/postgresql/data - -volumes: - pgdata: -``` - -```bash -docker compose up -d -``` - -The app runs at `http://localhost:8080`. Database migrations run automatically on startup. - -### Configuration - -All configuration is done via environment variables: - -| Variable | Required | Description | -|---------------------|----------|-----------------------------------------------------------------------------------------------------------------------------| -| `DATABASE_URL` | Yes | JDBC connection string for PostgreSQL | -| `MAX_ACTIVE_EVENTS` | No | Maximum number of non-expired events. Unset = unlimited | -| `UNSPLASH_API_KEY` | No | Enables header image search via Unsplash. Images are fetched server-side and stored locally — guests never contact Unsplash | - -### Image storage - -If you use the Unsplash header image feature, mount a persistent volume for stored images so they survive container restarts. The exact path will be documented once the feature is implemented. - ## Development ### Prerequisites -- Java (latest LTS) + Maven +- Java (latest LTS) + Maven wrapper (`./mvnw`, included) - Node.js (latest LTS) + npm -- PostgreSQL (or Docker for Testcontainers) ### Project structure @@ -114,25 +55,24 @@ fete/ ├── backend/ # Spring Boot application (Maven) ├── frontend/ # Vue 3 SPA (Vite, TypeScript) ├── spec/ # User stories, personas, implementation phases -├── Dockerfile # Multi-stage build for production └── CLAUDE.md # Project statutes and AI agent instructions ``` ### Running tests ```bash -# Backend (uses Testcontainers — needs Docker running) -cd backend && mvn test +# Backend +cd backend && ./mvnw test # Frontend -cd frontend && npm test +cd frontend && npm run test:unit ``` ### Building ```bash # Backend -cd backend && mvn package +cd backend && ./mvnw package # Frontend cd frontend && npm run build diff --git a/spec/userstories.md b/spec/userstories.md index ed42247..b2c015b 100644 --- a/spec/userstories.md +++ b/spec/userstories.md @@ -320,6 +320,7 @@ The following terms are used consistently across all stories: - [ ] Only non-expired events count toward the limit; expired events awaiting cleanup are not counted - [ ] The limit is enforced server-side; it cannot be bypassed by the client - [ ] No personal data is logged when the limit is hit — only the rejection response is returned +- [ ] The `MAX_ACTIVE_EVENTS` environment variable is documented in the README's self-hosting section (configuration table) **Dependencies:** US-1, T-4 @@ -386,7 +387,7 @@ The following terms are used consistently across all stories: - [ ] If the server has no Unsplash API key configured, the image search feature is unavailable — the option is simply not shown, no error - [ ] If the API key is removed from the config after images were already stored, existing images continue to render from disk; only the search/select UI becomes unavailable; the event page never breaks due to a missing API key - [ ] When the event expires and is deleted (US-12), the stored image file is deleted along with all other event data -- [ ] The hoster must mount a persistent volume for the image storage directory (documented in README) +- [ ] The `UNSPLASH_API_KEY` environment variable and the persistent volume requirement for image storage are documented in the README's self-hosting section (configuration table and storage notes) **Dependencies:** US-1, US-2, T-4