Files
agw/CLAUDE.md
Felix Förtsch 053707d96a normalize project structure: src/client + src/server + src/shared
- restructure from src/ + server/ to src/client/ + src/server/ + src/shared/
- switch backend runtime from Node (tsx) to Bun
- merge server/package.json into root, remove @hono/node-server + tsx
- convert server @/ imports to relative paths
- standardize biome config (lineWidth 80, quoteStyle double)
- add CLAUDE.md, .env.example at root
- update vite.config, tsconfig, deploy.sh for new structure

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 22:55:52 +01:00

1.4 KiB

agw — Abgeordnetenwatch PWA

Political transparency app tracking Bundestag/Landtag votes, politicians, and push notifications.

Stack

  • Frontend: React 19, Vite, Tailwind CSS 4, TanStack Router (file-based), Zustand, PGlite, Radix UI
  • Backend: Hono (Bun), Drizzle ORM, PostgreSQL, pg-boss (job scheduler), web-push
  • Linting: Biome (tabs, 80 chars, double quotes)

Project Structure

src/
├── client/          ← React PWA (features/, routes/, shared/)
├── server/          ← Hono API (features/, shared/)
└── shared/          ← isomorphic code (types, schemas)

Local Development

bun install
bun run dev            # frontend (Vite)
bun run dev:server     # backend (Bun --watch)

Deployment

./deploy.sh

Deploys to Uberspace (serve.uber.space):

  • Frontend → /var/www/virtual/serve/html/agw/
  • Backend → ~/services/agw-backend/ (systemd: agw-backend.service, port 3002)
  • Route: /agw/api/* → port 3002 (prefix removed)

Environment Variables

See .env.example:

  • DATABASE_URL — PostgreSQL connection string
  • PORT — server port (default 3002)
  • VAPID_PUBLIC_KEY, VAPID_PRIVATE_KEY, VAPID_SUBJECT — web push credentials

Database

PostgreSQL via Drizzle ORM. Migrations in drizzle/.

bun run db:generate    # generate migration
bun run db:migrate     # apply migrations