Thanks for your interest in contributing! This guide will help you get started.
- Node.js 20+
- pnpm 9+
- Docker (for PostgreSQL)
# Clone the repo
git clone https://github.com/your-org/solvesk.git
cd solvesk
# Install dependencies
pnpm install
# Start PostgreSQL
docker compose up -d postgres
# Copy environment file
cp .env.example .env
# Edit .env with your local settings
# Push database schema
pnpm db:push
# Seed demo data
pnpm db:seed
# Start dev server
pnpm devOpen http://localhost:3000 and sign in with admin@demo.com / password123.
src/
app/ # Next.js App Router (pages, API routes)
features/ # Feature modules (issue, project, user, notification, label, dashboard)
components/ # Shared UI components
lib/ # Cross-cutting utilities (auth, permissions, errors)
db/ # Drizzle ORM schema and migrations
config/ # App configuration
i18n/ # Internationalization
services/ # Service barrel exports
messages/ # i18n translation files
- Framework: Next.js (App Router)
- Database: PostgreSQL + Drizzle ORM
- Auth: NextAuth.js
- UI: Tailwind CSS + shadcn/ui
- State: Zustand (UI) + React Query (server)
- No
anytypes - No hardcoded colors — use semantic tokens from
globals.css - No magic numbers — use constants from
src/config/orsrc/lib/constants/ - Always check permissions for API routes (use
withAuthHOF) - Always filter internal comments for Customer role
- Run
npx tsc --noEmitbefore submitting a PR
Solvesk uses a 3-tier test strategy. New features and bug fixes should include tests.
pnpm test # Unit tests (Vitest)
pnpm test:integration # Integration tests (real DB)
pnpm test:e2e # E2E tests (Playwright)| Change type | Required tests |
|---|---|
| Service logic | Unit test (Vitest, mocked DB) |
| Permission/isolation logic | Integration test (real DB, src/__integration__/) |
| New page or user flow | E2E test (Playwright, tests/e2e/) |
| Bug fix | Test that reproduces the bug |
Integration tests run against a real solvesk_test database with self-contained fixtures (no seed dependency). See src/__integration__/fixtures.ts for the test data factory.
E2E tests use 3 authenticated roles (admin, agent, customer) via shared auth fixtures. See tests/auth.ts for the setup.
- Fork the repo and create a branch from
main - Make your changes
- Ensure
npx tsc --noEmitpasses with 0 errors - Add tests for your changes (see Testing section above)
- Run
pnpm testto verify all tests pass - Test your changes locally with
pnpm dev - Submit a pull request
Use conventional commits:
feat: add dark mode toggle
fix: resolve Safari login blank screen
refactor: simplify audit logger
docs: update contributing guide
- Use GitHub Issues
- Include steps to reproduce
- Include browser/OS info if relevant
By contributing, you agree that your contributions will be licensed under the GNU Affero General Public License v3.0.