Skip to content

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backend Builder

CLI tool for generating structured Rust backend projects using clean architecture principles and a terminal user interface.

Description

Backend Builder provides a TUI to configure and generate a Rust API template. The generated project is organized into domain, application, and infrastructure layers. The tool uses a marker-based injection system to surgically remove or include code blocks based on user selection, ensuring the output is always a valid and compilable Rust project.

Requirements

Builder execution:

  • Rust 1.82.0 or later.
  • Cargo.

Generated project execution:

  • Diesel CLI (for database migrations).
  • Postgres or SQLite.
  • OpenSSL and pkg-config (on Linux systems).

Installation

Install the tool globally using Cargo:

cargo install --path .

After installation, run the tool from any directory:

backend-builder

Features and Customization

  • Project Metadata: Define project name and description.
  • Database: Select between Postgres, SQLite, or None.
  • Authentication: Optional JWT implementation.
  • Encryption: Choose between Bcrypt or Argon2 for password hashing.
  • Domain Selection: Include or exclude the default User domain.
  • Documentation: Optional Swagger/OpenAPI integration.

Navigation

  • TAB: Move to next field.
  • BACKTAB: Move to previous field.
  • ENTER: Toggle selection or trigger generation.
  • BACKSPACE: Delete characters in text fields.
  • ESC: Quit application.

Generation Logic

The tool embeds a base template using the include_dir crate. During generation, it processes the source files and removes blocks delimited by @marker and @end tags if the corresponding feature is disabled. It also modifies Cargo.toml to include only the necessary dependencies.

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages