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.
- Host: GitHub
- URL: https://github.com/chiomasarah/democredit
- Owner: ChiomaSarah
- Created: 2024-01-11T08:50:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-14T20:51:04.000Z (over 2 years ago)
- Last Synced: 2025-06-11T14:21:40.429Z (12 months ago)
- Topics: data-seeding, db-migration, knexjs, mysql2, node-js
- Language: TypeScript
- Homepage: https://democredit.up.railway.app/
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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