This is a simple money transfer system built as part of an interview assessment. It utilizes NestJS as the primary framework, with KnexJS and ObjectionJS for database queries, PostgreSQL as the database, and Redis for caching.
- Introduction
- Requirements
- Features
- Setup and Installation
- API Documentation
- Endpoints
- Environment Variables
- Running the Application
Plaster is a lightweight money transfer system designed to facilitate secure and efficient financial transactions between users. Built with NestJS, this application provides a robust foundation for handling various financial operations.
- User registration and authentication
- Money transfer between users
- Secure data storage using PostgreSQL
- Caching mechanism for improved performance (Redis)
- Comprehensive API documentation (Swagger ft Postman)
- Nodejs 18 or later
- Postgres 15 or later (a docker image or native installation is fine)
- Nestjs (install here)
- Redis
To set up and run this application, follow these steps:
- Clone the repository:
git clone https://github.com/Richd0tcom/glowing-lamp.git && cd glowing-lamp- Install dependencies:
npm install-
Set up environment variables (see below for details).
-
Run migrations
npm run migrateupN/B run npm run seed to create two readily available test users locally.
- Run the application:
npm startThe API documentation is available at: this place on the internet
This documentation provides detailed information about all endpoints, request/response formats, and available parameters.
A Postman collection containing all the implemented endpoints can be found in the submission email
Create a .env file (you can also rename the .env.example file) in the root directory of your project and add the following variables:
DB_DATABASE=
DB_USER=
DB_PASSWORD=
DB_PORT=
NODE_ENV=
JWT_SECRET="CIA LEVEL SECRET"
REDIS_PORT=
REDIS_HOST=
Replace the values with your actual database and Redis connection details.
This application uses KnexJS with ObjectionJS for database interactions. The configuration is stored in knexfile.js. Make sure to update the DB_ values in the .env file to match your PostgreSQL instance.
Update the REDIS_HOST and REDIS_PORT in the .env file if you're using a remote Redis server.
