Commit Graph

168 Commits

Author SHA1 Message Date
Ho Ngoc Hai
312bf360ea chore(docker): Migrate IAM service configuration to main docker-compose file
- Added IAM service configuration to the local docker-compose.yml for streamlined deployment.
- Removed the separate docker-compose.yml file from the IAM service directory to consolidate service definitions.
2026-01-13 19:26:56 +07:00
Ho Ngoc Hai
aafa1ae839 feat(docs): Update README with new registration and email confirmation details
- Added phone number field to the registration example in the API documentation.
- Included detailed response structure for registration and email verification endpoints.
- Updated email confirmation example to use email instead of userId for clarity.
- Enhanced two-factor authentication response to include manual entry key and recovery codes.
2026-01-13 19:07:39 +07:00
Ho Ngoc Hai
7d4958ec92 feat(two-factor): Enhance recovery code generation in TotpTwoFactorService
- Updated recovery code generation to use 12 bytes for base64 conversion, ensuring sufficient characters.
- Implemented fallback padding to guarantee a minimum length of 8 characters for generated codes.
- Adjusted formatting to maintain readability with XXXX-XXXX structure.
2026-01-13 19:01:15 +07:00
Ho Ngoc Hai
a25c9f4ad5 chore(configuration): Update email settings in appsettings.json for IAM service
- Changed SMTP configuration to use specific credentials and sender details for the GoodGo IAM service.
- Updated sender email and name to reflect the new service branding.
2026-01-13 18:57:54 +07:00
Ho Ngoc Hai
38aaf72be2 chore(configuration): Update appsettings for development and production environments
- Modified logging levels in `appsettings.Development.json` to enhance log visibility.
- Added Serilog configuration for structured logging and console output.
- Updated Redis connection settings for improved security and performance.
- Introduced email configuration settings for SMTP integration.
- Added two-factor authentication settings and social login configurations for Google and Facebook.
- Updated the default connection string in `appsettings.json` to match the new database setup.
2026-01-13 18:56:59 +07:00
Ho Ngoc Hai
c23c35844e refactor(authentication): Remove legacy login functionality and related models
- Deleted the `Login` method and associated `LoginRequest` and `LoginResponse` models from `AuthController.cs` to streamline authentication processes.
- This change simplifies the codebase by removing unused components related to the Resource Owner Password Grant flow.
2026-01-13 18:44:31 +07:00
Ho Ngoc Hai
afb756681e feat(authentication): Integrate JWT Bearer authentication and Swagger enhancements
- Added JWT Bearer authentication configuration in `Program.cs` for IAM service integration.
- Updated Swagger setup to include JWT Bearer security definition and requirements.
- Introduced a new Swagger UI client for testing with resource owner password grant type in `Config.cs`.
- Included necessary package reference for `Microsoft.AspNetCore.Authentication.JwtBearer` in the project file.
2026-01-13 12:24:41 +07:00
Ho Ngoc Hai
c7ca541c5f feat(storage-service): Integrate Swagger for API documentation and versioning
- Added Swagger support in `Program.cs` to enhance API documentation and enable annotations.
- Updated project file to generate XML documentation for Swagger and included the `Swashbuckle.AspNetCore.Annotations` package.
- Modified `FilesController` and `QuotaController` to support API versioning and updated route attributes accordingly.
2026-01-13 10:07:26 +07:00
Ho Ngoc Hai
d7852cde79 fix(storage-service): Update application URL in launch settings for local development
- Changed the application URL in `launchSettings.json` from `http://localhost:5000` to `http://localhost:5002` to avoid port conflicts during local development.
2026-01-13 02:29:42 +07:00
Ho Ngoc Hai
0b59b7d219 feat(storage-service): Update storage configuration and enhance service initialization
- Changed the default bucket name in `appsettings.Development.json` from "storage" to "goodgo" and updated MinIO endpoint and credentials for improved access.
- Modified the service initialization in `Program.cs` to include the environment name, enhancing configuration flexibility.
- Added a missing namespace in `CustomWebApplicationFactory.cs` for better test setup.
- Removed obsolete unit test files for `CreateSampleCommandHandler` and `SampleAggregate`, streamlining the test suite.
2026-01-13 02:27:18 +07:00
Ho Ngoc Hai
ee3cd7c770 feat(storage-service): Update connection settings and remove unused sample commands
- Updated `appsettings.Development.json` to change the database connection string for the storage service.
- Added `Microsoft.EntityFrameworkCore.Design` package reference to the project file for design-time features.
- Removed obsolete command and handler files related to sample management, including `ChangeSampleStatusCommand`, `CreateSampleCommand`, `UpdateSampleCommand`, and their respective handlers.
- Cleaned up the `SamplesController` and related query and validation files to streamline the codebase.
2026-01-13 01:57:37 +07:00
Ho Ngoc Hai
77898d6e27 feat(deployments): Extend IAM service routing in Docker Compose for role management
- Updated `docker-compose.yml` to include a new path prefix for roles in the IAM service routing configuration, enhancing API endpoint coverage for role management.
2026-01-13 01:11:47 +07:00
Ho Ngoc Hai
56143ae669 feat(deployments): Revise local environment configuration and Docker Compose for improved service integration
- Updated `.env` file to enhance shared environment variables, including detailed comments in both English and Vietnamese.
- Modified `docker-compose.yml` to disable the storage service and MinIO configuration, streamlining local development setup.
- Adjusted IAM service environment variables to align with the new `.env` structure, ensuring consistent configuration across services.
- Enhanced observability settings and added feature flags for better control over application behavior during development.
- Cleaned up commented-out sections in the Docker Compose file for clarity and maintainability.
2026-01-13 01:08:47 +07:00
Ho Ngoc Hai
71a5d8d4ed feat(deployments): Update local environment configuration for IAM service and Redis integration
- Modified local `.env` and `.env.local` files to include external Redis configuration and IAM service database connection details.
- Updated `docker-compose.yml` to disable local Redis service in favor of an external Redis instance.
- Added JWT configuration parameters for the IAM service, enhancing security and token management.
- Revised example environment file to reflect new configuration options for external services.
- Enhanced documentation to clarify setup instructions for local development with external dependencies.
2026-01-13 01:03:33 +07:00
Ho Ngoc Hai
4a1a0ef79c feat(storage-service): Add Social Service to Docker Compose and enhance IAM service integration
- Introduced a new social-service in the Docker Compose configuration for local development, including build context, environment variables, and health checks.
- Updated architecture documentation to reflect the new storage service structure and its components, including user storage quotas and file management.
- Enhanced README files to provide clearer instructions on service setup, configuration, and API endpoints for file storage management.
- Implemented caching mechanisms in the IAM service client for improved performance and reduced latency in user information retrieval.
- Updated appsettings for development to include caching settings for IAM service interactions.
2026-01-13 00:28:41 +07:00
Ho Ngoc Hai
928a22fe3e feat(authentication): Implement email verification, two-factor authentication, and social login features
- Added endpoints for sending and confirming email verification, enhancing user account security.
- Integrated two-factor authentication (2FA) with TOTP support, including enabling, verifying, and disabling 2FA.
- Implemented social login functionality for Google and Facebook, allowing users to authenticate using their existing accounts.
- Updated dependency injection to include services for email, 2FA, and social login.
- Enhanced documentation to reflect new features and usage examples for email verification and 2FA.
2026-01-12 23:07:53 +07:00
Ho Ngoc Hai
83b007c8ef docs: Update architecture and README documentation to reflect migration from OpenIddict to Duende IdentityServer
- Revised architecture documentation to replace OpenIddict references with Duende IdentityServer, including updates to diagrams and flow descriptions.
- Updated README files in both English and Vietnamese to reflect the change in the OAuth2/OIDC server from OpenIddict to Duende IdentityServer.
- Enhanced token management and authentication flow descriptions to align with the new identity server implementation.
2026-01-12 20:54:12 +07:00
Ho Ngoc Hai
12cbcd5d8e fix(authentication): Update JWT handling for ASP.NET Core 8 compatibility
- Replaced JwtSecurityToken with JsonWebToken in DependencyInjection.cs to align with ASP.NET Core 8+ requirements.
- Enhanced CustomWebApplicationFactory to configure minimal JWT validation and custom authentication handling for functional tests.
- Removed outdated tests that relied on InMemory Database limitations, ensuring a cleaner test suite.
- Updated RegisterUserCommandHandlerTests to throw DuplicateResourceException for better error handling.
2026-01-12 20:49:53 +07:00
Ho Ngoc Hai
93165f4549 feat(authentication): Migrate from OpenIddict to Duende IdentityServer for OAuth2 support
- Replaced OpenIddict references with Duende IdentityServer in the project, including updates to the API project and infrastructure.
- Refactored authentication and authorization logic in AuthController, LogoutCommandHandler, and related services to align with Duende IdentityServer's structure.
- Updated dependency injection configuration to register Duende IdentityServer components and JWT Bearer authentication.
- Enhanced functional tests to accommodate changes in authentication flow and ensure compatibility with the new identity server.
- Removed obsolete OpenIddict components and related code to streamline the project.
2026-01-12 20:29:15 +07:00
Ho Ngoc Hai
eb5cb28d9f feat(exceptions): Introduce custom exceptions for better error handling and validation
- Added custom exceptions: DuplicateResourceException, EntityNotFoundException, AuthenticationFailedException, and BusinessRuleException to improve error handling in the application.
- Updated Program.cs to map these exceptions to appropriate HTTP status codes and problem details for better client feedback.
- Refactored RegisterUserCommandHandler to throw DuplicateResourceException when a user with the same email already exists.
- Enhanced testing setup in CustomWebApplicationFactory to ensure proper handling of these exceptions during functional tests.
2026-01-12 20:04:38 +07:00
Ho Ngoc Hai
74f423992b feat(dependency-injection): Refactor DbContext registration and enhance testing setup
- Updated DependencyInjection.cs to conditionally register DbContext based on the environment, skipping registration in the Testing environment.
- Improved CustomWebApplicationFactory to remove existing DbContext and Redis registrations, ensuring a clean setup for tests.
- Added methods to streamline the removal of DbContext and Redis service registrations.
- Updated functional tests to include better logging and error handling for unexpected responses.
- Bumped Microsoft.EntityFrameworkCore.InMemory package version to 10.0.1 for compatibility.
- Removed obsolete SamplesControllerTests file to clean up the test suite.
2026-01-12 19:18:19 +07:00
Ho Ngoc Hai
616bd9ede9 feat(api): Refactor Program.cs for improved service configuration and logging
- Reorganized the Program.cs file to streamline service configuration, including Serilog setup, API versioning, and health checks.
- Added logging configuration to set a minimum logging level for tests, reducing output noise.
- Enhanced Swagger integration with detailed API documentation and OAuth2 security definitions.
- Implemented ProblemDetails middleware for better error handling and added support for health check endpoints.
2026-01-12 19:12:07 +07:00
Ho Ngoc Hai
fdcc24bdf4 feat(infrastructure): Enhance dependency injection for Redis caching and add InMemory cache service for testing
- Updated AddInfrastructure method to accept an environment name parameter for conditional Redis caching configuration.
- Implemented logic to skip Redis caching setup in the Testing environment.
- Added InMemoryCacheService for testing purposes, providing a mock implementation of ICacheService.
- Enhanced TransactionBehavior to skip transactions for InMemory databases.
- Updated functional tests to remove Redis-related services and ensure proper database setup for testing.
2026-01-12 19:04:49 +07:00
Ho Ngoc Hai
ba928022cb feat(docs): Update architecture and caching documentation
- Added detailed sections on distributed caching architecture, including caching overview, ICacheService interface, and caching strategies for tokens and sessions.
- Enhanced documentation with mermaid diagrams to illustrate caching flows and key patterns.
- Updated Redis configuration instructions in the README, including environment variable setup and usage examples for caching operations.
- Removed outdated notes from the NOTE.MD file to streamline content and focus on relevant tasks and proposals.
2026-01-12 18:48:50 +07:00
Ho Ngoc Hai
bb4cf4884c feat(redis): Implement Redis caching and update configuration
- Added Redis caching support to the IAM service, including configuration settings in `appsettings.json` and environment variables.
- Introduced `ICacheService` interface for caching operations and implemented `RedisCacheService`.
- Updated documentation to include Redis setup instructions and usage examples for caching user data and token management.
- Enhanced user account management by adding an `Activate` method to the `ApplicationUser` class.
- Fixed assertions in unit tests to reflect the updated user status after activation.
2026-01-12 18:45:31 +07:00
Ho Ngoc Hai
079b24f683 feat(api): Enhance OAuth2 token endpoint and debugging capabilities
- Added debug middleware for /connect/* endpoints to log request and response details for better troubleshooting.
- Updated OAuth2 configuration to include "offline_access" scope and disabled access token encryption for development.
- Improved DbContext registration in tests by removing all related registrations and ensuring in-memory database setup for testing purposes.
- Addressed issues with the /connect/token endpoint not responding, outlining next steps for debugging and fixing the OpenIddict configuration.
2026-01-12 18:22:47 +07:00
Ho Ngoc Hai
435e5c2dfa feat(docs): Add database migration instructions and Neon setup details
- Introduced comprehensive sections on database migrations in the README files for English and Vietnamese documentation, including prerequisites, migration creation, and application steps.
- Added instructions for setting up the Neon database, including connection string configuration in `appsettings.Development.json`.
- Updated the `appsettings.Development.json` file with a default connection string for the Neon database and added Redis configuration.
- Included additional EF Core commands for managing migrations in the Vietnamese documentation.
2026-01-12 17:52:35 +07:00
Ho Ngoc Hai
9168a5f734 feat(docs): Update authentication flow documentation and improve clarity
- Revised IAM service documentation to reflect recent changes in the authentication flow, including user registration and token management.
- Enhanced API documentation with clearer examples and updated architecture diagrams for better understanding.
- Added comprehensive sections on OAuth2 grant types and user management to assist developers.
- Streamlined Vietnamese documentation for consistency and improved accessibility.
2026-01-12 16:59:06 +07:00
Ho Ngoc Hai
4ae24a7bc8 feat(docs): Revamp IAM service documentation and authentication flow
- Updated README and architecture documentation to reflect the new authentication flow, including user registration, login, token management, and logout processes.
- Enhanced API documentation with detailed examples for each step of the authentication process, including curl commands and expected responses.
- Improved clarity in the architecture diagrams, outlining the interaction between clients, API, application, and infrastructure layers.
- Added sections on OAuth2 grant types and user management functionalities to provide comprehensive guidance for developers.
- Streamlined Vietnamese documentation to ensure consistency with English updates and improve accessibility for users.
2026-01-12 16:37:31 +07:00
Ho Ngoc Hai
c621afbb74 feat(api): Enhance authentication and user management endpoints
- Updated API documentation to include new user management features such as password change and logout functionalities.
- Added detailed descriptions and examples for OAuth2 token endpoint, supporting password, refresh token, and client credentials grants.
- Introduced new endpoints for user management, including retrieving, updating, and deleting users.
- Enhanced Swagger annotations for better clarity and usability of the API documentation.
- Implemented response models for password change and logout operations to standardize API responses.
2026-01-12 16:25:54 +07:00
Ho Ngoc Hai
07cb482edc fix(config): Update application URL in launchSettings.json for development environment
- Changed the application URL from http://localhost:5000 to http://localhost:5001 to align with updated service configurations.
- This adjustment ensures proper routing during local development.
2026-01-12 14:04:36 +07:00
Ho Ngoc Hai
b9065fe858 feat(docs): Enhance API documentation and Swagger integration
- Enabled XML documentation generation for improved API documentation.
- Updated API descriptions and added detailed endpoint information for better clarity.
- Introduced Swagger annotations for authentication and user management endpoints.
- Enhanced response types and added pagination information in user-related responses.
- Included contact and license information in the API metadata for better transparency.
2026-01-12 13:52:12 +07:00
Ho Ngoc Hai
07f96a8eb2 feat(docs): Enhance Vietnamese documentation with new sections and updates
- Added new sections on API Design, Caching Patterns, and Testing Patterns to the Vietnamese documentation.
- Updated sidebar configurations for improved navigation and accessibility.
- Removed outdated onboarding guides to streamline content and focus on relevant resources.
2026-01-12 13:36:53 +07:00
Ho Ngoc Hai
c046ed0a06 feat(docs): Expand skills and runbooks sections in VitePress configuration
- Added new 'Skills' and 'Runbooks' sections to both English and Vietnamese documentation, enhancing the navigation structure.
- Included detailed items under the 'Skills' section, covering various topics such as API Design, Caching Patterns, and Testing Patterns.
- Updated sidebar configurations to improve user experience and accessibility of resources.
- Removed outdated onboarding guides to streamline documentation and focus on relevant content.
2026-01-12 12:59:08 +07:00
Ho Ngoc Hai
56ab019ef2 fix(docs): Update Vietnamese templates section and remove outdated README files
- Changed the label from 'Mẫu' to 'Templates' in the Vietnamese documentation for consistency.
- Deleted outdated README.md files for both English and Vietnamese templates to streamline documentation and reduce clutter.
- This update aims to enhance clarity and maintain a more organized structure in the documentation.
2026-01-12 12:55:56 +07:00
Ho Ngoc Hai
ea461e0c05 feat(cleanup): Remove obsolete vitepress-docs and web-docs files
- Deleted various files and directories from vitepress-docs and web-docs, including configuration files, cache dependencies, and documentation files, to streamline the project structure.
- This cleanup aims to enhance maintainability and reduce clutter by removing unused or outdated components.
2026-01-12 12:49:51 +07:00
Ho Ngoc Hai
2e61c45620 feat(deps): Update pnpm-lock.yaml with new dependencies and versions
- Added new devDependencies for vitepress-docs, including mermaid, vitepress, vitepress-plugin-mermaid, and vue.
- Updated existing dependencies for vitepress and vue to their latest versions.
- Introduced several new Algolia client packages with specific versions to enhance search capabilities.
- Cleaned up and organized the lock file to reflect the latest package resolutions and integrity checks.
2026-01-12 12:49:04 +07:00
Ho Ngoc Hai
1e22e83879 feat(docs): Streamline Vietnamese documentation with updated diagrams and sections
- Enhanced Mermaid diagrams for better visual clarity and consistency across guides.
- Added new sections on caching, data consistency, and observability patterns to the architecture documentation.
- Improved formatting and structure to align with the English version, ensuring a cohesive user experience.
- Removed outdated service communication documentation to reduce clutter and focus on relevant content.
2026-01-12 12:31:55 +07:00
Ho Ngoc Hai
ec59262411 feat(docs): Remove outdated analysis files to streamline documentation
- Deleted several analysis files including breaking-changes.txt, docs-audit-matrix.md, docs-changes.txt, features.txt, git-history.txt, iam-architecture.md, patterns-comparison.md, template-architecture.md to reduce clutter and focus on relevant content.
- This cleanup aims to enhance usability and maintain a more organized documentation structure.
2026-01-12 12:26:20 +07:00
Ho Ngoc Hai
752594d00a feat(cleanup): Remove app-admin module and associated files
- Deleted the entire app-admin module, including .gitignore, Dockerfile, pubspec.yaml, README.md, and main.dart files.
- This cleanup aims to streamline the project by removing unused components and reducing clutter.
2026-01-12 12:25:54 +07:00
Ho Ngoc Hai
66d87ac865 feat(docs): Remove ARCHITECTURE.md and README.md for project simplification
- Deleted ARCHITECTURE.md and README.md files to streamline the project structure and eliminate outdated documentation.
- This change aims to enhance usability and focus on more relevant resources for users.
2026-01-12 12:22:54 +07:00
Ho Ngoc Hai
aa7a0d9ee2 feat(docs): Revise .env.example and architecture documentation for clarity and updates
- Simplified the .env.example file by removing outdated comments and consolidating environment variable descriptions.
- Updated the architecture documentation to reflect the new structure and components of the .NET 10 microservice template.
- Enhanced clarity in the README.md to provide a more comprehensive overview of the template's features and requirements.
- Removed obsolete appsettings files to streamline the project structure and improve usability.
2026-01-10 21:52:09 +07:00
Ho Ngoc Hai
2cfbd0706f feat(docs): Add Redis Cache integration details to Vietnamese documentation
- Updated README.md to include Redis Cache integration as a new feature.
- Enhanced DependencyInjection.cs to register Redis Cache services and connection settings.
- Improved clarity in Vietnamese documentation regarding Clean Architecture principles.
2026-01-10 21:24:18 +07:00
Ho Ngoc Hai
0b0241143a feat(docs): Enhance Vietnamese documentation with updated diagrams and troubleshooting sections
- Improved Mermaid diagrams for better visual clarity and consistency across guides.
- Added detailed troubleshooting sections to assist users in diagnosing common issues effectively.
- Updated formatting and structure to align with the English version, ensuring consistency.
- Included quick tips and common issues sections to facilitate user navigation.
2026-01-10 21:21:41 +07:00
Ho Ngoc Hai
4e595d0746 feat(docs): Remove outdated service templates and enhance Vietnamese architecture documentation
- Deleted obsolete service architecture templates in both English and Vietnamese to streamline content.
- Updated the Vietnamese architecture documentation with improved Mermaid diagrams for better visual clarity.
- Enhanced color coding in diagrams to improve readability and consistency across documentation.
- Added a new section detailing visual indicators for better understanding of architecture components.
2026-01-10 21:00:02 +07:00
Ho Ngoc Hai
b89e07f4cb feat(docs): Update Mermaid diagrams and enhance Vietnamese architecture documentation
- Changed the Mermaid theme from 'default' to 'base' for improved visual consistency.
- Expanded the architecture documentation by adding new sections on caching, data consistency, and observability patterns.
- Enhanced existing diagrams with clearer color coding and class definitions for better readability.
- Removed outdated service communication documentation to streamline content.
- Included quick tips and common issues sections to assist users in navigating the documentation effectively.
2026-01-10 17:42:19 +07:00
Ho Ngoc Hai
be99b99dd3 feat(docs): Update Mermaid diagrams in Vietnamese guides for improved clarity and visual appeal
- Enhanced Mermaid diagrams in the troubleshooting and workflow sections with clearer labels and emoji for better readability.
- Standardized the formatting of flowchart elements to ensure consistency across documentation.
- Improved the overall visual representation to align with recent updates in the English version.
2026-01-10 17:02:20 +07:00
Ho Ngoc Hai
a7397b1065 feat(docs): Revise Vietnamese documentation with updated workflow steps and new sections
- Reorganized workflow steps for clarity, including renumbering and standardizing the verification process.
- Added new sections for quick tips and common issues to enhance user navigation.
- Improved formatting and structure to align with the English version, ensuring consistency across documentation.
2026-01-08 17:13:18 +07:00
Ho Ngoc Hai
9ba4a478ee feat(docs): Enhance deployment and development guides with improved clarity and structure
- Updated Mermaid diagrams in the deployment and development guides for better visual representation and consistency.
- Improved formatting and clarity in the Kubernetes local deployment and IAM migration guides, including detailed workflows and troubleshooting sections.
- Enhanced the Vietnamese documentation to align with the English version, ensuring consistency across guides.
- Added quick tips and common issues sections to facilitate user navigation and understanding.
2026-01-08 17:10:06 +07:00
Ho Ngoc Hai
70d90d36e0 refactor(docs): Remove outdated time estimates from Kubernetes and local development guides
- Eliminated time estimates from the introductory sections of the Kubernetes local deployment and local development guides for a cleaner presentation.
- Focused on enhancing the clarity and conciseness of the documentation without altering the core content.
2026-01-08 17:07:30 +07:00