This repository provides a foundation for building a Book Store, Game Store, or Music Store web application using ASP.NET Core (.NET 8) with authentication already implemented.
- User registration and login with JWT authentication
- Role-based authorization (Administrator, Customer)
- Modular architecture (API, Application, Infrastructure layers)
- Entity Framework Core with SQL Server
- .NET 8 SDK
- SQL Server or Local Db
- Visual Studio 2022
Update the AppManagement.Api/appsettings.Development.json file with your SQL Server connection string:
"ConnectionStrings": {
"AppManagementConnectionString": "Server=YOUR_SERVER;Database=AppManagementDb;Trusted_Connection=True;MultipleActiveResultSets=true"
}Replace YOUR_SERVER, your_user, and your_password with your actual SQL Server details.
- Go to the top menu bar in Visual Studio.
- Set
AppManagement.Apias the startup project:- In Solution Explorer, right-click on the
AppManagement.Apiproject. - Select Set as Startup Project from the context menu.
- The project name will appear in bold, indicating it is now the startup project.
- In Solution Explorer, right-click on the
- Click Tools ➡️ NuGet Package Manager ➡️ Package Manager Console.
- Set Default project to
AppManagement.Infrastructure. - Run:
Update-Database -Context ApplicationIdentityDbContext- Open Git Bash and execute the following command to generate a secret key:
openssl rand -hex 32- Copy the generated keyvIn
AppManagement.Api/appsettings.Development.json, add a secret key for JWT authentication:
"JwtSettings": {
"Key": "SECRET_JWT_KEY_HERE"
... // other JWT settings
}- Run the application using Visual Studio (F5 or Ctrl+F5).
- Swagger UI is available at
https://localhost:7155/swaggerfor testing authentication endpoints.
POST /api/auth/login– User loginPOST /api/auth/register– User registration
Example request payloads can be found in the Swagger UI.
NB: The choice of project (Book Store, Game Store, or Music Store) will be made by your Project Buddy.
- Add domain models, controllers, and business logic for your chosen store.
- Implement product management, shopping cart, and order features as needed.
AppManagement.Api– API layer (controllers endpoints)AppManagement.Application– Application logic (interfaces, DTOs, services)AppManagement.Infrastructure– Data access, Identity
This project is licensed under the MIT License.