Bill Tracker

This is a test project to use while learning docker, Kubernetes, docker-compose.

It is pretty simple, it has two end-point one is info that supports only the GET function and returns API information. Other Bill end-point it has GET, POST, PUT and Delete end-points.

The project contains, Serilog file logging with CompactJsonFormatter. Datadog Tracker for trace requests in DataDog. Swagger for API documentation, and testing purposes.

It is developed with Clean Architecture approach and .NET 5

It uses MediatR, AutoMapper, EntityFrameworkCore with Postgresql.

Lessons Learned

Run Locally

Clone the project

  git clone https://github.com/nadirakdag/bill-tracker

Go to the project directory

  cd bill-tracker

Install dependencies

  dotnet restore

Install Postgresql

  docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d postgres

Start the server

  dotnet run --project src/API/API.csproj

Running Tests

To run tests, run the following command

  dotnet test BillTracker.sln

API Reference

Get API Info

  GET /api/info

Get Bills

  GET /api/bill

Get Bill by id

  GET /api/bill/{id}
Parameter Type Description
id string Required. Id of item to fetch

Create Bill

  POST /api/bill
Body Type Description Location
Bill Object Json Required. Bill information to create Body

Update Bill

  PUT /api/bill/{id}
Parameter Type Description Location
id string Required. Id of item to update QueryString
Bill Object Json Required. Bill information to create Body

Delete Bill

  DELETE /api/bill/{id}
Parameter Type Description Location
id string Required. Id of item to delete QueryString