Welcome to the Bazaar Backend Project! This project is a modular architecture built with .NET 8, aimed at creating a highly maintainable and scalable application structure. The application follows a monolithic approach while ensuring that each module is decoupled and can evolve independently. It contains several domains like Admin, Catalog, Order, Users, and more, each serving a distinct responsibility in the application.
Key Features:
-
Modular Structure: Each module (Admin, Catalog, Order, Users, etc.) is self-contained.
-
Scalability: You can easily extend the app by adding new modules.
-
API Integration: Exposes RESTful APIs for each module to interact with other systems.
-
.NET 8 SDK: Make sure you have the .NET 8 SDK installed. You can get it from here.
-
Visual Studio Code: Recommended IDE for working on the project. Download VSCode.
-
Docker: Allows building, sharing and running container applications Download Docker.
To get this project up and running on your local machine, follow the steps below:
- .NET 8 SDK:
- Download and install the .NET 8 SDK from here.
- Visual Studio Code (VSCode):
-
Download and install Visual Studio Code.
-
Install the C# extension by OmniSharp for better development support in VSCode.
- Docker:
-
Download and install Download Docker.
-
Install the C# extension by Microsoft for better development support in VSCode.
- pgadmin (Recommended, but a terminal or Dbeaver can be used instead):
-
Download and install pgadmin.
-
pgAdmin provides a user-friendly interface for managing PostgreSQL databases.
-
After installation, launch pgAdmin and connect to your PostgreSQL instance.
-
Use the Query Tool to run SQL commands and manage your database efficiently.
Clone the repository to your local machine:
git clone
cd bazaar- Make sure your Docker application is open
- Open the project in VSCode
- Open a terminal in VSCode and run:
docker compose up - Open a terminal in VSCode and restore the project dependencies by running:
dotnet restore - After that, run the following commands:
dotnet ef database update -c UsersDbContextdotnet ef database update --context StoreDbContextdotnet ef database update --context CatalogDbContextdotnet ef database update --context OrdersDbContextdotnet ef database update --context NotificationsDbContextdotnet ef database update --context InventoryDbContextdotnet ef database update --context ReviewDbContextdotnet ef database update --context AdDbContextdotnet ef database update --context ConversationDbContextdotnet ef database update --context TicketingDbContextdotnet ef database update --context DeliveryDbContextdotnet ef database update --context LoyaltyDbContextdotnet ef database update --context LanguageDbContext
If these commands don't go through, run this before trying them again: dotnet tool install --global dotnet-ef
- To run the project locally, use the following command:
dotnet run, you may also use the key bindingsCtrl+Shift+Bfor building the project andCtrl+Shift+Dfor running and debugging the project.
You may figure out more about using the API by running the project and browsing the Swagger UI at https://localhost:7176/swagger/index.html
Using Swagger CodeGen you can auto generate Client APIs for the frontend applications from https://localhost:7176/swagger/v1/swagger.json
Run the following:
-
dotnet dev-certs https --trust -
dotnet run --launch-profile https
Toplevel you can trigger tests in
dotnet testPlease adhere to the SI guidlines