Giter Site home page Giter Site logo

banking-api's Introduction

Banking-api

What is it ?

Banking-api is a small Scala API to manage Wallets, Cards and Tranfers between them. It has been created only using pure functional programming (no side effect, except for the logger for the unit tests). It uses a lot of libraries : http4s, doobie, cats / cats-effects, circe, refined, scalacheck

Prerequisite

Install Java 8

Install SBT

Install Docker

Build docker image from the project

Run sbt in the project directory (root)

Run docker:publishLocal in the SBT prompt

Run the server and the H2 database inside docker containers

Run docker-compose up in the project root directory

The server is listening at localhost:8080 and the database at jdbc:h2:tcp://localhost:9082/banking-api

You can use the openapi documentation swagger.yaml to use it inside Postman, for example

Examples

Some users, companies, wallets and cards are already created, from the flighway SQL scripts Companies : 6ca1e2b7-f11c-4f95-945f-78f75a09382d (Holding for the master wallets), 9d6493b3-b550-49a5-9a55-a5b0568225fc

Users : f0ef3449-f5f8-4e07-82ee-683247e11dc3, 76c4785e-da22-4cfe-8495-27ae4d6f9c15

Wallets : c7f3c868-ea95-4072-a507-1543799d26fe, 10f6d391-11cd-463b-8a51-c95bc4580d2e, 130081e3-3677-46b9-b7eb-518a3e1f8f19

Cards : 48a9cf36-32b2-4b79-8964-020ce6f234f9, 5244839a-0272-4786-bb29-6423623578b5

Do not forget to add headers User-Id and Company-Id in your http requests

You can use the file banking-api.postman_collection.json as an example

banking-api's People

Contributors

mdulac avatar

Stargazers

 avatar

Watchers

 avatar  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.