Skip to content

This is the backend server for the AI-SEA Project aka FU Capstone Project SU25. The project helps FPTU Student with enhancement their tracking academic progress with personalized and AI-Powered Features

Notifications You must be signed in to change notification settings

Khoi-Ngo/FU_FINALCAPSTONE_BE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AISEA Backend - FPT_University Capstone Summer 2025

This repository contains the backend services for the AISEA project, developed using DOTNET 8.0.


Table of Contents


Architecture Overview

3-Layer Architecture (Extended with SHARED Layer)

3-Layer Architecture


Project Structure

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)

Prerequisites

  • 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

Setup Instructions

Clone the Repository

git clone <repository-url>
cd Back-end

Verify Directory Structure

Ensure the directory structure matches the one described above. Key files:

  • AISEA.ApiService/AISEA.ApiService.WebApi/Dockerfile
  • docker-compose.yml

Running the Application

The services are containerized and orchestrated using Docker Compose.

Build and Start Containers

Navigate to the Back-end directory and run:

docker-compose up --build

This builds the Docker images for AISEA.ApiService.WebApi. The Web API will be available at http://localhost:5000.

Stop Containers

To stop the services:

docker-compose down

Access the API

Open a browser or use a tool like Postman to access http://localhost:5000 (e.g., http://localhost:5000/swagger if Swagger is enabled).



Backend Package Diagram

Backend Package Diagram


Implementation Notes

ApiService Package Structure

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)

SHARED Folder

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

Security & Middleware

  • 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.

Error Handling

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 SHARED project.
  • Use the MiddlewareException class to return a well-formatted, expected error response.

About

This is the backend server for the AI-SEA Project aka FU Capstone Project SU25. The project helps FPTU Student with enhancement their tracking academic progress with personalized and AI-Powered Features

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •