Contributions are welcome. This guide covers how to set up the project and submit changes.
- Node.js 22+
- pnpm
- PostgreSQL 16+ (or Docker)
- Git
git clone https://github.com/MBombeck/HealthLog.git
cd HealthLog
cp .env.example .envEdit .env and configure at minimum:
DATABASE_URL="postgresql://healthlog:healthlog@localhost:5432/healthlog"
SESSION_SECRET=<64-char hex>
ENCRYPTION_KEY=<64-char hex>
API_TOKEN_HMAC_KEY=<64-char hex>
Generate secrets with openssl rand -hex 32.
docker compose up -d db
pnpm install
pnpm db:generate
pnpm db:migrate
pnpm devdocker compose up -dpnpm dev # Start dev server (http://localhost:3000)
pnpm lint # ESLint
pnpm format # Prettier
pnpm typecheck # TypeScript strict mode
pnpm test # VitestAll four checks must pass before submitting a PR.
- TypeScript strict mode -- no
anytypes, no type assertions unless absolutely necessary - UI text in German, code/comments/docs in English
- API responses follow
{ data, error, meta }envelope pattern - Zod v4 for input validation (API routes and forms)
- shadcn/ui components (new-york style) for UI primitives
- Dracula theme -- dark mode only, use
--dracula-*CSS tokens
See CLAUDE.md for detailed architecture and patterns.
# After modifying prisma/schema.prisma:
pnpm db:migrate # Creates a new migration
pnpm db:generate # Regenerates Prisma clientAlways include the migration file in your PR.
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Make your changes
- Ensure all checks pass (
pnpm lint && pnpm typecheck && pnpm test) - Submit a PR with a clear description of the changes
If you find a security vulnerability, do not open a public issue. See SECURITY.md for responsible disclosure instructions.
By contributing, you agree that your contributions will be licensed under the AGPL-3.0 license.