Skip to content

Using Cockroach DB for Bank & Certificate of Deposits (CDs) data storage, an alternate to the mongo service

Notifications You must be signed in to change notification settings

crackCodeLogn/twm-bank-crdb-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏦 Tandem Workflow Manager - Bank CockroachDB Service

📌 Overview

This service acts as the central handler for managing banking-related data in a locally hosted CockroachDB instance. It provides RESTful APIs to perform various operations, including CRUD and complex compute support for banking entities.

🗄️ Managed Tables

  1. Bank

    • 🏛 Name
    • 🔢 IFSC Code (Primary Key) – Equivalent to bank numbers (IFSC = Indian Financial System Code)
    • 🔗 External ID
    • 🌍 Country Code
    • 📞 Contact Number
    • 🏦 Bank Type (Government or Private)
    • Is Active?
  2. Bank Account

    • 🏷️ Name
    • 🔢 ID (Primary Key)
    • 🔗 External ID
    • 🔑 Bank IFSC (Foreign Key to Bank)
    • 💳 Account Number
    • 🔢 Transit Number
    • 🏢 Institution Number
    • 💰 Current Balance
    • 📈 Interest Rate
    • 🏷️ Tags – List of tags for account types, helping distinguish characteristics
    • 💳 Max Overdraft Balance Allowed
    • Is Active?
  3. Bank Fixed Deposit

    • 🔢 FD Number (Logical Composite Key)
    • 👤 Direct User
    • 👥 Original User
    • 🆔 Customer ID (of Direct User)
    • 🔑 Bank IFSC (Logical Foreign Key to Bank - Not a Hard Key Yet)
    • 🔗 External ID
    • 💰 Principal Amount Deposited
    • 📈 Rate of Interest
    • 📅 Start Date
    • 📅 End Date
    • 💵 Expected Amount
    • 💸 Expected Interest (Expected Amount - Principal)
    • 🗓️ Number of Months
    • 📅 Number of Days Over Months
    • 🧐 Interest TypeOn Maturity, Annual, or Other
    • 👤 Nominee
    • Is Active?
    • 💡 Type of DepositTFSA 🇨🇦 / FHSA 🇨🇦 / Non-Registered 🇨🇦 / India 🇮🇳
    • 🔒 Freeze the Expected Amount?

Note: Fixed deposit is also known as

  • 🇺🇸 Certificate of Deposit (USA)
  • 🇨🇦 Guaranteed Investment Certificate (Canada)
  • 🇮🇳 Fixed Deposit (India)

⚙️ Features

CRUD and complex operations on banking entities
RESTful API endpoints for seamless integration
CockroachDB-backed storage for high availability and scalability


🚀 Versions

Stable Latest
2.1.29 2.1.29

🛠️ Tech Stack

Java
CockroachDB
Spring Boot
Spring JPA
Feign Client
Eureka
Protobuf
Guava
Gson
Apache Commons Lang3
Lombok

📚 Personal Libraries

  • 🏗️ twm-artifactory
    Centralized repository for source and compiled Protocol Buffers (Protobufs) used across TWM projects.

  • 🔗 twm-ping-client
    A lightweight library providing Eureka-based heartbeat (ping) functionality for service discovery.

🧪 Test Libraries

Mockito
JUnit
AssertJ
Spring Boot Test


Launch mechanism (local mode)

Pre-requisites:

  1. Start up local cockroachdb cluster
  2. Start up twm-eureka

Launch script:

  1. Ensure the stable version is checked out (or latest if you are more brave)
  2. Run the Local Build step if not already done, to generate the jar
  3. Fire up the script at 'twm-bank-crdb.sh' using no args

Local Build

Pre-requisites:

  1. Checkout the latest libraries and build their jars for local maven repo (~/.m2)

Command:

mvn clean install


For questions or suggestions, please feel free to reach out to me at [email protected]

About

Using Cockroach DB for Bank & Certificate of Deposits (CDs) data storage, an alternate to the mongo service

Topics

Resources

Stars

Watchers

Forks