Skip to content

Commit e8e487a

Browse files
committed
chore: update README and src
1 parent 7ff64cc commit e8e487a

18 files changed

Lines changed: 179 additions & 90 deletions

File tree

.github/workflows/bild-and-deploy.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
pull_request:
8-
branches:
9-
- main
107

118
jobs:
129
detect-changes:
@@ -948,13 +945,6 @@ jobs:
948945
tags: ${{ vars.DOCKERHUB_USERNAME }}/app-admin:latest,${{ vars.DOCKERHUB_USERNAME }}/app-admin:${{ github.sha }}
949946
cache-from: type=registry,ref=${{ vars.DOCKERHUB_USERNAME }}/app-admin:buildcache
950947
cache-to: type=registry,ref=${{ vars.DOCKERHUB_USERNAME }}/app-admin:buildcache,mode=max
951-
build-args: |
952-
VITE_KEYCLOAK_URL=${{ secrets.VITE_KEYCLOAK_URL }}
953-
VITE_KEYCLOAK_REALM=${{ secrets.VITE_KEYCLOAK_REALM }}
954-
VITE_KEYCLOAK_CLIENT_ID=${{ secrets.VITE_KEYCLOAK_CLIENT_ID }}
955-
VITE_KEYCLOAK_REDIRECT_URI=${{ secrets.VITE_KEYCLOAK_REDIRECT_URI }}
956-
VITE_KEYCLOAK_BASE_URL=${{ secrets.VITE_KEYCLOAK_BASE_URL }}
957-
VITE_API_GATEWAY=${{ secrets.VITE_API_GATEWAY }}
958948

959949
build-app-store:
960950
needs: detect-changes
@@ -986,13 +976,6 @@ jobs:
986976
tags: ${{ vars.DOCKERHUB_USERNAME }}/app-store:latest,${{ vars.DOCKERHUB_USERNAME }}/app-store:${{ github.sha }}
987977
cache-from: type=registry,ref=${{ vars.DOCKERHUB_USERNAME }}/app-store:buildcache
988978
cache-to: type=registry,ref=${{ vars.DOCKERHUB_USERNAME }}/app-store:buildcache,mode=max
989-
build-args: |
990-
VITE_KEYCLOAK_URL=${{ secrets.VITE_KEYCLOAK_URL }}
991-
VITE_KEYCLOAK_REALM=${{ secrets.VITE_KEYCLOAK_REALM }}
992-
VITE_KEYCLOAK_CLIENT_ID=${{ secrets.VITE_KEYCLOAK_CLIENT_ID }}
993-
VITE_KEYCLOAK_REDIRECT_URI=${{ secrets.VITE_KEYCLOAK_REDIRECT_URI }}
994-
VITE_KEYCLOAK_BASE_URL=${{ secrets.VITE_KEYCLOAK_BASE_URL }}
995-
VITE_API_GATEWAY=${{ secrets.VITE_API_GATEWAY }}
996979

997980
# Infrastructure Jobs
998981
build-api-gateway:

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: CI - Main Workflow
22

33
on:
4-
push:
5-
branches:
6-
- main
74
pull_request:
85
branches:
96
- main

CONTRIBUTING.md

Lines changed: 68 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,97 @@
11
# Contributing to ProG Coder Shop Microservices
22

3-
We welcome contributions to the ProG Coder Shop Microservices project! This document provides guidelines for contributing.
3+
Thank you for your interest in contributing to ProG Coder Shop Microservices! This guide will help you get started with building, testing, and contributing to the project.
44

5-
## How to Report Bugs
5+
## Table of Contents
66

7-
If you find a bug, please create an issue on GitHub with:
8-
- A clear description of the problem
9-
- Steps to reproduce the issue
10-
- Expected vs actual behavior
11-
- Your environment details (OS, .NET version, Docker version)
7+
- [Contributing to ProG Coder Shop](#contributing-to-prog-coder-shop-microservices)
8+
- [Table of Contents](#table-of-contents)
9+
- [Prerequisites](#prerequisites)
10+
- [Required](#required)
11+
- [Optional](#optional)
12+
- [Getting Started](#getting-started)
13+
- [Building the Project](#building-the-project)
14+
- [Testing](#testing)
15+
- [Quick Local Testing](#quick-local-testing)
16+
- [Project Structure](#project-structure)
17+
- [Code Style](#code-style)
18+
- [Questions or Issues?](#questions-or-issues)
1219

13-
## How to Submit Pull Requests
20+
## Prerequisites
1421

15-
1. Fork the repository
16-
2. Create a new branch for your feature or bugfix (`git checkout -b feature/your-feature-name`)
17-
3. Make your changes
18-
4. Test your changes thoroughly
19-
5. Commit your changes with clear commit messages (see Commit Style below)
20-
6. Push to your fork
21-
7. Submit a pull request to the main repository
22-
23-
## Commit Style
24-
25-
We follow the [Conventional Commits](https://www.conventionalcommits.org/) specification.
22+
### Required
2623

27-
### Format
24+
- **[.NET SDK 8.0+](https://dotnet.microsoft.com/download/dotnet/8.0)** (specified in `src/Directory.Build.props`)
25+
- **[Docker Desktop](https://www.docker.com/products/docker-desktop)** (required for running services and infrastructure)
2826

29-
```
30-
<type>(<scope>): <subject>
31-
```
27+
### Optional
3228

33-
### Types
29+
- **[Node.js](https://nodejs.org/)** (v18+ recommended) - Required if you plan to work on the frontend applications in `src/Apps/`
30+
- **[Just](https://github.com/casey/just)** - Command runner (if you prefer using automation scripts)
3431

35-
- **feat**: New feature
36-
- **fix**: Bug fix
37-
- **docs**: Documentation changes
38-
- **style**: Code formatting (no logic change)
39-
- **refactor**: Code restructuring
40-
- **perf**: Performance improvements
41-
- **test**: Test changes
42-
- **build**: Build system changes
43-
- **ci**: CI/CD changes
44-
- **chore**: Miscellaneous changes
32+
## Getting Started
4533

46-
### Scope (Optional)
34+
0. (Optional) Comment on the related issue you want to work on
35+
1. Fork the repository
36+
2. Make a branch
37+
3. Make your changes
38+
4. Push the branch
39+
5. Make a pull request
4740

48-
Service or component name: `catalog`, `basket`, `order`, `inventory`, `discount`, `notification`, `search`, `report`, `api-gateway`, `frontend`, etc.
41+
- There is a [**good first issue**](https://github.com/huynxtb/progcoder-shop-microservices/labels/good%20first%20issue) label for open issues
4942

50-
### Examples
43+
## Building the Project
5144

5245
```bash
53-
# Feature
54-
feat(catalog): add MinIO image upload
46+
# Builds the whole solution
47+
dotnet build
48+
```
5549

56-
# Bug fix
57-
fix(order): correct discount calculation
50+
## Testing
5851

59-
# Documentation
60-
docs(readme): update setup instructions
52+
### Quick Local Testing
6153

62-
# Multiple services
63-
refactor(catalog,inventory): extract common validation
54+
For most development work, you can simply run:
6455

65-
# No scope
66-
chore: update dependencies
56+
```bash
57+
# Run all tests
58+
dotnet test
6759
```
6860

69-
### Rules
61+
### GitHub Actions Testing
62+
63+
The project uses GitHub Actions for continuous integration:
64+
65+
1. **CI Pipeline** (automatic)
66+
- Triggers automatically on pull requests
67+
- Runs validation for code quality, formatting, and tests.
7068

71-
- Use imperative mood: "add" not "added"
72-
- Keep subject under 50 characters
73-
- No period at the end
74-
- Reference issues: `Closes #123`, `Fixes #456`
69+
## Project Structure
70+
71+
```
72+
progcoder-shop-microservices/
73+
├── src/
74+
│ ├── ApiGateway/ # YARP API Gateway
75+
│ ├── Apps/ # Frontend Applications (React/Next.js)
76+
│ ├── JobOrchestrator/ # Background Jobs (Quartz.NET)
77+
│ ├── Services/ # Microservices (Basket, Catalog, Order, etc.)
78+
│ └── Shared/ # Shared libraries (Common, BuildingBlocks)
79+
├── test/ # Test projects
80+
├── .github/ # GitHub Actions workflows
81+
├── docker-compose.yml # Docker composition for services
82+
└── samples/ # Sample files
83+
```
7584

7685
## Code Style
7786

78-
- Follow standard .NET coding conventions
79-
- Use meaningful variable and method names
80-
- Add comments for complex logic
81-
- Ensure your code builds without warnings
82-
- Run code formatter before committing (if available)
87+
The project enforces consistent code style:
8388

84-
## Questions?
89+
- **Formatting**: We follow standard .NET coding conventions.
90+
- **Editor Configuration**: `.editorconfig` defines coding conventions enforced by the build.
91+
- **Regions**: We use `#region` directives for organizing code (e.g., `#region using`, `#region Properties`).
8592

86-
If you have questions, feel free to open a GitHub issue or discussion.
93+
## Questions or Issues?
8794

88-
Thank you for contributing!
95+
Check out [GitHub Issues](https://github.com/huynxtb/progcoder-shop-microservices/issues) or [discussions](https://github.com/huynxtb/progcoder-shop-microservices/discussions).
8996

97+
Thank you for contributing to ProG Coder Shop Microservices!

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 ProG Coder
3+
Copyright (c) 2026 ProG Coder
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,50 @@ Created by [**ProG Coder**](https://www.progcoder.com)
1212
1313
---
1414

15+
## 📋 Table of Contents
16+
17+
- [Project Overview](#-project-overview)
18+
- [Architecture Diagram](#architecture-diagram)
19+
- [Technology Stack, Design Patterns, Infrastructure & Architecture](#technology-stack-design-patterns-infrastructure--architecture)
20+
- [Infrastructure](#infrastructure)
21+
- [Back-end](#back-end)
22+
- [Front-end](#front-end)
23+
- [Design Patterns](#design-patterns)
24+
- [Architecture](#architecture)
25+
- [Microservices Overview](#microservices-overview)
26+
- [Infrastructure Services](#infrastructure-services)
27+
- [Web Applications](#web-applications)
28+
- [Web UI Screenshots](#web-ui-screenshots)
29+
- [Project Structure](#project-structure)
30+
- [Architecture & Design Patterns](#architecture--design-patterns)
31+
- [Clean Architecture](#clean-architecture)
32+
- [Domain-Driven Design (DDD)](#domain-driven-design-ddd)
33+
- [CQRS](#cqrs-command-query-responsibility-segregation)
34+
- [Event-Driven Architecture](#event-driven-architecture)
35+
- [Saga Pattern](#saga-pattern)
36+
- [CI/CD Pipeline](#cicd-pipeline)
37+
- [Observability & Monitoring](#observability--monitoring)
38+
- [Data Infrastructure](#data-infrastructure)
39+
- [Getting Started](#getting-started)
40+
- [Prerequisites](#prerequisites)
41+
- [Environment Configuration](#environment-configuration)
42+
- [Quick Start](#quick-start-productiontesting-mode)
43+
- [Development Mode](#development-mode)
44+
- [Access URLs](#access-urls)
45+
- [Default Credentials](#default-credentials)
46+
- [API Gateway Routes](#api-gateway-routes)
47+
- [Development](#development)
48+
- [Running Individual Services](#running-individual-services)
49+
- [Running Tests](#running-tests)
50+
- [Database Migrations](#database-migrations)
51+
- [Building Docker Images](#building-docker-images)
52+
- [Troubleshooting](#troubleshooting)
53+
- [Contributing](#contributing)
54+
- [License](#license)
55+
56+
---
57+
58+
1559
## 🚀 Project Overview
1660

1761
This repository contains a comprehensive suite of microservices implementing a complete **e-commerce platform**, including **Catalog, Basket, Order, Inventory, Discount, Notification, Search, Report, and Communication** services. The platform utilizes a hybrid database strategy with **NoSQL (MongoDB, Redis)** and **Relational databases (PostgreSQL, SQL Server, MySQL)**.

progcoder-shop-microservices.sln

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
2121
.env = .env
2222
.env.sample = .env.sample
2323
.gitignore = .gitignore
24-
Courses.md = Courses.md
2524
src\Directory.Build.props = src\Directory.Build.props
2625
src\Directory.Packages.props = src\Directory.Packages.props
2726
docker-compose.infrastructure.yml = docker-compose.infrastructure.yml
2827
docker-compose.yml = docker-compose.yml
29-
LICENSE = LICENSE
30-
README.md = README.md
3128
EndProjectSection
3229
EndProject
3330
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Search", "Search", "{D54B29E6-15C1-4D82-B836-097C82983DEE}"

src/Services/Basket/Core/Basket.Application/Dtos/Baskets/BasketCheckoutAddressDto.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ namespace Basket.Application.Dtos.Baskets;
22

33
public sealed record BasketCheckoutAddressDto
44
{
5+
#region Fields, Properties and Indexers
6+
57
public string AddressLine { get; init; } = default!;
68

79
public string Subdivision { get; init; } = default!;
@@ -13,6 +15,8 @@ public sealed record BasketCheckoutAddressDto
1315
public string Country { get; init; } = default!;
1416

1517
public string PostalCode { get; init; } = default!;
18+
19+
#endregion
1620
}
1721

1822

src/Services/Basket/Core/Basket.Application/Dtos/Baskets/BasketCheckoutCustomerDto.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ namespace Basket.Application.Dtos.Baskets;
22

33
public sealed record BasketCheckoutCustomerDto
44
{
5+
#region Fields, Properties and Indexers
6+
57
public string Name { get; init; } = default!;
68

79
public string Email { get; init; } = default!;
810

911
public string PhoneNumber { get; init; } = default!;
12+
13+
#endregion
1014
}
1115

1216

src/Services/Basket/Core/Basket.Application/Dtos/Baskets/BasketCheckoutItemDto.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ namespace Basket.Application.Dtos.Baskets;
22

33
public sealed record BasketCheckoutItemDto
44
{
5+
#region Fields, Properties and Indexers
6+
57
public Guid ProductId { get; init; }
68

79
public int Quantity { get; init; }
10+
11+
#endregion
812
}
913

1014

src/Services/Basket/Core/Basket.Domain/Attributes/BsonCollectionAttribute.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,18 @@
33
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
44
public class BsonCollectionAttribute : Attribute
55
{
6+
#region Fields, Properties and Indexers
7+
68
public string CollectionName { get; }
79

10+
#endregion
11+
12+
#region Ctors
13+
814
public BsonCollectionAttribute(string collectionName)
915
{
1016
CollectionName = collectionName;
1117
}
18+
19+
#endregion
1220
}

0 commit comments

Comments
 (0)