How andrew-2609/final-college-project works
Project type and purpose
• This is a Rust-based backend service implementing a scheduling system (SGHSS).
• It exposes a RESTful HTTP API for managing patients, appointments, and admin users.
• Follows a Clean/Hexagonal architecture: clearly separated Presentation, Application, Domain, and Infrastructure layers.
File structure
• Top-level: Cargo.toml, migrations folder (Diesel/Postgres DDL scripts), README.md.
• src/main.rs + src/infrastructure/web.rs: HTTP server bootstrap (likely using Actix‐Web or similar).
• src/presentation: DTOs, request extractors, HTTP handlers, route definitions.
• src/application: Use case implementations (business logic), error types, JWT security service.
• src/domain: Core entities (Patient, Appointment, Admin), value objects, repository interfaces, domain errors.
• src/infrastructure: Postgres connection (Diesel), concrete repository implementations.
README for additional insights
• Only the project title is provided, but the file structure makes clear this is an educational full-stack backend project using Clean Architecture and Postgres.
Detailed breakdown of components
• Client (UI, Postman, etc.)
• Presentation
• Routes (admin_routes.rs, appointment_routes.rs, patient_routes.rs)
• Handlers (admin_handler.rs, …)
• DTOs & Extractors (patient_dto.rs, jwt_extractor.rs)
• Application
• Use Cases (book_appointment.rs, login.rs, etc.)
• JWT Security Service (jwt.rs)
• Application Errors
• Domain
• Entities (Patient, Appointment, Admin)
• Value Objects (ID)
• Repository Traits (admin_repository.rs, …)
• Domain Errors
• Infrastructure
• DB Connection (connection.rs)
• Diesel Migrations
• Postgres Repos (postgres_patient_repository.rs, etc.)
• Web Server Bootstrap (web.rs, main.rs)
• External Database (PostgreSQL)