A small foreign currency exchange project made with ASP.NET Core 3.1 (API) and Angular 2+ (Web Client)
Follow the installation instructions for each dependency on their respective official web pages. (link over the dependency name)
Windows compatible with .NET Core 3.1 runtime or any other compatible system
.NET Core 3.1 LTS (SDK and Runtime)
SQL Server 2019 (Developer or Express)
Node package manager (npm == lts~v14.15.4)
In the root directory of the repository. Open a command prompt of your choice and enter the following commands:
skip this step if you want to use in-memory database.
dotnet tool install --global dotnet-ef
dotnet build
dotnet ef database update --project ./Source/SimpleForex.API/ cd ./Source/SimpleForex.WebClient/
npm installTo run the API and Angular projects, you will need to open a command prompt for each one. Go to the repository path, from there run:
dotnet run --project ./Source/SimpleForex.APIThe database should already be migrated in order for the API to function correctly. use one of the migration options below. to do it.
also you can pass an application argument migrate to make the initial migration and run the API.
dotnet run --project ./Source/SimpleForex.API -- migrateadditionally you can pass the argument --configuration MOCK or -c MOCK to use SQLIte instead of SQLServer as the persistence handler for a quick test.
dotnet run --project ./Source/SimpleForex.API -c MOCK -- migrateif you are using Visual Studio Code you can launch the debugger by pressing:
F5
cd Source/SimpleForex.WebClient/
ng serve --host 127.0.0.1 --port 8081 --oif you are using Visual Studio Code you can run the task npm: serve - Source/SimpleForex.WebClient, by using.
Ctrl + Shift + P then select Tasks: Run Task > npm: serve - Source/SimpleForex.WebClient.
This is a demo application using .NET Core 3.1 and Angular 2+. Consist on a currency exchange API/Web client for consulting and purchasing foreign currency units.
Each currency is defined by its code, here is a list with the currently supported currencies.
- American dollar (USD) / Argentinian peso (ARS) => USD_ARS
- Brazilian Real (BRL) / Argentinian peso (ARS) => BRL_ARS
More foreign currencies will be added in the future. like the Canadian Dollar (CAD) For more information about international monetary units go here.
Each user has a limit on the amount of foreign currency they can purchase in a month:
- 200 for the American Dollars (USD)
- 300 for the Brazilian Real (BRL)
| API | Web Client |
|---|---|
| N-Layers | Component-Based |
| Onion | Atomic |
- Clean
- SOLID
- Defensive Coding
- Command
- Factory
- Builder
- Dependency Injection
- Repository
- Unit of Work
| API | Web Client |
|---|---|
| EntityFrameworkCore | lottie-web |
| FluentValidations | ngx-toastr |
| AutoMapper | bootstrap |
| Serilog | ngrx/store |
| GuardClauses | angular/forms |
| OpenApi | angular/router |
| Newtonsoft.Json | ngx-lottie |
I hope you find this material very educational and useful. :-)