Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/azzamsa/tin
Rust GraphQL Template 🏗️
https://github.com/azzamsa/tin
async-graphql axum boilerplate
Last synced: 6 days ago
JSON representation
Rust GraphQL Template 🏗️
- Host: GitHub
- URL: https://github.com/azzamsa/tin
- Owner: azzamsa
- License: mit
- Created: 2022-10-16T06:01:56.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-11-30T13:41:52.000Z (24 days ago)
- Last Synced: 2024-11-30T14:35:24.001Z (24 days ago)
- Topics: async-graphql, axum, boilerplate
- Language: Rust
- Homepage:
- Size: 478 KB
- Stars: 40
- Watchers: 5
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
---
## Features
- [Async-GraphQL](https://github.com/async-graphql/async-graphql): GraphQL server library.
- Supports Relay-compatible cursor-based pagination.
- Automatically disables Playground in the production environment for performance reasons.
- Automatically stores GraphQL schema to file.
- [SQLx](https://github.com/launchbadge/sqlx): SQL toolkit.
- [Axum](https://github.com/tokio-rs/axum): web framework.
- [Tracing](https://github.com/tokio-rs/tracing): includes local timestamps.
- [Frunk](https://github.com/lloydmeta/frunk): avoids writing repetitive boilerplate.
- [utoipa](https://github.com/juhaku/utoipa): automatically generates OpenAPI documentation.
- [git-cliff](https://github.com/orhun/git-cliff): Changelog Generator.
- Includes exhaustive integration tests.
- Uses [Cynic](https://github.com/obmarg/cynic) as GraphQL client.
- Uses [Hurl](https://github.com/Orange-OpenSource/hurl) for API collection.
- Utilizes fast and tiny image containers, leveraging [cargo-chef](https://github.com/LukeMathWalker/cargo-chef) and `scratch` or `distroless` images.
- Implements GitHub Actions for CI and release workflows.
- Removed Git hooks for continuous development (formatting, linting, testing) [commit link](https://github.com/azzamsa/tin/commit/d9906164db7eb30cf66e2ed32edb220c0787fe13).
- Ensures consistent formatting using [dprint](https://github.com/dprint/dprint) for non-Rust files (Markdown, Dockerfiles, etc.).
- Supports [cargo-binstall](https://github.com/cargo-bins/cargo-binstall).
- Includes [cargo-release](https://github.com/crate-ci/cargo-release) workflow.## Checklist
When you use this template, try to follow the checklist to update your info properly
- [ ] Change the author name in `LICENSE`
- [ ] Change the package info in `Cargo.toml`
- [ ] Change the application name:
- [ ] Database name and other values in `.env`, `.example.env`, and other container related files.
- [ ] The OpenAPI info in `routes.rs`
- [ ] App name in `release.yml`
- [ ] Project URL in `cliff.toml`
- [ ] App name in the import statements across Rust source and tests files.
- [ ] Clean up the READMEs and remove routesAnd, enjoy :)
## Usage
```shell
$ # Clone the repository$ # Run the database
$ podman-compose -f compose.local.yml up db -d$ touch $SCHEMA_LOCATION # See .example.env
$ just dev # See also `just setup`
```Go to the playground `http://127.0.0.1:8000/playground` to see the schema.
## Navigating the Code
All the features can be found in the [CHANGELOG](CHANGELOG.md) file tagged with `feat`.
The file only contains user-facing changes, so you won't get lost navigating the code.## Credits
- Clean and Scalable Architecture for Web Applications in Rust by Sylvain Kerkour. [Article](https://kerkour.com/rust-web-application-clean-architecture), [Code](https://github.com/skerkour/bloom-legacy/tree/v2-e2ee).
- Icons and emoji from [Noto Emoji](https://github.com/googlefonts/noto-emoji)