TheDailyLens Backend Documentation
Contents
- Project Overview
- Technologies & Tools
- Architecture
- Setup & Installation
- Authentication & Authorization
- Contribution Guidelines
TheDailyLens is a news website built with ASP.NET (C#) on the server side and Microsoft SQL Server as the database. This documentation covers all aspects of the backend implementation: architecture, data model, setup, and security.
- Framework: ASP.NET Core 8.0 (Web API)
- Language: C# 11.0
- Database: Microsoft SQL Server 2019
- ORM: Entity Framework Core 7.0
- Dependency Injection: Built-in ASP.NET Core DI container
- Authentication & Authorization: JWT (JSON Web Tokens) + ASP.NET Core Identity
- Configuration: appsettings.json / environment variables
The backend follows a layered architecture:
- Presentation Layer (Controllers): exposes RESTful API endpoints.
- Application Layer (Services): business logic and orchestration.
- Domain Layer (interfaces): interface for the Application Layer
- .NET 8.0 SDK
- SQL Server 2019 (local or remote)
- Git
-
Clone the repository:
git clone https://github.com//TheDailyLens.git cd TheDailyLens -
Set your database connection string:
"ConnectionStrings": { "DefaultConnection": "Server=.;Database=TheDailyLens;Trusted_Connection=True;" }
-
Configure JWT settings in
appsettings.json:"Jwt": { "Key": "<YourSecretKey>", "Issuer": "http://localhost:5110", "Audience": "http://localhost:5173", }
Run EF Core migrations:
dotnet ef database update- Users register and log in via JWT-based flow.
- Fork the repository and create a feature branch.
- Submit a pull request referencing an issue.