{"id":26051461,"url":"https://github.com/archellir/git.station","last_synced_at":"2026-05-06T04:04:49.709Z","repository":{"id":281133813,"uuid":"944273783","full_name":"archellir/git.station","owner":"archellir","description":"High-performance, extremely lightweight Git service built with Zig and SvelteKit","archived":false,"fork":false,"pushed_at":"2025-03-07T06:16:16.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-07T07:24:09.001Z","etag":null,"topics":["ci","git","svelte","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/archellir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-07T04:21:16.000Z","updated_at":"2025-03-07T06:16:19.000Z","dependencies_parsed_at":"2025-03-07T07:24:10.625Z","dependency_job_id":"d718b15c-0efa-40f6-9cd4-5dbe787c951c","html_url":"https://github.com/archellir/git.station","commit_stats":null,"previous_names":["archellir/git.station"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archellir%2Fgit.station","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archellir%2Fgit.station/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archellir%2Fgit.station/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archellir%2Fgit.station/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/archellir","download_url":"https://codeload.github.com/archellir/git.station/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242501078,"owners_count":20139320,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci","git","svelte","zig"],"created_at":"2025-03-08T04:55:15.162Z","updated_at":"2026-05-06T04:04:49.697Z","avatar_url":"https://github.com/archellir.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git station\n\nA high-performance, extremely lightweight Git service built with Zig and SvelteKit.\n\n## Features\n\n- Create and manage Git repositories\n- Web-based repository browsing\n- Branch management (create, delete)\n- Pull request workflow (create, update, close, merge, delete source branch)\n- CI/CD pipeline integration\n- Optimized for performance and minimal resource usage\n\n## Project Structure\n\n```\ngit.station/\n├── backend/     # Zig backend\n├── frontend/    # SvelteKit frontend\n└── scripts/     # Helper scripts\n```\n\n## Getting Started\n\n### Prerequisites\n\n- [Zig](https://ziglang.org/) (0.14.0 or later)\n- [Node.js](https://nodejs.org/) (18 or later)\n- [libgit2](https://libgit2.org/) development libraries\n- [SQLite3](https://www.sqlite.org/) development libraries\n\n### Backend Setup\n\n```bash\ncd backend\nzig build\nzig build run\n# zig build \u0026\u0026 zig build run\n```\n\n### Frontend Setup\n\n```bash\ncd frontend\nnpm install\nnpm run dev\n```\n\n## API Reference\n\n### Repository Management\n\n- `GET /api/repo/{repo_name}` - Get repository details\n- `GET /api/repo/{repo_name}/branches` - List branches in repository\n\n### Branch Management\n\n- `POST /api/repo/{repo_name}/branches` - Create a new branch\n- `DELETE /api/repo/{repo_name}/branch` - Delete a branch\n  ```json\n  { \"branch\": \"branch-name-to-delete\" }\n  ```\n\n### Pull Request Workflow\n\n- `GET /api/repo/{repo_name}/pulls` - List pull requests for a repository\n- `GET /api/repo/{repo_name}/pulls/{id}` - Get a specific pull request\n- `POST /api/repo/{repo_name}/pulls` - Create a new pull request\n  ```json\n  {\n    \"title\": \"Pull request title\",\n    \"body\": \"Description of changes\",\n    \"source_branch\": \"feature-branch\",\n    \"target_branch\": \"main\"\n  }\n  ```\n- `PATCH /api/repo/{repo_name}/pulls/{id}` - Update a pull request\n  ```json\n  {\n    \"title\": \"Updated title\",\n    \"body\": \"Updated description\",\n    \"state\": \"open\"\n  }\n  ```\n- `PUT /api/repo/{repo_name}/pulls/{id}/merge` - Merge a pull request\n- `PUT /api/repo/{repo_name}/pulls/{id}/close` - Close a pull request\n- `PUT /api/repo/{repo_name}/pulls/{id}/delete-branch` - Delete the source branch of a pull request\n\n## Testing\n\nGit Station includes a comprehensive test suite for the backend components. Tests can be run either locally or in Docker.\n\n### Running Tests\n\nThe `run-tests.sh` script in the `backend` directory provides various options for running tests:\n\n```bash\ncd backend\nsh run-tests.sh [options]\n```\n\n#### Test Options\n\n- `--all`: Run all tests (default)\n- `--git`: Run only Git-related tests\n- `--db`: Run only database tests\n- `--auth`: Run only authentication tests\n- `--unit`: Run only unit tests\n- `--local`: Run tests locally instead of in Docker\n- `--help`: Show help message\n\n### Examples\n\nRun all tests in Docker (requires Docker and docker-compose):\n```bash\nsh run-tests.sh\n```\n\nRun only Git tests locally:\n```bash\nsh run-tests.sh --git --local\n```\n\nRun database tests locally:\n```bash\nsh run-tests.sh --db --local\n```\n\n### Continuous Integration\n\nTests are automatically run on every push to the `master` branch and on all pull requests through GitHub Actions. The workflow:\n\n1. Builds the Docker container for testing\n2. Runs the complete test suite\n3. Reports the results directly in the GitHub interface\n\nYou can view test results in the \"Actions\" tab of the repository.\n\nTo run the same CI tests locally before pushing:\n```bash\ncd backend\n./run-tests.sh\n```\n\n### Testing Environment Requirements\n\n#### Local Testing\nFor local testing, you need:\n- Zig compiler (0.14.0 or later)\n- libgit2 development libraries\n- SQLite3 development libraries\n\nOn macOS, you can install these with Homebrew:\n```bash\nbrew install zig libgit2 sqlite3\n```\n\nOn Linux (Debian/Ubuntu):\n```bash\napt-get install zig libgit2-dev libsqlite3-dev\n```\n\n#### Docker Testing\nFor Docker-based testing, you need:\n- Docker\n- docker-compose\n\nThe Docker setup handles all dependencies automatically.\n\n### Test Architecture\n\nThe test suite is organized into several modules:\n\n- **Unit Tests**: Basic functionality tests for individual components\n- **Git Tests**: Tests for repository creation, cloning, and management\n- **Database Tests**: Tests for data persistence and retrieval\n- **Authentication Tests**: Tests for user authentication and authorization\n\nEach test module can be run independently or as part of the complete test suite.\n\n## Development\n\n\u003cimg width=\"863\" alt=\"Screenshot 2025-03-07 at 03 14 42\" src=\"https://github.com/user-attachments/assets/6ec8e2a7-0aa7-4b1c-aec1-71148c60a33e\" /\u003e\n\n- The backend server will be available at http://localhost:8080\n- The frontend development server will be available at http://localhost:5173\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchellir%2Fgit.station","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farchellir%2Fgit.station","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchellir%2Fgit.station/lists"}