Swap DIDs with people you meet
connections.directory CONTRIBUTING.md
2.1 kB · 83 lines
Markdown
at main

Contributing to Connections Directory #

Git Workflow #

We use a simple branch-based workflow:

Main Branch #

  • main - Production branch, deployed to connections.directory
  • All code in main should be tested and working
  • Direct commits to main only for hotfixes

Development Workflow #

  1. Create a feature branch from main:

    git checkout main
    git pull origin main
    git checkout -b feature/your-feature-name
    
  2. Make your changes and commit regularly:

    git add .
    git commit -m "feat: description of your change"
    
  3. Push your branch:

    git push origin feature/your-feature-name
    
  4. Merge to main when ready:

    git checkout main
    git merge feature/your-feature-name
    git push origin main
    
  5. Deploy to production:

    npm run build
    npx wrangler pages deploy dist --project-name=connections-directory
    

Commit Message Convention #

Use conventional commits:

  • feat: - New feature
  • fix: - Bug fix
  • docs: - Documentation changes
  • style: - Code style changes (formatting, etc)
  • refactor: - Code refactoring
  • test: - Adding or updating tests
  • chore: - Maintenance tasks

Branch Naming #

  • feature/ - New features (e.g., feature/qr-scanner)
  • fix/ - Bug fixes (e.g., fix/camera-permissions)
  • refactor/ - Code refactoring (e.g., refactor/storage-layer)
  • docs/ - Documentation (e.g., docs/setup-guide)

Testing Before Merge #

Before merging to main:

  1. Test locally with npm run dev
  2. Build successfully with npm run build
  3. Test the built version with npm run preview
  4. Ensure OAuth flow works
  5. Test QR scanning and generation
  6. Verify connections are saved and displayed

Deployment #

Deployments happen on merge to main:

  1. Merge your feature branch to main
  2. Run npm run build
  3. Deploy with npx wrangler pages deploy dist --project-name=connections-directory
  4. Test at https://connections.directory

Auto-Deploy (Future) #

We'll set up Cloudflare Pages to auto-deploy from the main branch in the Cloudflare dashboard.