Code Monkey home page Code Monkey logo

finance_control_api's Introduction

Finance Control API - README

Overview

Finance Control API is a Spring Boot project designed for personal finance management. It provides a set of APIs to manage users, transactions (expenses and incomes), categories, and companies. This README provides an overview of the project structure, key components, and instructions for running the application.

Table of Contents

  1. Getting Started
  2. Project Structure
  3. Endpoints
  4. Security
  5. Contributing
  6. License

Getting Started

Prerequisites

  • Java 11 or later
  • Maven
  • Database (e.g., MySQL)

Installation

  1. Clone the repository:

    git clone https://github.com/Enrickyb/finance_control_api.git
  2. Navigate to the project directory:

    cd finance_control_api
  3. Build the project:

    mvn clean install

Running the Application

  1. Configure the database connection in application.properties.

  2. Run the application:

    java -jar target/finance_control_api.jar

    The application will be accessible at http://localhost:8080.

Project Structure

UserControllers

  • UserController: Manages user-related operations, such as retrieving users by ID and listing all users.
  • AuthenticationController: Manages user authentication operations, including login and registration.

TransactionControllers

  • TransactionController: Manages expense and income transactions, including creation and retrieval.
  • CategoryController: Manages transaction categories, including creation and retrieval.
  • CompanyController: Manages companies associated with transactions, including creation and retrieval.

Configs

  • SecurityFilter: Custom security filter for handling authentication and authorization.

Endpoints

User Endpoints

  • GET /user/{id}: Retrieves a user by ID.
  • GET /user/all: Lists all users.

Authentication Endpoints

  • POST /auth/login: Performs user login.
  • POST /auth/register: Registers a new user.

Transaction Endpoints

  • POST /transaction/expense/create: Creates a new expense.
  • GET /transaction/expense/all: Lists all expenses.
  • GET /transaction/expense/get/{id}: Retrieves an expense by ID.
  • GET /transaction/expense/user/{id}: Retrieves expenses for a specific user.
  • GET /transaction/all: Lists all transactions (expenses and incomes).
  • POST /transaction/income/create: Creates a new income.
  • GET /transaction/income/all: Lists all incomes.
  • GET /transaction/income/{id}: Retrieves an income by ID.

Category Endpoints

  • POST /transaction/category/create: Creates a new category.
  • GET /transaction/category/all: Lists all categories.
  • GET /transaction/category/get/{id}: Retrieves a category by ID.

Company Endpoints

  • POST /transaction/company/create: Creates a new company.
  • GET /transaction/company/all: Lists all companies.
  • GET /transaction/company/get/{id}: Retrieves a company by ID.

Security

SecurityFilter

The SecurityFilter is a custom filter responsible for token validation and user authentication. It intercepts incoming requests, validates the token, and sets the authenticated user in the security context.

finance_control_api's People

Contributors

enrickyb avatar

Watchers

 avatar

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.