mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-07 04:12:04 +00:00
HealthLog — personal health-tracking PWA with weight, blood pressure, pulse, mood tracking, medication compliance, Withings integration, doctor report PDF export, and Dracula-themed UI.
2.2 KiB
2.2 KiB
Contributing to HealthLog
Contributions are welcome. This guide covers how to set up the project and submit changes.
Prerequisites
- Node.js 22+
- pnpm
- PostgreSQL 16+ (or Docker)
- Git
Setup
git clone https://github.com/MBombeck/HealthLog.git
cd HealthLog
cp .env.example .env
Edit .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.
With Docker (database only)
docker compose up -d db
pnpm install
pnpm db:generate
pnpm db:migrate
pnpm dev
Full Docker
docker compose up -d
Development Workflow
pnpm dev # Start dev server (http://localhost:3000)
pnpm lint # ESLint
pnpm format # Prettier
pnpm typecheck # TypeScript strict mode
pnpm test # Vitest
All four checks must pass before submitting a PR.
Code Conventions
- 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.
Database Changes
# After modifying prisma/schema.prisma:
pnpm db:migrate # Creates a new migration
pnpm db:generate # Regenerates Prisma client
Always include the migration file in your PR.
Pull Requests
- 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
Security
If you find a security vulnerability, do not open a public issue. See SECURITY.md for responsible disclosure instructions.
License
By contributing, you agree that your contributions will be licensed under the AGPL-3.0 license.