{"id":26053378,"url":"https://github.com/malidudle/volt","last_synced_at":"2025-03-08T07:28:13.709Z","repository":{"id":281193910,"uuid":"944205077","full_name":"Malidudle/Volt","owner":"Malidudle","description":"A lightweight backend framework written in Go","archived":false,"fork":false,"pushed_at":"2025-03-07T13:32:08.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-07T14:28:44.889Z","etag":null,"topics":["api","app-router","backend","backend-api","framework","go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Malidudle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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-07T00:40:04.000Z","updated_at":"2025-03-07T13:55:38.000Z","dependencies_parsed_at":"2025-03-07T14:38:53.192Z","dependency_job_id":null,"html_url":"https://github.com/Malidudle/Volt","commit_stats":null,"previous_names":["malidudle/volt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malidudle%2FVolt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malidudle%2FVolt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malidudle%2FVolt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Malidudle%2FVolt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Malidudle","download_url":"https://codeload.github.com/Malidudle/Volt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242515651,"owners_count":20142071,"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":["api","app-router","backend","backend-api","framework","go"],"created_at":"2025-03-08T07:28:12.916Z","updated_at":"2025-03-08T07:28:13.703Z","avatar_url":"https://github.com/Malidudle.png","language":"Go","readme":"# Volt\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\nA Go-based API framework with automatic route discovery and hot reloading.\n\n## Features\n\n- Automatic API route discovery and registration\n- Built-in cross-platform hot reloading\n- JSON response formatting\n- Clean directory structure\n- Simple route definition\n\n## Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/username/volt.git\ncd volt\n\n# Install dependencies\ngo mod download\n\n# Install Air for hot reloading (optional)\nmake install-air\n```\n\n## Directory Structure\n\nAPI routes follow this organization:\n\n```\napp/\n├── route.go        # Root API route (/api)\n└── example/\n    └── route.go    # Example API route (/example)\n```\n\n## Route Definition\n\nEach route exports:\n\n```go\n// HTTP method (GET, POST, etc.)\nvar Method = http.MethodGet\n\n// Handler function\nfunc Handler(w http.ResponseWriter, r *http.Request) (interface{}, int, error) {\n    return responseData, statusCode, err\n}\n```\n\n## Usage\n\n### Commands\n\n| Command            | Description                   |\n| ------------------ | ----------------------------- |\n| `make run`         | Run the API server            |\n| `make generate`    | Generate route definitions    |\n| `make dev`         | Run with hot reload           |\n| `make build`       | Build application binary      |\n| `make install-air` | Install Air for hot reloading |\n\nCustom port: `PORT=3000 make run`\n\n### Cross-Platform Hot Reloading\n\nThe framework supports hot reloading on all platforms:\n\n- **All Platforms**: `make dev`\n- **macOS/Linux**: `./dev.sh`\n- **Windows**: `dev.bat`\n\n### Troubleshooting Hot Reloading\n\n1. **Install Air**: `make install-air`\n2. **Add Go bin to PATH**:\n   - Bash/zsh: `export PATH=$PATH:$HOME/go/bin`\n   - Windows: `set PATH=%PATH%;%USERPROFILE%\\go\\bin`\n3. **Port conflicts**: Default is 8080; change in `.air.toml` if needed\n4. **Infinite rebuilds**: Already prevented by default configuration\n\n## Adding a New Route\n\n1. Create a directory under `app/` (e.g., `app/users/`)\n2. Add `route.go` with `Method` and `Handler`\n3. Run `make generate`\n4. The route will be available at the corresponding path (e.g., `/users`)\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalidudle%2Fvolt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalidudle%2Fvolt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalidudle%2Fvolt/lists"}