Skip to content
Toolkit

Contributing to Cardsite

Branch Strategy

BranchPurposeDeployed to
mainProduction-ready codeprod.cardsite.io
feat/*New features—
fix/*Bug fixes—
chore/*Cleanup, refactoring, docs—

Workflow

  1. Create a branch from main:

    git checkout main
    git pull origin main
    git checkout -b feat/my-feature
    
  2. Make changes with clear, atomic commits:

    git add -A
    git commit -m "feat: add biolink analytics dashboard"
    
  3. 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 "..."
    
  4. 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
  5. 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:

PrefixUse 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 verify passes (and go vet ./... && go test ./... when apps/api changed)
  • 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):

VariableDescription
DATABASE_URLPostgreSQL connection string
JWT_SECRETSecret for JWT signing — min 32 chars; generate via openssl rand -hex 32
APP_URLPublic URL (e.g., https://cardsite.com)
UPLOAD_PATHLocal file storage path
PORTAPI 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

Library