Ho Ngoc Hai
6061164873
feat: add multi-tenant row-level security across 5 services and 96 FnB engine unit tests
...
Security (P0-5):
- Implement ITenantProvider + HttpContextTenantProvider per service (order, fnb, inventory, catalog, wallet)
- Add EF Core global query filters for tenant isolation (shop_id/user_id based)
- Add TenantMiddleware setting PostgreSQL session variables for RLS
- Create PostgreSQL RLS policies script (scripts/db/rls-policies.sql)
- Adapter pattern bridges API-layer to Infrastructure-layer (Clean Architecture)
- Bypass mechanisms for admin roles, service-to-service calls, and migrations
Testing (P1-12):
- Add 96 unit tests for fnb-engine (up from 3)
- 57 domain entity tests: Table(18), KitchenTicket(12), Session(8), Reservation(13), Recipe(6)
- 39 command handler tests: CRUD operations, status transitions, validation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-06 13:40:34 +07:00
Ho Ngoc Hai
8af86e9e89
feat: implement Phase 1 payment gateway, real-time SignalR, kitchen-inventory deduction, and order payment flow
...
- wallet-service: IPaymentGateway abstraction + VN Pay implementation (HMAC-SHA512, sandbox), Payment aggregate root, PaymentsController with create/callback/query endpoints
- order-service: PosHub SignalR hub with Redis backplane + MessagePack, strongly-typed clients, 3 group types (shop/kds/pos), integrated into Create/Pay/Complete/Cancel order handlers
- fnb-engine + inventory-service: Kitchen→Inventory auto-deduction via domain events, HTTP with Polly retry + circuit breaker, idempotency check, graceful degradation on insufficient stock
- order-service: Enhanced PayOrderCommand with 3 flows (cash/card/online), PaymentPending status, WalletServiceClient, CompleteOrderPaymentCommand for gateway callbacks
- POS frontend: Cash/Card/QR payment components wired to real backend, BFF proxy updated
- infra: Traefik routes for fnb-engine, inventory-service, and SignalR WebSocket hub
- ROADMAP.md: Updated with Phase 1 progress tracking
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-06 13:28:46 +07:00
Ho Ngoc Hai
fd75da34dc
feat: enhance inventory management with new item types, stocktake, wastage, and recipe-based deductions
2026-03-05 22:28:45 +07:00
Ho Ngoc Hai
91a219d65f
feat: implement hourly rates for tables/rooms, add shop publishing, and introduce system health checks.
2026-03-05 12:09:28 +07:00
Ho Ngoc Hai
cd979970e7
feat(fnb, tpos): implement table QR code scanning for customer menu and reservation management
2026-03-05 08:28:32 +07:00
Ho Ngoc Hai
0901e91673
feat(pos): implement table-based ordering, kitchen ticket workflow, and table floor plan management
2026-03-05 07:53:00 +07:00
Ho Ngoc Hai
802c03995a
feat(order-processing): execute order item strategies during order creation and add kitchen ticket API with session management.
2026-03-05 06:19:18 +07:00
Ho Ngoc Hai
a4f4c4755e
feat(fnb-reservation): implement reservation management with API, infrastructure, and TPOS client UI.
2026-03-05 05:39:02 +07:00
Ho Ngoc Hai
c0301a22e5
feat(pos): Display empty state messages for resource grids and implement shop-specific staff management in POS views.
2026-03-05 05:03:28 +07:00
Ho Ngoc Hai
629fed8a55
commit
2026-03-05 01:39:40 +07:00
Ho Ngoc Hai
051261accd
feat: implement recipe management, inventory operations, voucher integration, and order discounts
2026-03-04 20:05:38 +07:00
Ho Ngoc Hai
89bd8232a8
feat: Implement Blazor lifecycle improvements, enhance navigation with browser history, and update EF Core entity configurations for backing fields
2026-03-04 11:35:41 +07:00
Ho Ngoc Hai
ce61b4d3db
feat(fnb-engine): add shopId and status filters to kitchen tickets
...
Add shopId and status query params to GET /api/v1/kitchen/tickets.
Joins through Session to resolve shopId since KitchenTicket only
has SessionId. Backward-compatible: without shopId falls back to
existing pending-by-station behavior.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-04 10:37:55 +07:00
Ho Ngoc Hai
751f90c365
feat: Log EF Core migration errors instead of crashing the application at startup across all services.
2026-02-28 01:03:43 +07:00
Ho Ngoc Hai
be86e48de6
feat: automatically apply EF Core database migrations on service startup across all services
2026-02-28 00:51:35 +07:00
Cursor Agent
4751929a3e
fix: switch JWT Bearer auth from symmetric key to OIDC discovery in 5 microservices
...
Replace manual SymmetricSecurityKey validation with Authority-based OIDC
discovery so tokens are validated against RSA keys published by the IAM
IdentityServer's discovery endpoint.
Services updated:
- CatalogService.API
- OrderService.API
- InventoryService.API
- FnbEngine.API
- BookingService.API
Co-authored-by: Velik <hongochai10@users.noreply.github.com >
2026-02-26 22:51:57 +00:00
Cursor Agent
c789f964a8
Add JWT Bearer authentication registration to 5 microservice Program.cs files
...
Add AddAuthentication(JwtBearerDefaults.AuthenticationScheme) and
AddJwtBearer() service registration before CORS configuration in:
- CatalogService.API
- OrderService.API
- InventoryService.API
- FnbEngine.API
- BookingService.API
Also add Microsoft.AspNetCore.Authentication.JwtBearer v10.0.1 NuGet
package reference to each service's .csproj file.
This fixes the runtime error caused by UseAuthentication() being called
without a registered authentication scheme.
Co-authored-by: Velik <hongochai10@users.noreply.github.com >
2026-02-26 22:51:57 +00:00
Cursor Agent
2fcf73b33f
Add UseAuthentication and UseAuthorization middleware after UseRouting in 5 microservices
...
Added app.UseAuthentication() and app.UseAuthorization() after
app.UseRouting() in the middleware pipeline for:
- CatalogService.API
- OrderService.API
- InventoryService.API
- FnbEngine.API
- BookingService.API
Co-authored-by: Velik <hongochai10@users.noreply.github.com >
2026-02-26 22:51:57 +00:00
Ho Ngoc Hai
593457a9e3
feat: Implement kitchen ticket and session management in FnbEngine, add booking-related controllers and a generic API response in BookingService, and update Dockerfiles.
2026-01-18 02:56:43 +07:00
Ho Ngoc Hai
83a8db2942
feat: Implement new API endpoints, application logic, and domain repositories across FnbEngine, BookingService, and OrderService, alongside minor infrastructure updates.
2026-01-18 02:51:10 +07:00
Ho Ngoc Hai
4abd842c0d
feat: replace Sample aggregate with Appointment aggregate in BookingService.
2026-01-18 01:05:51 +07:00
Ho Ngoc Hai
dc55dda87a
feat: Remove Sample aggregate, refactor database context to FnbContext, and introduce Table aggregate with its configurations, alongside adding an inventory repository interface.
2026-01-18 01:03:36 +07:00
Ho Ngoc Hai
811ddd1e19
feat: Add functional tests for OrderService and update InventoryService command and idempotency logic.
2026-01-18 00:19:46 +07:00
Ho Ngoc Hai
844e40f818
config: Update local application ports and switch database connection strings to Neon.tech for multiple services.
2026-01-17 23:28:35 +07:00
Ho Ngoc Hai
19c0acfe0f
feat: Add new unit tests, domain exceptions, documentation, and various build artifacts across multiple services.
2026-01-17 23:04:15 +07:00