{"id":29859196,"url":"https://github.com/evansims/ferrous","last_synced_at":"2025-07-30T02:10:55.493Z","repository":{"id":307069316,"uuid":"1027951876","full_name":"evansims/ferrous","owner":"evansims","description":"Skip the boilerplate. This Rust + Axum template gets you straight to building production-ready REST APIs with clean architecture and zero cruft. Clone, code, ship.","archived":false,"fork":false,"pushed_at":"2025-07-29T07:58:38.000Z","size":245,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-29T09:43:25.661Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://evansims.com","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evansims.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2025-07-28T19:33:50.000Z","updated_at":"2025-07-29T08:07:42.000Z","dependencies_parsed_at":"2025-07-29T09:54:50.974Z","dependency_job_id":null,"html_url":"https://github.com/evansims/ferrous","commit_stats":null,"previous_names":["evansims/ferrous"],"tags_count":null,"template":true,"template_full_name":null,"purl":"pkg:github/evansims/ferrous","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evansims%2Fferrous","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evansims%2Fferrous/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evansims%2Fferrous/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evansims%2Fferrous/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evansims","download_url":"https://codeload.github.com/evansims/ferrous/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evansims%2Fferrous/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267797644,"owners_count":24145709,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-07-30T02:10:54.111Z","updated_at":"2025-07-30T02:10:55.468Z","avatar_url":"https://github.com/evansims.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ferrous\n\nSkip the boilerplate. This Rust + Axum template gets you straight to building production-ready REST APIs with clean architecture and zero cruft. Clone, code, ship.\n\n## Documentation\n\nFor comprehensive documentation, see the [docs](./docs/) directory:\n\n- [Getting Started](./docs/getting-started.md) - Installation and setup guide\n- [API Reference](./docs/api-reference.md) - Complete API endpoint documentation\n- [API Versioning](./docs/api-versioning.md) - Version negotiation and deprecation strategy\n- [Authentication Guide](./docs/authentication.md) - JWT/JWKS authentication setup\n- [Database Documentation](./docs/database/) - Database architecture and implementations\n- [Architecture Overview](./docs/README.md) - Project structure and design decisions\n\n## Quick Start\n\n```bash\n# Clone and enter the project\ngit clone \u003crepository-url\u003e\ncd ferrous\n\n# Copy environment configuration\ncp .env.example .env\n\n# Run the development server\nmake run\n```\n\nThe service will start on `http://localhost:3000`\n\n## Features\n\n### Core Functionality\n- **Clean Architecture** - Modular design following Rust best practices\n- **Database Abstraction** - Pluggable database layer with multiple implementations\n- **RESTful API** - Full CRUD operations with proper HTTP semantics\n- **Comprehensive Test Suite** - Unit tests, integration tests, and test utilities\n\n### API Features\n- **OpenAPI Documentation** - Machine-readable API spec at `/openapi.json`\n- **Structured Error Responses** - Consistent error format with machine-readable codes\n- **Input Validation** - Field length limits (name: 1-255 chars, description: max 1000 chars) with sanitization\n- **Request ID Tracking** - Unique request IDs for debugging and log correlation\n\n### Security \u0026 Reliability\n- **JWKS Authentication** - JWT validation with support for multiple JWKS endpoints (optional in dev)\n- **Rate Limiting** - Configurable per-IP rate limits (default: 1000 req/min)\n- **Security Headers** - CSP, X-Frame-Options, HSTS, and more\n- **Graceful Shutdown** - Proper connection draining with configurable timeout\n\n### Observability\n- **Enhanced Health Checks** - Comprehensive health endpoint with system metrics\n- **Multiple Health Endpoints** - `/health` (detailed), `/health/live`, `/health/ready`\n- **Structured Logging** - Request/response logging with correlation IDs\n- **Performance Monitoring** - Memory usage, uptime, and database health tracking\n\n## API Endpoints\n\n### Documentation\n- `GET /openapi.json` - OpenAPI 3.0 specification\n\n### Health Checks\n- `GET /` - Basic health status\n- `GET /health` - Comprehensive health check with system metrics\n- `GET /health/live` - Liveness probe for container orchestration\n- `GET /health/ready` - Readiness probe with database connectivity check\n\n### Monitoring\n- `GET /metrics` - Prometheus metrics endpoint\n\n### Items Resource\n- `GET /api/v1/items` - List all items (supports pagination)\n- `POST /api/v1/items` - Create a new item\n- `GET /api/v1/items/{id}` - Get a specific item\n- `PUT /api/v1/items/{id}` - Update an item\n- `DELETE /api/v1/items/{id}` - Delete an item\n\nSee the [API Reference](./docs/api-reference.md) for detailed endpoint documentation.\n\n## Database Support\n\nFerrous supports multiple database backends through its abstraction layer:\n\n- **In-Memory** (default) - Fast development and testing\n- **Convex** - Serverless database with real-time sync\n\nConfigure via the `DATABASE_TYPE` environment variable. See [Database Documentation](./docs/database/) for details.\n\n## Development\n\n### Using Make commands\n```bash\nmake build    # Build for production\nmake run      # Run in development mode\nmake watch    # Run with hot-reload\nmake help     # Show all available commands\n```\n\n### Using Cargo directly\n```bash\ncargo build              # Build the project\ncargo run                # Run in development mode\ncargo watch -c -x run    # Run with auto-reload\ncargo test               # Run tests\n```\n\n## Project Structure\n\n```\nferrous/\n├── src/                    # Source code\n│   ├── db.rs               # Database abstraction and implementations\n│   ├── handlers.rs         # HTTP request handlers\n│   ├── middleware/         # HTTP middleware (auth, rate limit, etc.)\n│   ├── models.rs           # Data models and DTOs\n│   ├── config.rs           # Configuration management\n│   ├── error.rs            # Error types and handling\n│   ├── routes.rs           # API route definitions\n│   └── main.rs             # Application entry point\n├── docs/                   # Documentation\n├── convex/                 # Convex database functions\n├── monitoring/             # Prometheus and Grafana configs\n└── .github/                # CI/CD workflows\n```\n\n## Maintenance\n\nThis repository uses automated dependency management:\n- Dependabot checks for updates weekly\n- CI/CD pipeline validates all changes\n- Comprehensive test coverage ensures reliability\n\n## License\n\nSee [LICENSE](./LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevansims%2Fferrous","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevansims%2Fferrous","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevansims%2Fferrous/lists"}