Example full-stack application demonstrator. It consists of REST API created with .NET and C# and frontend application created with Angular.
There are 3 possible ways to start the project:
- Docker-compose start (recommended - single-command start)
- Development start
- Kubernetes start
Access the client application at: http://localhost:4200/
.
Reach the web API swagger at: https://localhost:7023/swagger/index.html
- .NET 6 SDK 6.0.101
- Docker 20.10.11
- Docker-compose 1.29.2
- Angular CLI 11.2.2
- Node.js SDK 14.16.0
- kubectl v1.22.4
Web API and client application are separate projects and should be started separately:
- Client application
- Navigate to
src/ClientApp/
- Run
npm install
command - Run
npm run start
command
- Navigate to
- Web API
- Navigate to
src/Api/
- Run
dotnet run
- Navigate to
- Add temporary SSL cert
# Windows
dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\aspnetapp.pfx -p Your_password123
dotnet dev-certs https --trust
# Unix
dotnet dev-certs https -ep ${HOME}/.aspnet/https/aspnetapp.pfx -p Your_password123
dotnet dev-certs https --trust
- Start docker-compose (
docker-compose up
at root directory)
✅ If you only want to start the solution without pushing new images you should omit 2-4 steps from below list
🌶 To fully deploy to kubernetes and communicate with the pods, an ingress controller should be created. Also the HTTPS communcation issue should be resolved with registering domain and installing certbot.
- Set DOCKER_REGISTRY env variable
export DOCKER_REGISTRY=rutkowski/
- Login to repository
docker login
- Build images
docker-compose build
- Push images
docker-compose push
- Apply kubernetes configuration
kubectl apply -f ./kubernetes
Registries: Web API, Client App
- ApiEndpoints
- AutoMapper
- Coverlet
- FluentAssertions
- FluentValidation
- Moq
- NSwag
- ReportGenerator
- UnitsNet
- ValueOf
- Web API and client application are separate projects and can be deployed separately. It would be better to place them in other repositories. They are placed in one repository because of demo purpose.
Create README.md + roadmapInitialize project, install required dependenciesDefine domain modelsImplement logic of distance calculationCreate frontend application to showcase API endpointIntegrate with dockerIntegrate with Github actionsImplement multiple methods to calculate the distanceConsider different required unitsStylize frontend solution (use third party library)Validate form before sending the request- Create BDD tests (Specflow)
Prepare solution for kubernetes deploymentWrite starting instructionsEnable swaggerImplement mappersIntegrate with docker-compose for single command project startupGenerate API client for angular on buildAdd code coverage toolAdd project descriptionAdd fluent validation for request modelsImprove code coverage- Implement logger (Serilog)
- Create custom model for all WebApi responses