Git Product home page Git Product logo

expensesplitter.api's Introduction

Continuous integration

πŸ’΅ ExpenseSplitter

ExpenseSplitter is a Domain-Driven Design (DDD) implemented API, meticulously crafted in C#. This project serves as a vivid showcase of how Clean Architecture priciples can be applied, with an emphasis on creating a robust and scalable solution for managing expenses among users. The API allows users to create settlements, add participants, and manage expenses with flexible splitting options, ensuring a comprehensive expense settlement system.

🦩 Features / patterns

  1. Bold split into: Domain, Application, Infrastructure, and Presentation layers
  2. Domain layer: Entities, ValueObjects, DomainEvents, Domain Servies, Strongly typed IDs
  3. Application Layer: CQRS using MediatR with ICommand, IQuery, ICommandHandler, IQueryHandler abstractions, Logging for ICommandHandler, Validators with handling middleware, Result-driven communication, Idempotent/duplicated request handling, Railway-oriented programming (showcase)
  4. Presentation Layer: Minimal API with Swagger documentation, Trace ID middleware, Rate limiting.
  5. Infrastructure Layer: EF Core (DbContext, Entity mapping, DB migrations, Repositories), Authentication & Authorization, Database migrations
  6. Testing: Automated testing in CI, code coverage collection and history comparison, Architecture tests, testcontainers integration testing
  7. CI/CD: Dependabot integration, auto weekly nuget packages updates, Trivy scanning, SonarQube static-code analysis, automatic semantic-release, docker image publishing
  8. Docker support with docker-compose orchestration

πŸ›Ή Big picture

To let you quickly understand the domain and relationships of the project entities I decided to create a class diagram.

ExpenseSplitter.Api class diagram

πŸ—ΊοΈ Endpoints map

Method Path Notes
🟩 POST /users/login
🟩 POST /users/register
🟦 GET /users/me
🟩 POST /settlements Generates invite code
🟦 GET /settlements
🟦 GET /settlements/{settlementId}
🟨 PUT /settlements/{settlementId}
πŸŸ₯ DELETE /settlements/{settlementId}
🟦 GET /settlements/{settlementId}/expenses
🟨 PUT /settlements/join Join using invite code
🟨 PUT /settlements/{settlementId}/leave
🟦 GET /settlements/{settlementId}/reimbrusement Balances and suggested reimbrusements
πŸŸͺ PATCH /settlements/{settlementId}/participants/{participantId}/claim
🟩 POST /expenses
🟦 GET /expenses/{expenseId}
🟨 PUT /expenses/{expenseId}
πŸŸ₯ DELETE /expenses/{expenseId}

πŸ”­ Further development ideas

  1. Add websockets for real time updates
  2. Currency support
  3. Outbox pattern
  4. Model diagram

πŸ‘¨πŸ»β€πŸ’» Development

Start services locally

docker-compose up -d expensesplitter-db expensesplitter-idp

Create migration

dotnet ef migrations add --startup-project src/ExpenseSplitter.Api.Presentation --project src/ExpenseSplitter.Api.Infrastructure ...

expensesplitter.api's People

Contributors

rutkowski-tomasz avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

expensesplitter.api's Issues

The automated release is failing 🚨

🚨 The automated release from the feature/semantic-release-cd branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you can benefit from your bug fixes and new features again.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can fix this πŸ’ͺ.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the feature/semantic-release-cd branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here are some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


Missing package.json file.

A package.json file at the root of your project is required to release on npm.

Please follow the npm guideline to create a valid package.json file.


Good luck with your project ✨

Your semantic-release bot πŸ“¦πŸš€

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.