🔧 1. Publishing the React + .NET Application
🌀 Popular Options
|
React Frontend |
Backend API (.NET) |
Notes |
|---|---|---|
|
Vercel |
Azure Web App |
Automatic deployment from Git |
|
Netlify |
Render (Free Plan) |
Free alternative, easy to configure |
|
Static Hosting (S3) |
Azure Function API |
Scalable, cost-effective options |
|
Docker + VPS |
Docker + API |
Full control, but requires DevOps skills |
✅ Example: Vercel + Azure Web App
🔷 Frontend – Vercel
-
Log in to vercel.com
-
Import the repo from GitHub
-
In build settings:
-
Framework: React
-
Output: build
-
-
The build starts automatically, and you get the public link
🔷 Backend – Azure Web App
-
Create an App Service from the Azure Portal
-
Choose runtime .NET 8, plan B1 (Free)
-
Enable Continuous Deployment (GitHub Actions)
-
Set environment variables in Configuration > Application settings
🔄 2. Lessons Learned and Best Practices
✅ Applied DDD – real benefits
-
Clear separation of responsibilities: Domain, Application, Infrastructure, API
-
Ease of testing: Domain does not depend on external frameworks
-
Long-term scalability
✅ React – modularity + context
-
Separation of logic into hooks (usePosts, useAuth)
-
Reuse through Context for auth and user info
-
Validations on client + server
✅ Testing
-
Unit tests on entities and services
-
Integration tests with WebApplicationFactory
-
Frontend tests with Vitest + React Testing Library
✅ Observations
-
DDD has an initial learning curve but clarifies things in the long run
-
A CI/CD system (GitHub Actions) would be useful right from the start
-
Do not underestimate the importance of SEO and application speed