Documentation is currently in beta. Report issues →
ContributingDevelopment Workflow

Development Workflow

Guidelines for contributing to Y3NKO.

Branch Strategy

Main Branches

BranchPurpose
mainProduction-ready code
developIntegration branch (optional)

Feature Branches

Create branches from main:

# Feature
git checkout -b feature/add-reviews
 
# Bug fix
git checkout -b fix/booking-validation
 
# Improvement
git checkout -b improve/search-performance

Naming Convention

type/short-description

# Examples
feature/user-reviews
fix/payment-webhook
improve/listing-filters
docs/api-reference
chore/update-dependencies

Development Flow

1. Start Fresh

# Pull latest main
git checkout main
git pull origin main
 
# Create feature branch
git checkout -b feature/your-feature

2. Develop

# Start dev server
npm run dev
 
# Run Prisma Studio for database inspection
npm run db:studio

3. Test Your Changes

  • Test on mobile viewport (Chrome DevTools)
  • Test with different user roles
  • Test error states
  • Check loading states

4. Commit

Write clear commit messages:

# Format
<type>: <description>
 
# Examples
feat: add listing reviews feature
fix: resolve payment webhook signature validation
docs: update API reference for bookings
style: format booking form component
refactor: extract pricing calculation logic
test: add unit tests for pricing utils
chore: update dependencies

5. Push and Create PR

git push origin feature/your-feature

Then create a Pull Request on GitHub.

Code Review

All PRs require review before merging. Reviewers look for:

  • Code follows existing patterns
  • TypeScript types are correct
  • No console errors
  • Mobile-responsive
  • Accessibility considered
  • Tests pass (if applicable)

Merging

After approval:

  1. Squash and merge to main
  2. Delete the feature branch
  3. Vercel automatically deploys to production

Hotfixes

For urgent production fixes:

# Create from main
git checkout main
git pull origin main
git checkout -b hotfix/critical-issue
 
# After fix
git push origin hotfix/critical-issue
# Create PR with "hotfix" label

Local Setup Checklist

Before starting work:

  • Latest main pulled
  • Dependencies installed (npm install)
  • Environment variables set (.env.local)
  • Prisma Client generated (npx prisma generate)
  • Database migrated (npx prisma migrate dev)
  • Dev server runs (npm run dev)

Useful Commands

# Development
npm run dev              # Start dev server
npm run db:studio        # Database browser
 
# Database
npm run db:migrate       # Run migrations
npm run db:seed          # Seed database
npm run db:reset         # Reset database
 
# Code Quality
npm run lint             # Run ESLint
npm run build            # Production build
 
# Prisma
npx prisma generate      # Regenerate client
npx prisma format        # Format schema

Keeping Up to Date

When your branch falls behind main:

# Update main
git checkout main
git pull origin main
 
# Rebase your branch
git checkout feature/your-feature
git rebase main
 
# Or merge main into your branch
git merge main

Database Migrations

When you change schema.prisma:

# Create migration
npx prisma migrate dev --name describe_change
 
# This:
# 1. Creates migration file
# 2. Applies to local database
# 3. Regenerates Prisma Client

Include migration files in your PR.