Skip to content

SpendSmart is a .NET 10 financial management API for tracking expenses, managing budgets, and analyzing transactions. It uses CQRS, MediatR, and repository patterns, and is optimized for cloud deployments.

Notifications You must be signed in to change notification settings

MrEshboboyev/SpendSmart

Repository files navigation

πŸ’° SpendSmart – The Ultimate Financial Management API πŸš€

.NET 10
CQRS
MediatR
Secure API
Cloud Deployment

Welcome to SpendSmart, the ultimate financial management API designed to help users track expenses, manage budgets, and control financial transactions efficiently. Built with .NET 10, it leverages modern CQRS architecture, MediatR for command handling, and PostgreSQL for secure data storage.

Why Use SpendSmart?

  • πŸ’° Manage your expenses and budgets effectively
  • πŸš€ Optimized for high performance and scalability
  • πŸ” Secure, authenticated, and cloud-ready
  • πŸ›  Built with the latest best practices in software architecture

🌟 Features

βœ… Expense Tracking – Keep records of income, expenses, and savings.
βœ… Budgeting System – Create, update, and monitor monthly budgets.
βœ… Transaction Management – View detailed reports and transaction summaries.
βœ… Secure Authentication – JWT-based authentication for secure access.
βœ… Multi-Currency Support – Add and remove multiple currencies per user.
βœ… Timezone Customization – Personalize your experience with dynamic timezones.
βœ… RESTful API – Well-structured, versioned, and easy-to-integrate API.
βœ… Cloud-Ready Deployment – Supports Docker, Kubernetes, and cloud hosting.


πŸ—οΈ Architecture & Design Patterns

πŸ“Œ CQRS (Command Query Responsibility Segregation) – Separates read & write models.
πŸ“Œ MediatR (Mediator Pattern) – Decouples business logic from controllers.
πŸ“Œ Repository Pattern – Encapsulates data access logic.
πŸ“Œ Dependency Injection (DI) – Ensures modular and testable code.
πŸ“Œ Layered Architecture – Divided into:

  • Application Layer – Business logic, commands, queries, and handlers.
  • Domain Layer – Core business models and rules.
  • Persistence Layer – Handles data storage with PostgreSQL.
  • Infrastructure Layer – Logging, authentication, notifications.
  • API Layer – RESTful endpoints for frontend & integrations.

πŸ“‚ Project Structure

πŸ“Œ src/SpendSmart.Api – Main API layer, exposing endpoints.
πŸ“Œ src/Application – Business logic, MediatR commands & queries.
πŸ“Œ src/Domain – Core financial models and validation rules.
πŸ“Œ src/Infrastructure – Authentication, logging, and notifications.
πŸ“Œ src/Persistence – Database access and PostgreSQL integration.
πŸ“Œ tests/SpendSmart.Tests – Unit and integration tests.


πŸš€ Getting Started

πŸ“Œ Prerequisites

βœ… .NET 10 SDK
βœ… Docker
βœ… PostgreSQL

Step 1: Clone the Repository

git clone https://github.com/yourusername/SpendSmart.git
cd SpendSmart

Step 2: Install Dependencies

dotnet restore

Step 3: Run the API Locally

dotnet run

🌍 API Endpoints

πŸ§‘ User Management

Method Endpoint Description
POST /api/users/setup Sets up a new user
POST /api/users/change-timezone Changes the user’s timezone
POST /api/users/change-password Updates user password

πŸ’³ Transaction Management

Method Endpoint Description
POST /api/transactions/create Creates a new transaction
GET /api/transactions/current-month-summary Fetches monthly summary
GET /api/transactions/{id} Retrieves a transaction by ID

πŸ“Š Budget Management

Method Endpoint Description
POST /api/budgets/create Creates a new budget
GET /api/budgets/active Lists active budgets
GET /api/budgets/{id} Retrieves budget details

πŸ”‘ Authentication

Method Endpoint Description
POST /api/auth/register Registers a new user
POST /api/auth/login Authenticates user
POST /api/auth/refresh-token Refreshes authentication token

🐳 Running with Docker

Step 1: Build & Run with Docker Compose

docker-compose up --build

Step 2: Access API & Documentation

πŸ”Ή Swagger UI – http://localhost:5000/swagger

πŸš€ The API is fully Dockerized, making deployment simple and scalable.


πŸ§ͺ Testing

Run Automated Tests

dotnet test

Manual API Testing

πŸ“Œ Use Postman or Swagger UI to:
βœ… Create transactions β†’ /api/transactions/create
βœ… Fetch budgets β†’ /api/budgets/active
βœ… Authenticate user β†’ /api/auth/login


🎯 Why Use SpendSmart?

βœ… Full-Fledged Expense Tracking & Budgeting System
βœ… Optimized for Performance & Scalability
βœ… Secure & Reliable with Authentication
βœ… Built on Modern Development Best Practices
βœ… Cloud-Ready with Docker & PostgreSQL


πŸ“œ License

This project is licensed under the MIT License. See LICENSE for details.


πŸ“ž Contact

For feedback, contributions, or inquiries:
πŸ“§ Email: mreshboboyev@gmail.com
πŸ’» GitHub: MrEshboboyev


πŸš€ Take control of your finances with SpendSmart! Clone the repo & get started now!

About

SpendSmart is a .NET 10 financial management API for tracking expenses, managing budgets, and analyzing transactions. It uses CQRS, MediatR, and repository patterns, and is optimized for cloud deployments.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages