Giter VIP home page Giter VIP logo

clearspend-core's Introduction

To get started

  1. install Java 17, Gradle, docker, docker-compose (see also Technical Concept Page)
  2. sudo usermod -a -G docker $username
  3. If you're running selinux, sudo setfacl -m $username:6 /var/run/docker.sock
  4. Log in again in to pick up the new permissions.
  5. ./gradlew jibDockerBuild
  6. Start the services:
    • docker-compose up will start the databases (ours and 2 for Fusion Auth), and you'll want to run com.clearspend.capital.CapitalApplication with your IDE.
    • docker-compose --profile mon up will also start Prometheus and Grafana to monitor this service running in your IDE.
    • docker-compose --profile ui up will also start UI service in a container pointing to the application running in your IDE To make it happen - checkout the latest capital-ui sources to the ../capital-ui folder and then use docker-compose --profile ui build
    • com.clearspend.capital.CapitalApplication is the main class
  7. Spring actuator status check: curl http://localhost:8080/actuator/health

See also our schema which is managed by flyway.

Test coverage

To check test coverage, ./gradlew jacocoTestReport then open build/reports/jacoco/test/html/index.html. ./gradlew jacocoCoverageValidation will see if coverage is at least as good as the limit set in build.gradle.kts

Note that test coverage generally should not be 100% because that's silly, and high test coverage is, on its own, not saying that the tests are sufficient. It's one measure among many (most not applied here yet) of test effectiveness.

Service urls and accounts

To use Plaid features

To avoid publishing secrets to a git repository, the plaid secret is held in an env variable named CLIENT_PLAID_SECRET. Plaid features are not required to run the rest of the app, so it is not necessary to include it if you don't plan on linking bank accounts. If you do wish to use plaid features, populate the variable. This value can be found in the Plaid dashboard.

Business Onboarding

Sequence of APIs:

  1. Create Business and Business Owner
    • POST /business-prospects
    • POST /business-prospects/{businessProspectId}/validate-identifier (email)
    • POST /business-prospects/{businessProspectId}/phone
    • POST /business-prospects/{businessProspectId}/validate-identifier (phone)
    • POST /business-prospects/{businessProspectId}/password
    • POST /business-prospects/{businessProspectId}/convert
    • POST /business-owners
    • PUT /business-owners/{businessOwnerId}
  2. Link Bank Account. All business-bank-accounts calls require businessId to be passed in a header until we have JWTs
    • GET /business-bank-accounts/link-token
    • GET /business-bank-accounts/link-token/{linkToken}/accounts
  3. Deposit to or withdraw from a Business account to a bank account
    • GET /business-bank-accounts
    • POST /business-bank-accounts/{businessBankAccountId}/transactions
  4. Retrieve Business Account information
    • POST /businesses/accounts (get business account)
  5. Create Allocation
    • GET /programs
    • POST /allocations
  6. Traverse allocations
    • GET /allocations/{allocationId} (get one)
    • GET /businesses/allocations (get root Allocations)
    • GET /allocations/{allocationId}/children (get children of an allocation)
  7. Reallocate funds
    • POST /businesses/transactions (Business <-> Allocation)
    • POST /allocations/{allocationId}/transactions (Allocation <-> Card)

SendGrid

This repo contains samples of dynamic templates: https://github.com/sendgrid/email-templates

clearspend-core's People

Contributors

maxh-theodo avatar kuchlein avatar yashkaur30 avatar dbusley avatar unrealutkarsh avatar gogo-ashacode avatar aliu1212 avatar spsaucier 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.