This repository contains the backend MVP of the University Online Printing System (“SefidSiah”), designed to provide an integrated, automated, and secure platform for students and professors to submit printing requests while allowing print office staff to manage and process them.
- User registration/login, file upload, and print configuration (paper size, duplex/simplex, color/BW, number of copies, etc.)
- Automatic price calculation based on office-defined rules
- Admin/print office panel for managing requests and pricing
- Order status tracking for users
- JWT-based authentication and role-based authorization
- Clean Architecture
- .NET 9 (ASP.NET Core 9) — Web API
- Entity Framework Core — ORM & migrations
- SQL Server (default:
localdb) - Swagger / Swashbuckle — API documentation & testing
- JWT (Bearer) — Authentication & authorization
- Clean Architecture — Layers: API / Application / ApplicationContract / Domain / Infrastructure / InfrastructureContract / Common
This project follows Clean Architecture principles:
SefidSiah.Backend/
🧷 SefidSiah.sln
📂 SefidSiah.API ← Web API (Program, Controllers, Middlewares, Swagger)
📂 SefidSiah.Application ← Use-cases & Services (Business logic)
📂 SefidSiah.ApplicationContract← DTOs, Interfaces (IService, IPrintOfficeService, …)
📂 SefidSiah.Domain ← Entities & Aggregates (User, PrintRequest, PrintOffice, …)
📂 SefidSiah.Infrastructure ← EF Core (DbContext, Repositories, UoW, Migrations), Auth helpers
📂 SefidSiah.InfrastructureContract ← Repository & UoW contracts
📂 SefidSiah.Common ← Enums (UserRole, PaperSize, BindingType, …)
Userwith roles:NormalPeople,Student,Professor,PrintOfficeStaff,AdminUniversity,PrintOffice,PrintOfficer,PrintOfficeWorkingHourPrintRequest,PrintOption,PrintFile,PrintOptionPrice
# 1) Restore dependencies
dotnet restore SefidSiah.Backend/SefidSiah.sln
# 2) Install EF tool if missing
dotnet tool install --global dotnet-ef
# 3) Apply migrations to DB
dotnet ef database update --project SefidSiah.Backend/SefidSiah.Infrastructure --startup-project SefidSiah.Backend/SefidSiah.API
# 4) Run API
dotnet run --project SefidSiah.Backend/SefidSiah.APISwagger will be available at
http://localhost:5xxx/swagger.
In SefidSiah.Backend/SefidSiah.API/appsettings.json:
{
"ConnectionStrings": {
"SefidSiahDB": "Server=(localdb)\\MSSQLLocalDB;Database=SefidSiahDB;Trusted_Connection=True"
}
}In appsettings.Development.json:
{
"Jwt": {
"Key": "nHg3cHE29dkm1VD82Slm7Zq93Kx74Pq9",
"Issuer": "SefidSiah",
"Audience": "SefidSiah"
}
}