This repository contains the backend service built with Express and Typescript.
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.
-
Clone the repository:
git clone git@github.com:congmul/household-accounts-core-service.git cd household-accounts-core-service
-
Install dependencies:
npm install
-
Set up environment variables:
Create a .env file in the root directory and add the values (Please check env.example file)
-
Start the application:
npm run dev
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
To run the app
npm start
This will start the application on 'http://localhost:3002'
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
- Fort the repository.
- Create a new branch:
git checkout -b feature/your-feautre-name
ondevelopment
branch. - 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
- Make your changes an commit them:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature/your-feature-name
- Open a pull request.