Tài liệu
- Design:
- 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.
- Hangfire để chạy job.
- 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 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
1.2 SignalR
Truy cập vào : http://localhost:5069/signalr-test.html để test demo signalR