To build and deploy the Hestia app localy, you can use the docker compose provided with the repository. Simply use docker compose up in the docker folder and everything should start up.
The database of the project is hosted so you will need credentials to connect to it.
The backend of Hestia is a RESTful API built with ASP.NET Core 8.0. It serves as the primary interface between the mobile application and the underlying PostgreSQL database, providing secure and performant endpoints for data access and manipulation.
Framework : ASP.NET Core 8.0 (C#) Authentication : JWT (JSON Web Tokens) with OAuth 2.0 (Google Sign-In) Database : Postgresql (with Entity Framework core) Caching : LazyCache (in-memory caching) Background Jobs : HangFire API Documentation : Swagger (Open API) Testing : xUnit, Moq Containerization : Docker, Docker Compose Hosting : Ubuntu virtual machine (Epitech VM) CI/CD : Github Action
- Dependency Injection using .NET built-in DI container
- Global Error Handling using Problem Details (RFC 7807)
- Secure Authentication using JWT and Google OAuth 2.0
- Optimized performance using caching (LazyCache in memory)
- Modular and Layered Architecture (API, Business, Data Access, Shared)
- Entity Framework Core for ORM and migrations
- HangFire for background tasks and recurring jobs
- Swagger (OpenAPI 3.0) for automatic API documentation
- Docker & Docker Compose support for local development
- Environment-based configuration loading (Development / Production)
- Unit testing with xUnit and mocking with Moq
- Clear separation of concerns with Clean Architecture principles
- Centralized Logging System
backend/
├── Api/
│ ├── Configuration/
│ ├── Controllers/
│ ├── ErrorHandler/
│ ├── appsettings.json
│ └── Program.cs
│
├── Business/
│ ├── Interfaces/
│ ├── Jwt/
│ ├── Mappers/
│ └── Services/
│
├── EntityFramework/
│ ├── Context/
│ ├── Migrations/
│ ├── Models/
│ └── Repositories/
│
├── Shared/
│ ├── Enums/
│ ├── Exceptions/
│ └── Models/
│ ├── DTO/
│ ├── Input/
│ ├── Output/
│ └── Update/
│
├── Dockerfile
│
└── Tests/
Complete the file named appsettings.json with the info of the DB, google id etc...
The file is here :
Hestia/backend/Api/
If everything is properly configured, you can run the backend using Docker. Open a terminal and execute the following commands:
cd Hestia/docker
docker compose upIf the setup is successful, you should see the log message:
Connection successful!
The API will be available at:
- Base URL:
http://localhost:8080/api/ - Swagger UI:
http://localhost:8080/swagger
- Open the solution file located at:
Hestia/backend/backend.sln
- In Visual Studio, set the Api project as the startup project.
- Start the application by pressing F5 or clicking the green "Run" button.
To run the project manually via the .NET CLI:
cd Hestia/backend/Api
dotnet runThe API will be available at the default Kestrel endpoint
Development(appsettings.Development.json)Production(appsettings.Production.json)
Go to Hestia/docker/compose/yml
You can change this line to either development or production :
environment:
- ASPNETCORE_ENVIRONMENT=Development
