This repository contains the backend services for the AISEA project, developed using DOTNET 8.0.
- [Project Structure](#project structure)
- Prerequisites
- [Setup Instructions](#setup instructions)
- Running the Application
- Implementation Notes
Back-end/
├── AISEA.ApiService/
│ ├── AISEA.ApiService.WebApi/ # Web API startup project
│ │ └── Dockerfile # Dockerfile for WebApi
│ ├── AISEA.ApiService.BAL/ # Business logic layer
│ ├── AISEA.ApiService.DAL/ # Data access layer
│ ├── AISEA.ApiService.SHARED/ # Shared utilities/models
│ └── AISEA.ApiService.sln # Solution file
├── docker-compose.yml # Docker Compose configuration
├── .gitignore # Git ignore file
└── README.md # This file
AISEA.ApiService contains:
- Web API (
AISEA.ApiService.WebApi) - Business Logic (
BAL) - Data Access (
DAL) - Shared Code (
SHARED)
- Docker: Install Docker Desktop (includes Docker Compose)
- .NET SDK 8.0: Required for local development or building outside Docker (Download from Microsoft)
- Git: For cloning the repository
- IDE: Visual Studio 2022, Rider, or VS Code
git clone <repository-url>
cd Back-endEnsure the directory structure matches the one described above. Key files:
AISEA.ApiService/AISEA.ApiService.WebApi/Dockerfiledocker-compose.yml
The services are containerized and orchestrated using Docker Compose.
Navigate to the Back-end directory and run:
docker-compose up --buildThis builds the Docker images for AISEA.ApiService.WebApi.
The Web API will be available at http://localhost:5000.
To stop the services:
docker-compose downOpen a browser or use a tool like Postman to access http://localhost:5000 (e.g., http://localhost:5000/swagger if Swagger is enabled).
The project uses a 3-layer architecture in .NET Core Web API:
- Controller (API) — includes both RESTful endpoints and background worker services
- BAL (Business Logic)
- DAL (Data Access)
The SHARED folder should only include:
- Utility properties and methods
- Third-party interfaces (DAL will implement via "Service Agents")
- Do not include application-specific business logic here
- Endpoints are secured by default. Use the
[AllowAnonymous]attribute to allow unauthenticated access for specific endpoints. - Middleware handles exceptions (e.g.,
InvalidToken,NullReferenceException) and returns HTTP error codes in a consistent JSON format.
For errors caused by invalid user input or business logic violations:
- Do not return a generic 5XX error.
- Instead, define a custom exception type in the
SHAREDproject. - Use the
MiddlewareExceptionclass to return a well-formatted, expected error response.

