Tài liệu
-
- Design: https://app.visily.ai/projects/50f87b16-42d4-4f56-9716-aad3ad28585a/boards/1194334
- Git: https://github.com/NguyenNghia412/sms_marketing
1. Backend
- Kiến trúc hao hao Clean. Chủ yếu cũng có Presentation (API Controller), Businees (Application), Domain (Entity), Infras (DbContext + Seed + lib liên quan kỹ thuật). Bỏ qua repository (Có vẻ khác với Clean)
- Phù hợp với dự án cỡ nhỏ và vừa. Ko to quá. Ko bé quá. Auth Server ở chung với Resource Server luôn.
- Lấy ý tưởng từ project base backend của Giáo Minh và ABP Framework. Mong muốn là có cái base tự xây, nhẹ hơn và giảm thiểu được project/folder trong src code so với 2 cái trên một tí.
- C# ASP .NET 8 + SQL Server
- OpenidDict để lấy cơ chế access/refresh token.
- ASP NET Core Identity để xử lý chỗ User, Role. Per thì tự định nghĩa và dùng như claim.
- Dùng Permission Attribute để check Authorize với API
- Dự kiến tích hợp nốt Hangfire, SignalR
1.1 Migration
Mở terminal tại folder root và chạy lệnh
dotnet ef migrations add InitMigration --project thongbao.be.infrastructure.data --startup-project thongbao.be --output-dir Migrations
dotnet ef database update --project thongbao.be.infrastructure.data --startup-project thongbao.be --output-dir Migrations
Project chạy tại http://localhost:5069/swagger/index.html