Rust web app template.
The "what-a-template" is a Rust web app template designed to help developers quickly set up a new web application. It includes a pre-configured project structure, necessary dependencies, and example configurations to streamline the development process.
api/
: Contains different APIs such as the models and controllers that are used in multiple projects.app/
: Contains the main application logic.migrations/
:- Example files:
20210707120000_create_users_table.sql
: SQL script to create the users table.
- Example files:
main.rs
: The main entry point for the application.
domain/
: Contains core business logic and domain models for the application. The domain layer typically abstracts and encapsulates the business logic, making it independent of the infrastructure and application layers. For more information, visit https://opus.ch/en/category/ddd-en/.models/
: Domain models used for the project.repositories/
: Repositories that save/load any persistent information.services/
: Service logics for the project. e.g.greeting_service.rs
filesystem/
: A custom file system library that implements different kinds of file systems (e.g.LocalFileSystem
,InMemoryFileSystem
) for file operations such as create, read, open, and so on.settings/
: Defines and loads configuration settings.- Do not push any personal information from the
settings.toml
to a public worksapce.
- Do not push any personal information from the
createdb todo_app
cargo install trunk
cargo run --package app --bin app -- --config settings.toml
trunk serve
docker compose up
cargo test