Contributing to Cardsite
Branch Strategy
| Branch | Purpose | Deployed to |
|---|---|---|
main | Production-ready code | prod.cardsite.io |
feat/* | New features | — |
fix/* | Bug fixes | — |
chore/* | Cleanup, refactoring, docs | — |
Workflow
Create a branch from
main:git checkout main git pull origin main git checkout -b feat/my-featureMake changes with clear, atomic commits:
git add -A git commit -m "feat: add biolink analytics dashboard"Push and open a PR against
main:git push -u origin feat/my-feature gh pr create --base main --title "feat: add biolink analytics dashboard" --body "..."Review and merge via GitHub:
- PRs require at least a description of what changed and why
- Squash merge preferred for clean history
- Delete the branch after merge
Deploy — after merge to
main, pull on server and rebuild:cd /var/www/production/cardsite git pull origin main cd apps/web && npm run build # If Go code changed: cd ../api && go build -o ../../cardsite-api ./cmd/server sudo systemctl restart cardsite-api
Commit Conventions
Use Conventional Commits:
| Prefix | Use for |
|---|---|
feat: | New features |
fix: | Bug fixes |
docs: | Documentation only |
chore: | Build, deps, cleanup |
refactor: | Code restructuring (no behavior change) |
test: | Adding or updating tests |
style: | Formatting, whitespace |
Examples:
feat: add create link modal with validation
fix: normalize null API responses to empty arrays
docs: update deployment guide for systemd
chore: delete superseded docs (replaced by …)
PR Guidelines
Title
Use the same conventional commit format: feat: short description
Description Template
## What
Brief description of the change.
## Why
Context — what problem does this solve?
## How
Technical approach (if non-obvious).
## Testing
How was this verified? (manual testing, unit tests, etc.)
Review Checklist
-
npm run verifypasses (andgo vet ./... && go test ./...whenapps/apichanged) - No new lint warnings
- Tests pass (if applicable)
- PR description explains the change
- No secrets or credentials committed
Environment
Required environment variables (see .env.example and docs/DEPLOYMENT.md):
| Variable | Description |
|---|---|
DATABASE_URL | PostgreSQL connection string |
JWT_SECRET | Secret for JWT signing — min 32 chars; generate via openssl rand -hex 32 |
APP_URL | Public URL (e.g., https://cardsite.com) |
UPLOAD_PATH | Local file storage path |
PORT | API server port — default 8080; production sets 18810 |
Optional AI integrations (OPENAI_API_KEY, GEMINI_API_KEY, GOOGLE_CLOUD_TTS_API_KEY, AWS_POLLY_*) and all 20 payment-gateway secrets are listed in docs/DEPLOYMENT.md.
Architecture
See docs/ARCHITECTURE.md for system design details.
Source: CONTRIBUTING.md