Development Workflow
Guidelines for contributing to Y3NKO.
Branch Strategy
Main Branches
| Branch | Purpose |
|---|---|
main | Production-ready code |
develop | Integration 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-performanceNaming Convention
type/short-description
# Examples
feature/user-reviews
fix/payment-webhook
improve/listing-filters
docs/api-reference
chore/update-dependenciesDevelopment Flow
1. Start Fresh
# Pull latest main
git checkout main
git pull origin main
# Create feature branch
git checkout -b feature/your-feature2. Develop
# Start dev server
npm run dev
# Run Prisma Studio for database inspection
npm run db:studio3. 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 dependencies5. Push and Create PR
git push origin feature/your-featureThen 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:
- Squash and merge to main
- Delete the feature branch
- 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" labelLocal Setup Checklist
Before starting work:
- Latest
mainpulled - 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 schemaKeeping 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 mainDatabase 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 ClientInclude migration files in your PR.