ivoreis / rust-clean

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rust Clean

Rust Clean Architecture project.

Please see Uncle Bob article or some of these visuals for more information.

Clean Architecture

Clean Architecture

Dependencies should be Outside -> In. This means that no inner circle can depend on any of the outer circles.

In this folder structure we have:

  • Infrastructure
  • Presentation
  • Application
  • Domain

Both Infrastructure and Presentation are the top external layers (Blue and Green areas in the above picture).

Infrastructure contains any persistent logic and external providers.

Presentation contains the dtos and a rest_api to interact with Application.

Application is the application logic, it constains the business and use cases that interact with our Domain.

Domain includes all entities that form our internal domain.

Commands

./scripts/run_postgres.sh // initial database setup. It runs docker base image and seeds the database.

cargo build // builds the app
cargo run // runs the app

About


Languages

Language:Rust 95.5%Language:PLpgSQL 3.6%Language:Shell 0.9%