# {{PROJECT_NAME}}
Generated by [Swordmaster](https://github.com/king-swordmaster/Swordmaster)
## Prerequisites
- Rust (latest stable)
- Docker & Docker Compose
## Getting Started
1. Start the database:
```bash
docker compose up -d db
```
2. Run the application:
```bash
cargo run
```
The server will start at http://localhost:{{APP_PORT}}
## Development
### API Testing
You can test the API using `curl` commands:
1. Create a user:
```bash
curl -X POST http://localhost:{{APP_PORT}}/users \
-H "Content-Type: application/json" \
-d '{"name": "John Doe", "email": "john@example.com"}'
```
2. Get a user (replace `1` with the ID returned from the previous command):
```bash
curl http://localhost:{{APP_PORT}}/users/1
```
### Running Tests
```bash
cargo test
```
### Database Migrations
Migrations are run automatically on application startup.
To add a new migration, use the sea-orm-cli or create a new file in `src/infrastructure/database/migration`.
## Project Structure
- `src/app`: Application layer (Controllers, Routes)
- `src/domain`: Domain layer (Entities, Services, Repositories)
- `src/infrastructure`: Infrastructure layer (Database, External services)