{"id":28962730,"url":"https://github.com/tmottur/saas-boilerplate","last_synced_at":"2026-05-14T22:46:22.680Z","repository":{"id":300522099,"uuid":"1006385163","full_name":"TMottur/SaaS-boilerplate","owner":"TMottur","description":"Axum-based Rust boilerplate for SaaS-style applications, with user authentication, project tracking, and structured error handling","archived":false,"fork":false,"pushed_at":"2025-06-22T06:35:22.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-22T07:27:33.668Z","etag":null,"topics":["axum","postgres","rust","saas-boilerplate","sql","tokio"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/TMottur.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}},"created_at":"2025-06-22T06:28:34.000Z","updated_at":"2025-06-22T06:40:05.000Z","dependencies_parsed_at":"2025-06-22T07:27:42.817Z","dependency_job_id":"36db7237-f1bd-496e-bdeb-d2610c965eb0","html_url":"https://github.com/TMottur/SaaS-boilerplate","commit_stats":null,"previous_names":["tmottur/saas-boilerplate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TMottur/SaaS-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TMottur%2FSaaS-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TMottur%2FSaaS-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TMottur%2FSaaS-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TMottur%2FSaaS-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TMottur","download_url":"https://codeload.github.com/TMottur/SaaS-boilerplate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TMottur%2FSaaS-boilerplate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265424348,"owners_count":23762880,"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":["axum","postgres","rust","saas-boilerplate","sql","tokio"],"created_at":"2025-06-24T03:11:54.727Z","updated_at":"2025-10-26T20:33:16.439Z","avatar_url":"https://github.com/TMottur.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Axum Web API\n\nA lightweight, production-ready Rust API built with [Axum](https://docs.rs/axum/latest/axum/), designed for real-world backend engineering. This project demonstrates clean API architecture, Postgres-backed session authentication, rate limiting, Dockerized deployment, and robust error handling.\n\n## Features\n\n- **Full CRUD Resources**\n  - Manage user accounts and project resources via RESTful endpoints.\n  - Relational integrity enforced with PostgreSQL.\n\n- **Secure Authentication**\n  - Email/password login flow using `argon2` password hashing.\n  - Persistent session-based auth powered by `tower-sessions` with a SQLx Postgres store — no in-memory shortcuts.\n\n- **Postgres Integration**\n  - Structured database layer built with `sqlx`.\n  - Automated migrations for accounts, projects, and session tables.\n  - Clean timestamp handling and UUIDs for resource tracking.\n\n- **Rate Limiting**\n  - Protects endpoints against abuse with configurable request limits.\n\n- **Error Handling**\n  - Custom error types using `thiserror` for consistent, readable API responses.\n\n- **Integration Testing**\n  - Tests simulate real API interactions with isolated environments.\n  - Ensures confidence in authentication, CRUD functionality, and database integrity.\n\n- **Docker-First Deployment**\n  - Complete `Dockerfile` and `docker-compose.yml` setup.\n  - Local environment spins up the API and Postgres database with a single command.\n\n- **Modern Rust Stack**\n  - Built on async Rust with `tokio`, `axum`, and `sqlx`.\n  - Strong typing, safe concurrency, and security best practices.\n\n---\n\n## Quick Start (Docker)\n\n```bash\n# Clone the repo\ngit clone https://github.com/yourname/axum-web.git\ncd axum-web\n\n# Build and run with Docker Compose\ndocker-compose up --build\n```\n\nThe API will be available at [http://localhost:3000](http://localhost:3000).\n\n---\n\n## Database Migrations\n\nSQL migrations are located in the \\`migrations/\\` folder:\n\n- \\`create_accounts.sql\\`: User table with hashed password storage.\n- \\`create_project_table.sql\\`: Project resources linked to user accounts.\n- \\`create_sessions_table.sql\\`: Session storage for persistent login state.\n\n---\n\n## Tech Stack\n\n| Tool/Crate                | Purpose                                 |\n|---------------------------|------------------------------------------|\n| **Axum**                  | Web framework with router-based API     |\n| **SQLx**                  | Async Postgres database interaction     |\n| **Tower-Sessions**        | Production-grade session management     |\n| **Argon2**                | Password hashing for authentication     |\n| **Tokio**                 | Async runtime for high-performance I/O  |\n| **Docker \u0026 Compose**      | Containerized development environment   |\n| **Validator**             | Request payload validation              |\n| **Rate Limiting**         | API protection from excessive requests  |\n| **Integration Tests**     | End-to-end API validation               |\n\n---\n\n## Project Goals\n\nThis project serves as a portfolio centerpiece, showcasing:\n\n- Realistic backend architecture\n- Secure authentication implementation\n- Database-driven state management\n- Docker-based deployment workflows\n- Idiomatic, maintainable Rust\n\n---\n\n## Future Improvements\n\nPlanned additions:\n\n- Comprehensive API documentation (e.g., OpenAPI)\n- Frontend example consuming the API\n- CI pipeline for automated tests and builds\n\n---\n\n## Local Development\n\nFor non-Docker setups:\n\n```bash\n# Ensure Postgres is running on port 5433 as defined in docker-compose.yml\nexport DATABASE_URL=postgres://postgres:postgres@localhost:5433/axum_db\ncargo run\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmottur%2Fsaas-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmottur%2Fsaas-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmottur%2Fsaas-boilerplate/lists"}