Giter VIP home page Giter VIP logo

cash-manager's Introduction

Cash Management System API

This is a Restful API for a cash management system that allows users to manage their cash flow by creating and updating transactions, tracking balances, and generating reports.

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/cash-management-system.git
    cd cash-management-system
  2. Create a virtual environment and activate it:

    python -m venv venv
    source venv/bin/activate   # For Windows, use: venv\Scripts\activate
  3. Install the required packages:

    pip install -r requirements.txt

Running the Development Server

Run the following command to start the development server:

python manage.py runserver

The API will be available at http://localhost:8000/.

API Endpoints

Authentication

  • POST /users/api/register/: Register a new user with a username and password.
  • POST /users/api/login/: Authenticate and get an access token.

Transaction Management

  • POST /api/transaction/: Create a new transaction.
  • GET /api/transaction/: List all transactions with filtering and sorting options.
  • GET /api/transaction/{id}/: Retrieve details of a specific transaction.
  • PATCH /api/transaction/{id}/: Update a specific transaction.
  • DELETE /api/transaction/{id}/: Delete a specific transaction.

Reports

  • POST /api/reports/monthly-summary/: Generate a monthly summary report.
  • POST /api/reports/category-wise-expense/: Generate a category-wise expense report.

Testing

Run the unit tests and integration tests with the following command:

python manage.py test

Dockerization

To dockerize the application, you can use Docker and Docker Compose. The configuration files for Docker are provided in the repository.

Build and Run the Docker Containers

To build and run the Docker containers, use the following command:

docker-compose up --build

The API will be available at http://localhost:8000/.

Documentation

The API endpoints are documented using Postman. The Postman documentation is available in the docs folder of the project. To view the documentation, follow these steps:

  1. Open Postman application.

  2. Import the Postman collection and environment files from the docs folder.

  3. Once imported, you will have access to the detailed documentation of each API endpoint, including request parameters, response examples, and allowed methods.

  4. Explore and test the API endpoints directly from the Postman documentation.

cash-manager's People

Contributors

amirrhe 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.