Web platform for the Posaunenwerk Rheinland brass music association. Manages events, courses, news, and organizational information.
- Next.js 16 (App Router) + TypeScript
- tRPC (end-to-end typesafe APIs)
- Prisma + PostgreSQL
- Better Auth (authentication)
- Tailwind CSS
# 1. Clone and configure
git clone https://github.com/nichtLehdev/pwr-web.git
cd pwr-web
# 2. Set environment variables
# Required: DATABASE_URL, BETTER_AUTH_SECRET, BETTER_AUTH_GITHUB_CLIENT_ID,
# BETTER_AUTH_GITHUB_CLIENT_SECRET, GITHUB_TOKEN, GITHUB_REPO
# Optional: SMTP_* (for email)
# 3. Start services
docker compose up -d
# 4. (Optional) Seed database
docker compose run --rm --profile seed db-seedVisit http://localhost:3000
# Install dependencies
pnpm install
# Start database (or use ./start-database.sh)
docker run -d --name posaunenwerk-db \
-e POSTGRES_PASSWORD=password \
-e POSTGRES_DB=posaunenwerk \
-p 5432:5432 postgres:16-alpine
# Setup database
pnpm db:migrate
pnpm tsx prisma/seed.ts # Optional
# Start dev server
pnpm devRequired:
DATABASE_URL- PostgreSQL connection stringBETTER_AUTH_SECRET- Auth secret (generate:openssl rand -base64 32)BETTER_AUTH_GITHUB_CLIENT_ID- GitHub OAuth client IDBETTER_AUTH_GITHUB_CLIENT_SECRET- GitHub OAuth secretGITHUB_TOKEN- GitHub API tokenGITHUB_REPO- GitHub repository (format:owner/repo)
Optional (Email):
SMTP_HOST,SMTP_PORT,SMTP_SECURE,SMTP_USER,SMTP_PASSWORD,SMTP_FROM
| Command | Description |
|---|---|
pnpm dev |
Development server |
pnpm build |
Production build |
pnpm start |
Production server |
pnpm check |
Lint + type check |
pnpm db:migrate |
Run migrations |
pnpm db:studio |
Open Prisma Studio |
pnpm test:email |
Test email configuration |
src/
├── app/ # Next.js pages (aktuelles, dashboard, termine, etc.)
├── server/api/ # tRPC routers
├── server/better-auth/ # Auth configuration
├── lib/ # Utilities
└── trpc/ # tRPC client
prisma/
├── schema.prisma # Database schema
└── migrations/ # Migration history
Public:
- Event calendar, course listings, news, organization info, downloads
Dashboard (Authenticated):
- Content management (events, courses, posts)
- Registration management
- Approval workflow (DRAFT → PENDING → APPROVED)
- Role-based access (ADMIN, LPW, RPW, OBLEUTE, USER)
ADMIN- Full accessLPW- Landesposaunenwart (can approve all content)RPW- Regionalposaunenwart (can approve for assigned districts)OBLEUTE- District representatives (can create, needs approval)USER- Regular users
Key entities: User, Event, Course, Post, Bezirk, Ensemble, AuswahlChor, Location, Media, Download, CourseRegistration
db- PostgreSQL 16db-migrate- Runs migrations on startupdb-seed- Optional seeding (profile: seed)app- Next.js application
See docs/ for detailed documentation:
- Architecture - Tech stack and project structure
- API Reference - tRPC routers and endpoints
- Development Guide - Setup and development workflow
- Deployment - Production deployment guide
- Email Testing - SMTP configuration
- Social Media Export - Instagram post generation
Proprietary software for Posaunenwerk Rheinland.