Skip to content

Latest commit

 

History

History
221 lines (173 loc) · 6.84 KB

README.md

File metadata and controls

221 lines (173 loc) · 6.84 KB

Loot Ledger

where every financial transaction is accounted for!

Prerequisites

API Documentation is available on Postman

Setup

1. Install the required dependencies

$ yarn add

2. Rename the .env.example filename to .env and set your local variables

$ mv .env.example .env

3. Start the application

# development
$ yarn start

# watch mode
$ yarn start:dev

# production mode
$ yarn start:prod

Docker for development

# start the application
$ yarn docker:up

# stop the application
$ yarn docker:down

Test

# unit tests
$ yarn test:watch

Swagger documentation

Overall Architecture

Folder Structure

src
├── auth
│   ├── controllers
│   ├── dto
│   ├── guards
│   ├── roles
│   └── services
├── buffer
│   ├── controllers
│   ├── dto
│   ├── entities
│   └── services
├── common
│   ├── config
│   ├── constants
│   ├── decorators
│   ├── enums
│   ├── interceptors
│   ├── interfaces
│   ├── types
│   └── validation
├── database
├── events
│   ├── controllers
│   ├── dto
│   ├── entities
│   └── services
├── redis
├── society
│   ├── controllers
│   ├── dto
│   ├── entities
│   └── services
├── transactions
│   ├── controllers
│   ├── dto
│   ├── entities
│   └── services
└── users
    ├── controllers
    ├── dtos
    ├── entities
    └── services

42 directories

This is the folder structure of the project, each folder has its own purpose, for more details take a look at Folder Structure

Hireachy

README drawio

Note

  • This project is still under development, there are lot of ideas and featuers to be added, for ideas take a look at ideas.md, roadmap will be added soon.
  • This Project has auto commit message formatting on commit using Husky and Commitlint, so make sure you follow the Conventional Commits format when commiting your changes.

License

Release under the terms of MIT

Database Schema

  • ER Diagram

ER Diagram

  • Relational Schema

Relational Schema

  • Tables
  • assets
  • buffer_store
  • conducted
  • documents
  • events
  • handled
  • member_of
  • signed_off
  • socities
  • spent
  • transactions
  • users

References

  1. Transaction Types
export enum transactionType {
'DEBIT' = 'DEBIT',
'CREDIT' = 'CREDIT',
'OPENING_BALANCE' = 'OPENING_BALANCE',
'CLOSING_BALANCE' = 'CLOSING_BALANCE',
'DEFAULT' = 'DEFAULT',
}
  • DEBIT: A debit transaction records an increase in assets or a decrease in liabilities or equity.
  • CREDIT: A credit transaction records a decrease in assets or an increase in liabilities or equity.
  • OPENING_BALANCE: An opening balance transaction records the starting balance of an account or period.
  • CLOSING_BALANCE: A closing balance transaction records the ending balance of an account or period.
  • DEFAULT: A default transaction is a catch-all category for transactions that do not fit into any of the other types.
  1. Transaction Status
export enum transactionStatus {
'PENDING' = 'PENDING',
'APPROVED' = 'APPORVED',
'REJECTED' = 'REJECTED',
'DEFAULT' = 'DEFAULT',
}
  • PENDING: A pending transaction is a transaction that is yet to be approved or rejected.
  • APPROVED: An approved transaction is a transaction that has been approved by the the highest stakeholder.
  • REJECTED: A rejected transaction is a transaction that has been rejected by the any one of the stakeholder.
  • DEFAULT: A default transaction is the initial status when it has not uploaded completly.
  1. Member Positions
export enum memberPosition {
'CHAIR' = 'CHAIR',
'TREASURER' = 'TREASURER',
'VICE_CHAIR' = 'VICE_CHAIR',
'SECRETARY' = 'SECRETARY',
'BRANCH_COUNSELLOR' = 'BRANCH_COUNSELLOR',
'SOCIETY_COUNSELLOR' = 'SOCIETY_COUNSELLOR',
'SOCIETY_CHAIR' = 'SOCIETY_CHAIR',
'SOCIETY_VICE_CHAIR' = 'SOCIETY_VICE_CHAIR',
'SOCIETY_SECRETARY' = 'SOCIETY_SECRETARY',
'SOCIETY_TREASURER' = 'SOCIETY_TREASURER',
'MEMBER' = 'MEMBER',
}
  • CHAIR: A chair is the highest student position in the branch.
  • VICE_CHAIR: A vice chair is the second highest student position in the branch.
  • TREASURER: A treasurer handles every financial transactions, manages report for the whole branch.
  • SECRETARY: A secretary is part of main execom.
  • BRANCH_COUNSELLOR: A branch counsellor is a faculty member who is incharge of the branch.
  • SOCIETY_COUNSELLOR: A society counsellor is a faculty member who is incharge of the society.
  • SOCIETY_CHAIR: A society chair is the highest student position in the society.
  • SOCIETY_VICE_CHAIR: A society vice chair is the second highest student position in the society.
  • SOCIETY_SECRETARY: A society secretary is part of main execom.
  • SOCIETY_TREASURER: A society treasurer handles every financial transactions, manages report only for respective society.