How ahmadmdabit/sinavolusturma works
Project Type and Purpose
• This is a full-stack, N-Tier web application for creating and taking exams.
• Technologies:
– UI: ASP.NET Core MVC (Razor pages, controllers, views, static assets)
– API: ASP.NET Core Web API (REST controllers, JWT authentication)
– BLL: Business logic library (services, policies)
– DAL: Data access library (repositories, entities)
– Common: Shared helpers, extensions, result wrappers
– Database: SQLite (file-based, stored under API/App_Data)
File Structure
Top-level modules:
• UI/ – MVC web front-end with controllers, Razor views, static assets, JWT middleware
• API/ – REST API with controllers (Answer, Exam, Question, User, etc.), JWT auth helpers, SQLite DB file
• BLL/ – Business layer classes handling use cases, validation, mapping
• DAL/ – Repository layer interacting with SQLite via entities & repositories
• Common/ – Shared DTOs, extension methods, ApiResult wrappers
Configuration & cross-cut concerns:
• appsettings.json (connection strings, JWT settings)
• Startup.cs in both UI and API (DI container, middleware pipelines)
• JwtMiddleware, AllowAnonymous/Authorize attributes
Extract Additional Insights from README
• Confirms N-Tier architecture
• SQLite DB stored in API/App_Data
• Two startup projects: UI and API
• Authentication flows: Admin vs. normal user
a. Main Components
1. Client Browser
2. UI Web App (ASP.NET Core MVC)
3. API Service (ASP.NET Core Web API)
4. Business Logic Layer (BLL)
5. Data Access Layer (DAL)
6. SQLite Database
7. Shared Common Library (used by API, BLL, DAL)
b. Relationships & Data Flows
– Browser ↔ UI: HTTPS requests for pages & static assets; form submissions
– UI → API: HTTP calls for data (exams, questions, authentication) carrying JWT tokens
– API → BLL: Direct method calls via DI to perform business operations
– BLL → DAL: Repository calls to CRUD entities
– DAL → SQLite: SQL commands to read/write the DB file
– Authentication:
• User login request → API/AuthController → BLL.Authenticate → DAL.UserRepository → returns user
• API issues JWT → UI stores token (cookie or session) → passed on subsequent API calls
c. Key Architectural Patterns
• Layered (N-Tier) Architecture
• Repository Pattern (DAL/Repositories/Base)
• Dependency Injection (Startup.cs registers all layers)
• JWT-Based Authentication & Authorization
• Separation of Concerns (UI vs API vs BLL vs DAL)
d. Technologies & Frameworks
• ASP.NET Core 3.1 (MVC + Web API)
• Entity Framework Core (or lightweight SQLite access)
• SQLite (file-based DB)
• JWT (custom JwtMiddleware, attributes)
• Razor Views, Bootstrap, jQuery (UI)
Detailed Element Checklist
• Actors: Admin, Student
• Client: Web Browser
• UI Application: Controllers, Views, JWT middleware
• API Service: Controllers, BLL calls, JWT generation/validation
• BLL: Business services (AnswerBusiness, ExamBusiness, etc.)
• DAL: Repositories (AnswerRepository, ExamRepository, etc.)
• Database: SQLite file (DB.db)
• Shared Common library: ApiResult, AppSettings, Extensions