main • README.md
# GitRobot (Pure PHP + MySQL + Filesystem) - Shared Hosting MVP
## What this includes
- Public Explore page (browse public repos without login)
- Register / Login / Logout (secure sessions + password hashing + CSRF)
- Create repo (public/private)
- Simulated Git engine:
- Branches (pointers)
- Commits (snapshots)
- Blobs stored on disk (content-addressed, sha256)
- Browse file tree and view files
- Multi-file commit via ZIP upload
- Pull requests (diff + fast-forward merge button)
- Collaborators (owner can add read/write collaborators)
- Issues + comments + open/close
- Syntax highlighting (highlight.js)
## Setup (Hostinger)
1) Create a MySQL database (example: `gitrobot`) and user (example: `gitrobot_user`)
2) Import `schema.sql` using phpMyAdmin.
3) Upload `public_html/` contents to your domain's `public_html/`.
4) Upload `app/` folder to the same level as `public_html/` (sibling folder).
5) Create `storage_gitrobot/` folder (recommended outside `public_html` if possible).
- Ensure PHP can write to it (permissions).
6) Edit `app/config.php` with your DB credentials and storage_base path.
## URLs
- `/explore` (public)
- `/register` / `/login`
- `/repos` (your repos)
- Repo pages:
- `/r/{id}`
- `/r/{id}/browse?branch=main&dir=`
- `/r/{id}/commit-zip`
- `/r/{id}/branches`
- `/r/{id}/pulls`
- `/r/{id}/issues`
## Notes
- This is a shared-hosting-friendly MVP. Later, when you upgrade to VPS, we can replace the storage engine with real Git.