Đồ án môn C# và Lập trình .NET — Trường Đại học Sài Gòn, 2025–2026.
InteractHub là ứng dụng mạng xã hội làm bằng React + ASP.NET Core. Người dùng có thể đăng bài, đăng story, kết bạn, like/comment và nhận thông báo real-time.
Cần cài sẵn: .NET SDK 10, Node.js 20+, SQL Server.
Backend:
cd backend
dotnet restore
dotnet ef database update
dotnet runChạy ở http://localhost:5052. Vào /swagger để xem danh sách API.
Frontend:
cd frontend
npm install
npm run devChạy ở http://localhost:5173.
Tài khoản thử:
| Mật khẩu | |
|---|---|
nguyenvana@example.com |
demo123 |
tranthib@example.com |
demo123 |
admin@interacthub.com |
demo123 |
Frontend: React 18, TypeScript, Vite, Tailwind CSS, MUI, React Router v6, SignalR client.
Backend: ASP.NET Core .NET 10, Entity Framework Core, SQL Server, ASP.NET Identity, JWT, SignalR, Swagger, Azure Blob Storage, Application Insights.
CI/CD: GitHub Actions — tự động build, chạy test và deploy lên Azure mỗi khi push lên nhánh main.
├── backend/
│ ├── Controllers/
│ ├── Services/
│ ├── Models/
│ ├── Dtos/
│ ├── Data/
│ └── Migrations/
├── backend.tests/
├── frontend/
│ └── src/
│ ├── app/pages/
│ ├── app/services/
│ └── app/hooks/
├── .github/workflows/deploy.yml
└── database/InteractHub_full.sql
dotnet test backend.tests/backend.tests.csproj --configuration ReleaseCó 15 unit test viết bằng xUnit + Moq, kết quả 15/15 pass. Coverage dao động 64–85% tùy service.
POST /api/auth/register
POST /api/auth/login
GET /api/posts
POST /api/posts
POST /api/posts/{id}/like
GET /api/friends
POST /api/friends/request/{userId}
GET /api/notifications
Mỗi lần push lên main sẽ tự động:
- Restore + build backend, chạy 15 unit test
- Build frontend (
npm ci+vite build) - Deploy backend lên Azure App Service (cần secret)
- Deploy frontend lên Azure Static Web Apps (cần secret)
Nếu test fail thì deploy không chạy.