{"id":50721721,"url":"https://github.com/cloudsteak/small-backend","last_synced_at":"2026-06-10T00:30:51.654Z","repository":{"id":336266545,"uuid":"1148831383","full_name":"cloudsteak/small-backend","owner":"cloudsteak","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-03T15:48:02.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-04T05:33:06.386Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/cloudsteak.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-03T12:20:37.000Z","updated_at":"2026-02-03T15:50:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cloudsteak/small-backend","commit_stats":null,"previous_names":["cloudsteak/small-backend"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/cloudsteak/small-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudsteak%2Fsmall-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudsteak%2Fsmall-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudsteak%2Fsmall-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudsteak%2Fsmall-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudsteak","download_url":"https://codeload.github.com/cloudsteak/small-backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudsteak%2Fsmall-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34132030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"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":"2026-06-10T00:30:50.882Z","updated_at":"2026-06-10T00:30:51.648Z","avatar_url":"https://github.com/cloudsteak.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Small Backend Service\n\nA stateless, production-ready microservice built with **Python 3.13**, **FastAPI**, and managed by the **uv** package manager.\n\n## 🚀 Key Features\n\n-   **High Performance**: Powered by FastAPI, built on top of Starlette and Pydantic.\n-   **Modern Tooling**: Managed by `uv` for lightning-fast dependency resolution and virtual environment management.\n-   **Strict Validation**: Uses Pydantic v2 for data validation and settings management.\n-   **Security**: Includes utilities for JWT token generation and bcrypt password hashing.\n-   **Production Ready**: Modular structure, structured logging (standard), and optimized multi-stage Docker builds.\n-   **API Versioning**: Pre-configured with `/v1` prefix for easy evolution.\n\n## 🛠 Tech Stack\n\n-   **Runtime**: Python 3.13\n-   **Package Manager**: [uv](https://github.com/astral-sh/uv)\n-   **Framework**: [FastAPI](https://fastapi.tiangolo.com/)\n-   **Validation**: [Pydantic v2](https://docs.pydantic.dev/latest/)\n-   **Security**: `python-jose`, `passlib`\n\n---\n\n## 📂 Project Structure\n\n```text\nsmall-backend/\n├── app/\n│   ├── main.py              # Application entry point \u0026 health checks\n│   ├── api/\n│   │   └── v1/\n│   │       ├── api.py       # Main router for V1\n│   │       └── endpoints/   # Individual endpoint logic (items, utils)\n│   ├── core/\n│   │   ├── config.py        # Settings and environment variables\n│   │   └── security.py      # JWT and hashing utilities\n│   └── schemas/             # Pydantic models for validation\n├── tests/                   # Automated test suite\n├── Dockerfile               # Optimized multi-stage build\n├── docker-compose.yml       # Dev/Prod orchestration\n└── pyproject.toml           # Project dependencies\n```\n\n---\n\n## 🎬 Getting Started\n\n### Prerequisites\n\n-   [uv](https://docs.astral.sh/uv/getting-started/installation/) installed.\n\n### Local Installation\n\n1.  **Clone the repository** (if applicable).\n2.  **Sync dependencies**:\n    ```bash\n    uv sync\n    ```\n3.  **Run the application**:\n    ```bash\n    uv run uvicorn app.main:app --reload\n    ```\n    The API will be available at `http://localhost:8000`.\n\n---\n\n## 🐳 Docker Usage\n\nThis project is optimized for containerization using a multi-stage Dockerfile.\n\n### Build and Run with Docker Compose\n\n```bash\ndocker-compose up --build\n```\n\n### Build Image Manually\n\n```bash\ndocker build -t small-backend .\ndocker run -p 8000:8000 small-backend\n```\n\n---\n\n## 📖 API Documentation\n\nOnce the service is running, you can explore the API using the interactive documentation:\n\n-   **Swagger UI**: [http://localhost:8000/docs](http://localhost:8000/docs)\n-   **ReDoc**: [http://localhost:8000/redoc](http://localhost:8000/redoc)\n\n### Summary of Endpoints\n\n| Method | Path | Description |\n| :--- | :--- | :--- |\n| `GET` | `/health` | Service health status |\n| `GET` | `/v1/version` | Returns API version and name |\n| `POST` | `/v1/get-token` | Generates a mock JWT token |\n| `GET` | `/v1/info` | Mock system information |\n| `POST` | `/v1/echo` | Echoes back the JSON body for testing |\n| `GET` | `/v1/users/me` | Returns mock info for current user |\n| `GET` | `/v1/items` | List all mock items |\n| `POST` | `/v1/items` | Add a new mock item |\n| `GET` | `/v1/items/{id}` | Get a specific item by ID |\n\n---\n\n## ☸️ Helm Deployment\n\nA Helm chart is provided in the `helm/small-backend` directory for deploying to Kubernetes.\n\n### Linting and Templating\n\n```bash\n# Lint the chart\nhelm lint helm/small-backend\n\n# Render templates locally\nhelm template helm/small-backend\n```\n\n### Installing the Chart\n\n```bash\n# Install/Upgrade the chart\nhelm upgrade --install small-backend helm/small-backend --namespace default\n```\n\n---\n\n## 🧪 Testing\n\nThe project uses `pytest` and `httpx` for automated testing.\n\n```bash\n# Run all tests\nuv run pytest\n\n# Run with coverage (if installed)\nuv run pytest --cov=app\n```\n\n---\n\n## ⚙️ Configuration\n\nThe application uses `pydantic-settings` to manage configuration. You can override settings via environment variables:\n\n-   `PROJECT_NAME`: Name of the application.\n-   `SECRET_KEY`: Used for JWT encryption (Change this in production!).\n-   `ACCESS_TOKEN_EXPIRE_MINUTES`: Token lifespan.\n\nExample:\n```bash\nexport SECRET_KEY=\"your-production-secret\"\nuv run uvicorn app.main:app\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudsteak%2Fsmall-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudsteak%2Fsmall-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudsteak%2Fsmall-backend/lists"}