-
Notifications
You must be signed in to change notification settings - Fork 0
Contributing
github-actions[bot] edited this page Mar 16, 2026
·
1 revision
Contributions are welcome! This page explains how to set up the development environment, run tests, and submit changes.
- Fork the repository on GitHub.
- Clone your fork:
git clone https://github.com/<your-username>/justgate.git cd justgate
- Create a feature branch:
git checkout -b feat/my-feature
Follow the Quick Start — Local Development guide to run the backend and frontend simultaneously.
cd services/backend
# Run the server (SQLite, dev secrets)
JUST_GATE_BACKEND_JWT_SECRET=dev-secret go run ./cmd/server
# Run all tests
go test ./...
# Run integration tests only
go test ./internal/service/... -run Integration -vcd services/frontend
pnpm install
pnpm dev # dev server with hot reload
pnpm build # production build
pnpm lint # ESLint checkservices/
├── backend/
│ ├── cmd/server/ Binary entry point
│ └── internal/service/ HTTP handlers, store, migrations, auth
└── frontend/
├── app/ Next.js App Router pages and API routes
├── components/ UI components (HeroUI v3 / Tailwind v4)
└── lib/ Auth helpers, backend client, type contracts
- One logical change per pull request.
- Large refactors or new features should be discussed in an issue first.
- Bug fixes should not include unrelated clean-up.
- Add or update tests for any changed behaviour.
- Backend: Go table-driven tests in
_test.gofiles alongside the code. - Frontend: component and utility tests where applicable.
- Integration tests live in
services/backend/internal/service/service_integration_test.go.
- All schema changes must be expressed as versioned migrations in
internal/service/migrations.go. - Migrations must be forwards-only and non-destructive where possible.
- Test that the migration runs cleanly against both SQLite and PostgreSQL.
- Use HeroUI v3 components; avoid raw HTML elements for UI.
- Follow the existing patterns in
components/admin/for new admin pages. - API calls to the backend go through the typed client in
lib/backend-client.tsandlib/backend-server.ts. - Type contracts for API request/response shapes live in
lib/contracts.ts.
- Push your branch and open a PR against
main. - Describe what the change does and why (link to an issue if applicable).
- The PR checks run automatically (lint, build, tests). Fix any failures before requesting review.
- A maintainer will review and merge once the checks pass and the change is approved.
Open a GitHub issue with:
- What you expected to happen
- What actually happened
- Steps to reproduce (minimal, if possible)
- JustGate version or commit SHA
By contributing, you agree that your contributions will be licensed under the Business Source License 1.1, which governs the project.