Skip to content

ic3software/mccs-alpha-api

dev
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
cmd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

MCCS Alpha API

Overview

The MCCS Alpha API is a prototype API that exposes all of the functionality described in the MCCS overview of functionality.

By providing an API, developers who want to create their own front-end user interface for MCCS will have significant flexibility to implement it in whatever way they choose. This means developers can present MCCS in any language, setup their own signup flow, optimize it for whatever devices their users prefer, develop a mobile app, integrate other services such as chat, etc.

Importantly, an API enables developers to integrate MCCS functionality directly into their own apps (e.g., import transfer data into an accounting application, instruct mutual credit transfers from an e-wallet application, etc.).

We are making this code public to show our commitment to free and open source software, and to signal our intention to develop mutual credit software that will be freely available to anyone who wishes to implement a mutual credit transfer system.

Main Functions

There are four main functions that the MCCS API provides to its users:

  1. Manage accounts - create and modify user accounts and their related entity details
  2. Find entities - search for and view entities based on what they sell and need
  3. Transfer mutual credits - create and complete/cancel mutual credit (MC) transfers between entities
  4. Review transfer activity - view pending and completed MC transfers

See the detailed description of these main functions in the MCCS overview of functionality.

API Documentation

User API

Admin API

How to Start

Basic requirements: Go version 1.13+, Docker and Docker Compose (see all requirements)

  1. Change the name of the development-example.yaml file to configs/development.yaml
  2. Generate JSON Web Token public and private keys
    1. Generate private key
      openssl genrsa -out private.pem 2048
      
    2. Extract public key from it
      openssl rsa -in private.pem -pubout > public.pem
      
    3. Copy/paste the private and public keys into configs/development.yaml
  3. Run the app
    make run
    
  4. Seed the DB with some test data
    make seed
    
  5. Make API calls

Requirements

Software

The MCCS web app is written in Go, and it uses Docker Compose to orchestrate itself and its dependencies as Docker containers.

App Dependencies

  • MongoDB - the database used to store user and entity directory data
  • PostgreSQL - the database used to store mutual credit transfer data
  • Elasticsearch - the search engine for searching user/entity data
  • Redis - in-memory cache used for rate limiting API requests

These dependencies are installed automatically by Docker Compose.

External Dependencies

Sendgrid does not need to be setup to run the app in development mode.

About

Mutual credit communication system and trade discovery - API server implementation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published