Contributing
We welcome contributions to TideMeter! Whether it’s fixing bugs, adding features, improving documentation, or spreading the word — every contribution matters.
Getting Started
1. Fork and Clone
git clone https://github.com/YOUR-USERNAME/tidemeter.git
cd tidemeter2. Install Dependencies
pnpm install3. Set Up the Dev Environment
cp .env.example .env
docker compose -f docker/docker-compose.yml up -d
pnpm dev4. Make Your Changes
Create a new branch for your work:
git checkout -b feature/your-feature-nameCode Conventions
TideMeter follows strict coding conventions:
- TypeScript strict mode — No
anytypes unless absolutely necessary - Named exports — For all modules (no default exports except Next.js pages/layouts)
- Functional patterns — Pure functions, immutable data where practical
- No
.jsextensions — In TypeScript imports (Turbopack doesn’t resolve them) - Tailwind CSS 4 — CSS-first config with
@themein globals.css cn()utility — From@tidemeter/uifor class merging
Project Structure
apps/web/src/
├── app/ # Next.js App Router
├── components/ # React components
├── hooks/ # Custom React hooks
├── lib/ # Utilities and business logic
└── payload/ # PayloadCMS collections
packages/
├── analytics/ # Database adapters and schema
├── tracker/ # Tracking script
├── ui/ # Shared UI components
└── tsconfig/ # Shared TS configsTesting
Run all tests before submitting:
pnpm testRun tests for a specific package:
pnpm --filter @tidemeter/analytics testBuild Check
Always verify the build passes:
DATABASE_URL="postgresql://x:x@localhost:5480/x" pnpm buildNote: The web app build requires
DATABASE_URLto be set (even a dummy value works for type-checking).
Pull Request Guidelines
- Keep PRs focused — One feature or fix per PR
- Write clear descriptions — Explain what and why
- Add tests — For new features and bug fixes
- Follow conventions — Match the existing code style
- Update docs — If your change affects user-facing behavior
Important Boundaries
- Do NOT modify files in
old1/orold2/directories - Do NOT commit
.envor secrets - Do NOT use
middleware.ts— Useproxy.ts(Next.js 16 pattern) - Do NOT use
.jsextensions in TypeScript imports
Reporting Issues
Found a bug? Please open an issue with:
- Steps to reproduce
- Expected behavior
- Actual behavior
- Environment details (OS, Node.js version, browser)
License
By contributing, you agree that your contributions will be licensed under the MIT License.