# GitHub Private Version Control and Workflow Plan
## Kampong Speu Provincial Demographic Management System (KSP-DMS)

**Document Code:** KSP-DMS-DOC-GIT-01  
**Repository Name:** `ksp-dms`  
**Visibility:** `PRIVATE` (Strictly Enforced)  
**Version:** 1.0 (Draft Proposal)  

---

## 1. Repository Governance and Safety Rules

1. **Strictly Private Visibility:** The remote repository on GitHub must be created with `private` visibility to prevent unauthorized inspection of municipal architecture or documentation.
2. **Zero-Secret Commitment Covenant:**
   - `.env` files are never tracked or committed.
   - Database credentials, passwords, and private API keys are strictly forbidden from source control.
   - All environment variables are documented via non-sensitive `.env.example`.
3. **Synthetic Data Only:** No real citizen data, production database dumps, or identifiable civic records shall ever be committed.
4. **Approval Gate Before Remote Operations:**
   - Git initialization and local commits are staged carefully.
   - **MANDATORY APPROVAL GATE:** The user must explicitly authorize remote repository creation and the initial push to GitHub.

---

## 2. Branching Strategy (GitFlow Adapted for Provincial Delivery)

```
 [main] -----------------------------------------------------> (Stable, tagged production baselines)
    ^
    |
 [develop] --------------------------------------------------> (Integration branch for ongoing features)
    ^
    +--- [feature/authentication]  (Sanctum, RBAC, Dual-Axis Scopes)
    +--- [feature/geography]       (Administrative tree, seeders)
    +--- [feature/households]      (Household & member registry)
    +--- [feature/persons]         (Demographic citizen profiles)
    +--- [feature/reports]         (Demographic pyramids, summaries)
    +--- [feature/gis]             (Leaflet & GeoJSON engine)
```

---

## 3. Strict `.gitignore` Specification

The project `.gitignore` must strictly include:
```gitignore
/.phpunit.cache
/node_modules
/public/build
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.env.backup
.env.production
.phpunit.result.cache
Homestead.json
Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
*.sql
*.zip
*.tar.gz
```
