Skip to content

what-a-cool-team/what-a-todo

Repository files navigation

what-a-template

Rust web app template.

Table of Contents

Introduction

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.

Structure

Overview

  • 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.
    • 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.

Flowchart

what-a-flowchart

Prerequisites

Setting up

Commands

Database creation

createdb todo_app

Trunk install

cargo install trunk

Usage

Running App

Using Cargo

cargo run --package app --bin app -- --config settings.toml

Using Trunk

trunk serve

Using Docker

docker compose up

Running Tests

cargo test

Contributing

License

Contact

Releases

No releases published

Packages

No packages published