{"id":48160598,"url":"https://github.com/jlpdeveloper/chi-boilerplate","last_synced_at":"2026-04-04T17:24:41.915Z","repository":{"id":307395266,"uuid":"1029393494","full_name":"jlpdeveloper/chi-boilerplate","owner":"jlpdeveloper","description":"Template for starting a new go api","archived":false,"fork":false,"pushed_at":"2025-07-31T01:56:25.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-31T03:46:28.870Z","etag":null,"topics":["api","go","template"],"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/jlpdeveloper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"zenodo":null}},"created_at":"2025-07-31T01:42:18.000Z","updated_at":"2025-07-31T01:56:06.000Z","dependencies_parsed_at":"2025-07-31T10:33:11.097Z","dependency_job_id":null,"html_url":"https://github.com/jlpdeveloper/chi-boilerplate","commit_stats":null,"previous_names":["jlpdeveloper/chi-boilerplate"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jlpdeveloper/chi-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlpdeveloper%2Fchi-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlpdeveloper%2Fchi-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlpdeveloper%2Fchi-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlpdeveloper%2Fchi-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jlpdeveloper","download_url":"https://codeload.github.com/jlpdeveloper/chi-boilerplate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlpdeveloper%2Fchi-boilerplate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31407644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","go","template"],"created_at":"2026-04-04T17:24:41.321Z","updated_at":"2026-04-04T17:24:41.910Z","avatar_url":"https://github.com/jlpdeveloper.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chi Boilerplate\n\nA lightweight, modular boilerplate for building RESTful APIs with Go and the Chi router framework. This project provides a clean architecture pattern with separation of concerns between handlers, services, and repositories.\n\nInspired by [Yappr](https://github.com/Melkeydev/yappr)\n\n## Features\n\n- Built with [Chi router](https://github.com/go-chi/chi) - a lightweight, idiomatic and composable router for building Go HTTP services\n- Clean architecture with separation of concerns:\n  - API handlers (presentation layer)\n  - Services (business logic layer)\n  - Repositories (data access layer)\n- Middleware support:\n  - Logging\n  - Error recovery\n  - Response compression\n  - CORS configuration\n- Environment variable configuration\n- API testing with Bruno HTTP client\n- Unit testing examples\n\n## Project Structure\n\n```\n.\n├── api/                  # API handlers (presentation layer)\n│   ├── sample/           # Sample API endpoints\n│   └── system/           # System API endpoints\n├── HTTP_COLLECTION/      # Bruno HTTP client collection for API testing\n├── repo/                 # Repositories (data access layer)\n│   └── sample/           # Sample repository implementation\n├── router/               # Router configuration\n├── service/              # Services (business logic layer)\n│   └── sample/           # Sample service implementation\n├── go.mod                # Go module definition\n├── go.sum                # Go module checksums\n└── main.go               # Application entry point\n```\n\n## API Endpoints\n\n- `GET /api/time` - Returns the current server time\n- `GET /api/sample/` - Returns a sample response\n- `GET /api/sample/error` - Returns a sample error response\n\n## Installation\n\n### Prerequisites\n\n- Go 1.24 or higher\n\n### Steps\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/yourusername/chi-boilerplate.git\n   cd chi-boilerplate\n   ```\n\n2. Install dependencies:\n   ```bash\n   go mod download\n   ```\n\n3. Run the application:\n   ```bash\n   go run main.go\n   ```\n\nThe server will start on port 8080 by default. You can change the port by setting the `PORT` environment variable.\n\n## Configuration\n\nThe application can be configured using environment variables:\n\n- `PORT` - The port on which the server will listen (default: 8080)\n\n## Testing\n\n### Unit Tests\n\nRun the unit tests with:\n\n```bash\ngo test ./...\n```\n\n### API Testing\n\nThe project includes a Bruno HTTP client collection for testing the API endpoints. To use it:\n\n1. Install [Bruno](https://www.usebruno.com/)\n2. Open the HTTP_COLLECTION directory in Bruno\n3. Use the provided requests to test the API endpoints\n\n## Development\n\n### Adding a New Endpoint\n\n1. Create a new handler in the appropriate package under `api/`\n2. Implement the necessary service logic in `service/`\n3. If needed, add data access logic in `repo/`\n4. Register the new endpoint in `router/router.go`\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlpdeveloper%2Fchi-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjlpdeveloper%2Fchi-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlpdeveloper%2Fchi-boilerplate/lists"}