An open API service indexing awesome lists of open source software.

https://github.com/chiomasarah/democredit

A Minimum Viable Payment wallet that handles basic transaction.
https://github.com/chiomasarah/democredit

data-seeding db-migration knexjs mysql2 node-js

Last synced: about 1 month ago
JSON representation

A Minimum Viable Payment wallet that handles basic transaction.

Awesome Lists containing this project

README

          

# Demo Credit

An MVP (Minimum viable product) wallet service where a user can create, fund, withdraw, and transfer funds to another user’s account.

## Table of Contents

1. [Introduction](#introduction)
2. [Features](#features)
3. [Requirements](#requirements)
4. [Getting Started](#getting-started)
- [Installation](#installation)
- [Configuration](#configuration)
- [Running the Project](#running-the-project)
5. [Usage](#usage)
6. [API Documentation](#api-documentation)
7. [Contributing](#contributing)
8. [License](#license)

## Introduction

Demo Credit is a Minimum viable product wallet service where a user can create, fund, withdraw, and transfer funds to another user’s account.
It is built on Node and Express while persisting data with MySQL through Knex ORM.

## Features

- Account creation
- Account funding
- Fund transfer
- Fund withdrawal

## Requirements

List any prerequisites or dependencies needed to run your project.

- Node.js (LTS)
- Express
- TypeScript
- MySQL (version 8)
- Knex ORM
- JWT

## Getting Started

Follow these steps to get started.

### Installation

```bash
# Clone the repository
git clone https://github.com/ChiomaSarah/DemoCredit

# Navigate to the project directory

# Install dependencies
npm install
```

### Start Application

```bash
# restart dev server with nodemon
npm start

# build typescript
npm run build

```

## Database Migration

### Run Migrations

```bash
# Run pending migrations
npx knex migrate:latest

```

### Run seed files

```bash
npx knex seed:run

```

### Endpoints

- createUser: http://localhost:7000/api/register
- userLogin: http://localhost:7000/api/login
- fundWallet: http://localhost:7000/api/fund-wallet
- transferFund: http://localhost:7000/api/transfer
- withdrawFund: http://localhost:7000/api/withdraw
- transactionHistory: http://localhost:7000/api/transactions