|
|
1 viikko sitten | |
|---|---|---|
| .gitea | 1 viikko sitten | |
| apps | 1 viikko sitten | |
| config | 1 viikko sitten | |
| docs | 1 viikko sitten | |
| infra | 1 viikko sitten | |
| packages/contracts | 1 viikko sitten | |
| scripts | 1 viikko sitten | |
| .editorconfig | 1 viikko sitten | |
| .env.example | 1 viikko sitten | |
| .gitignore | 1 viikko sitten | |
| Cargo.lock | 1 viikko sitten | |
| Cargo.toml | 1 viikko sitten | |
| LICENSE | 1 viikko sitten | |
| README.md | 1 viikko sitten | |
| cargo-generate.toml | 1 viikko sitten | |
| justfile | 1 viikko sitten | |
| rust-toolchain.toml | 1 viikko sitten | |
| rustfmt.toml | 1 viikko sitten | |
RustRover-ready fullstack starter: Axum + PostgreSQL + sqlx on the backend, Vue 3 + TypeScript + Tailwind 4 on the frontend.
The backend route table is the API contract. utoipa-axum builds OpenAPI from the same handlers Axum serves. just generate-api writes packages/contracts/openapi.json and a typed Vue client. Vite reads config/*.toml and reverse-proxies /api and /health to the server bind address.
config/ shared TOML (server + Vite)
apps/server/ Axum, sqlx, request logging, OpenAPI
apps/web/ Vue 3 + TS + Tailwind
packages/contracts/ generated openapi.json
scripts/generate-api.mjs typed client from that spec
infra/compose/ local Postgres
cp .env.example .env
docker compose -f infra/compose/docker-compose.yml up -d postgres
cargo run -p server
cd apps/web && npm install && npm run dev
Vite binds 127.0.0.1 on purpose. localhost can resolve to ::1 and miss the proxy.
Open the repo root. Run cargo run -p server with APP_ENV=development.
To use this as a New Project template: Settings → Languages & Frameworks → Rust → custom cargo-generate template → paste the Git URL of this repo.
Load order:
config/default.tomlconfig/{APP_ENV}.tomlAPP__SECTION__KEY environment variablesAPP__SERVER__PORT=9000 cargo run -p server
Both processes honor APP_CONFIG_DIR if you need the files somewhere else.
#[utoipa::path(...)].routes(routes!(your_handler)) in apps/server/src/routes/mod.rsjust generate-apiapps/web/src/api/generated.tsRequest logs include method, path, status, latency, and X-Request-Id.
just server
just web
just generate-api
just check