All checks were successful
Frontend CI / build (push) Successful in 1m37s
### Description - READMEs are also updated! ### Package Changes _No response_ ### Screenshots _No response_ ### Reference Resolves #145. ### Checklist - [x] A milestone is set - [x] The related issuse has been linked to this branch Reviewed-on: #147 Co-authored-by: SquidSpirit <squid@squidspirit.com> Co-committed-by: SquidSpirit <squid@squidspirit.com>
Backend
Development
Prerequisites
- Rust - Latest stable version
- sqlx-cli - Database migration tool
- watchexec (Optional) - For hot reloading
Setup
-
Install sqlx CLI:
cargo install sqlx-cli
-
Run database migrations:
sqlx migrate run
-
Prepare SQL schema:
cargo sqlx prepare --workspace
-
Run the server:
RUST_LOG=debug cargo run
Development Commands
- Run server:
RUST_LOG=debug cargo run
- Hot reload (optional):
RUST_LOG=debug watchexec -e rs -r 'cargo run'
- Database migration:
sqlx migrate run
- Schema preparation:
cargo sqlx prepare --workspace
- Build:
cargo build
- Test:
cargo test
Project Structure
The backend follows Clean Architecture principles with a modular structure:
server/
- Main server application and configurationfeature/
- Feature modules organized by domainauth/
- Authentication and authorizationpost/
- Blog post managementlabel/
- Label/tag systemimage/
- Image handlingcommon/
- Shared utilities and types
migrations/
- Database migration scripts
Each feature module follows the Clean Architecture pattern:
domain/
- Business logic and entitiesapplication/
- Use cases and application servicesadapter/
- Interface adapters (controllers, presenters)framework/
- External frameworks (database, HTTP)
Technology Stack
- Framework: Actix-web
- Database: PostgreSQL with SQLx
- Authentication: JWT-based
- Serialization: Serde
- Migration: SQLx migrations
- Logging: env_logger with RUST_LOG