A "real" web app written on F#.
The goal is to demonstrate an interaction between F#, SQL database and frontend part.
- CarParking.Core A pure layer containing the domain types and business logic.
- CarParking.DataLayer Commands/queries over the SQL Database, using Dapper.
- CarParking.Workflow A layer describes the full business workflow compositing impure and pure things rather than mixing. The idea is based on Dependency Rejection approach.
- CarParking.Error Application errors.
- CarParking.WebApi A Giraffe web server. The api handlers calls the CarParking.Workflow directly.
- CarParking.WebUI A web server (Razor pages) serving an angular app.
- CarParking.Workflow.IntegrationTests Property-based integration testing
- .NET Core >= 5.0
- Docker >= 19
(Optional) Paket: You can get all dependencies usingRevert back later :)dotnet restore
without having Paket, since there is the.paket/Paket.Restore.targets
file- (Optional) Node >= 12.14, npm >= 6.13: Required if there is a desire to build UI
- Build the database
docker-compose build
docker-compose up database
- Build the Web api
cd CarParking.WebApi
dotnet run
- Web api is ready for work. That's enough to be able to use Postman or other client to play with the api.
postman_calls.json
- a collection of api calls intended to be imported to Postman.
- Build the Angular app
cd CarParking.WebUI\frontend
npm i
npm run build
- Run the Web server
cd CarParking.WebUI
dotnet run
- Open https://localhost:5051/
- Enjoy
docker-compose up database_tests
dotnet test -v n