Skip to content

The main goal of the Household Accounts Core Service is to handle all data operations for creating, reading, updating, and deleting records. This service is responsible for CRUD operations on Transactions, Categories, and Budgets.

Notifications You must be signed in to change notification settings

congmul/household-accounts-core-service

Repository files navigation

Household Accounts Core service

This repository contains the backend service built with Express and Typescript.

API Specification

Overview

The main goal of the Household Accounts Core Service is to handle all data operations for creating, reading, updating, and deleting records. This service is responsible for CRUD operations on Transactions, Categories, and Budgets.

Table of Contents

Installation

  1. Clone the repository:

    git clone git@github.com:congmul/household-accounts-core-service.git
    cd household-accounts-core-service
  2. Install dependencies:

    npm install
  3. Set up environment variables:

    Create a .env file in the root directory and add the values (Please check env.example file)

  4. Start the application:

    npm run dev

Configuration

It needs to set env like the following examples.

PORT=3001
MONGO_URI=mongodb://localhost:27017
MONGO_DB_NAME=household-accounts-core-service
USER_SERVICE_URL=http://localhost:3002

Usage

To run the app

npm start

This will start the application on 'http://localhost:3002'

Endpoints

API Specification

Project Structure

household-accounts-core-service/
  ├── src/ 
  │ ├── config/
  │ │    ├── db.ts
  │ │    ├── config.ts
  │ │    └── msgs.ts
  │ ├── controllers/
  │ │    ├── budget.controller.ts
  │ │    ├── category.controller.ts
  │ │    ├── index.ts  
  │ │    └── transaction.controller.ts
  │ ├── models/
  │ │    ├── assets.ts  
  │ │    ├── budget.ts  
  │ │    ├── category.ts  
  │ │    ├── index.ts  
  │ │    └── transaction.ts
  │ ├── routes/
  │ │    ├── budget.ts
  │ │    ├── category.ts
  │ │    ├── index.ts
  │ │    ├── swagger.ts
  │ │    └── transaction.ts
  │ ├── services/
  │ │    ├── budget.service.ts
  │ │    ├── category.service.ts
  │ │    ├── index.ts
  │ │    ├── transaction.service.ts
  │ │    └── user.service.ts
  │ ├── types/
  │ │    ├── assets.ts
  │ │    ├── budget.ts
  │ │    ├── category.ts
  │ │    ├── index.ts
  │ │    └── transaction.ts
  │ ├── utils/
  │ │    ├── errorHandler.ts
  │ │    ├── logger.ts
  │ │    └── pick.ts
  │ ├── api-spec.json 
  │ └── app.ts
  ├── package.json
  └── .env

Contributing

  1. Fort the repository.
  2. Create a new branch: git checkout -b feature/your-feautre-name on development branch.
  3. Whatever work you do, after it has been tested locally by hand and unit/integration tests, you will bump the major, minor, or patch versions of package.json file based on the scope of work completed. Rule of thumb is:
  • Breaking changes = bump major version
  • Additional feature(s) with no breaking changes = bump minor version
  • Chore or bug fix = bump patch version
  1. Make your changes an commit them: git commit -m 'Add some feature'
  2. Push to the branch: git push origin feature/your-feature-name
  3. Open a pull request.

About

The main goal of the Household Accounts Core Service is to handle all data operations for creating, reading, updating, and deleting records. This service is responsible for CRUD operations on Transactions, Categories, and Budgets.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published