๐Ÿ”จ GitHub Development Guidelines

Project: Sugod | Last Updated: July 3, 2025

๐Ÿ”—

Environments

Environment URL Purpose Status
Development https://dev.withkm.com Playground for active development โœ… LIVE
Staging https://staging.withkm.com QA, testing, UAT โœ… LIVE
Production https://www.withkm.com Final release for client/customer use โœ… LIVE (Not Synced)
๐Ÿ“ฆ

Branching Strategy

main โ†’ Production (live/stable)
staging โ†’ QA / UAT branch
development โ†’ Active development (base branch for all devs)
feature/* โ†’ Feature branches (created from development)
bugfix/* โ†’ Bug fix branches (created from development)
hotfix/* โ†’ Emergency fix for production (created from main)

๐Ÿ”น Default branch: development

๐Ÿ‘จโ€๐Ÿ’ป

Getting Started

1. Clone the repository

bash
git clone https://github.com/your-org/sugod.git cd sugod

2. Checkout to development

bash
git checkout development

3. Create your working branch

bash
git checkout -b feature/your-feature-name
๐Ÿ”„

Workflow

1. Development (dev.withkm.com)

  • All development starts from the development branch
  • Work on your feature using feature/* or bugfix/* branches
  • Push regularly and pull the latest changes to avoid conflicts

2. Staging (staging.withkm.com)

  • Merge tested and completed features into staging branch via PR
  • Staging is for QA, testing, and approval before production
  • No direct commits to staging

3. Production (www.withkm.com)

  • Once QA is done, merge staging โ†’ main
  • Only maintainers should handle production deployments
  • After merge, production deployment is triggered
โœ…

Pull Request & Code Guidelines

โœ… Pull Request Guidelines

  • Use clear and descriptive PR title
  • Include brief summary of changes
  • Link related issues or tasks
  • Assign at least one reviewer
  • Run tests locally before submitting

๐Ÿงช Testing Responsibilities

  • Write unit tests for your feature or fix
  • Ensure changes don't break existing functionality
  • QA will conduct manual testing in staging

โš™๏ธ Code Standards

  • Follow project-specific style guides
  • Keep code clean, commented, and organized
  • Avoid committing temporary files and secrets

๐Ÿ“ Environment Variables

  • Do not commit .env files
  • Use .env.example as template
  • Use secrets manager for sensitive data
๐Ÿš€

Deployment Overview

Branch Environment URL Trigger Type
development https://dev.withkm.com Auto/manual
staging https://staging.withkm.com Manual (after PR)
main https://www.withkm.com Manual (post-QA)

๐Ÿงฏ Emergency Fixes

  • Branch from main: hotfix/your-fix-name
  • Apply fix โ†’ PR to main
  • Merge fix back into staging and development to sync changes