Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kevinetore/rust_clean_architecture
Rust web api implemented with clean architecture
https://github.com/kevinetore/rust_clean_architecture
clean-architecture diesel-rs rocket rust
Last synced: 23 days ago
JSON representation
Rust web api implemented with clean architecture
- Host: GitHub
- URL: https://github.com/kevinetore/rust_clean_architecture
- Owner: kevinetore
- License: mit
- Created: 2024-09-07T17:41:12.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-08T14:25:17.000Z (4 months ago)
- Last Synced: 2024-10-31T23:06:38.917Z (2 months ago)
- Topics: clean-architecture, diesel-rs, rocket, rust
- Language: Rust
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
Rust Clean Architecture Api [IN PROGRESS]
A simple experiment to demonstrate and learn about Rust
## Overview
This project demonstrates how to build a web application using the Rocket framework in Rust with Diesel for database interactions. It’s designed for learning and exploration of the Rust ecosystem.
## Technologies Used
- **Rust**: The programming language.
- **Rocket**: A web framework for building web applications.
- **Diesel**: ORM for Rust.
- **PostgreSQL**: The relational database used.## Project Structure
- **`core/rocket/`**: Contains the Rocket application code.
- **`core/diesel/`**: Contains the Diesel ORM and schema definitions.
- **`features/`**: Contains the business logic and domain-specific code.## Running the Application
To run the application, follow these steps:
### Prerequisites
1. **Docker**: Make sure Docker and docker compose are installed on your machine.
### Steps
1. **Build and Run Containers**
Use Docker Compose to build and start the application and database containers:
```sh
docker-compose up --build
```2. **Access the Application**
Once the containers are running, you can access the Rocket web application at http://localhost:8000.
3. **Running Diesel Migrations**
If you need to manually run Diesel migrations, you can do so by exec-ing into the application container:
```sh
docker-compose exec app bash
diesel migration run
```## Project Goals
- Exploring the Rust language and ecosystem.
## License
Distributed under the MIT License. See `LICENSE.txt` for more information.