Skip to content

Repository files navigation

F4B Technical Test

Project Setup

Requirements: NodeJS

Steps to run the project local

  1. npm install

  2. npm run start

  3. npm run dev - To run in development mode

Swagger

Swagger docs can be found at http://localhost:3000/docs when the app is running.

Unit tests

  • npm run test

API

The server will listen on port 3000, and it exposes the following APIs:

  • POST - /account - Create a new bank account

    • firstName - string
    • lastName - string
    • dob - date
    • accountType - string ('savings' or 'current' or 'checking')
    • initialBalance - number
    • generates a unique 10-digit account number with the holder's name, account type, and initial balance
  • GET - /account/:accountNumber - Fetch account details by accountNumber

    • accountNumber - must be 10 digits
  • GET - /media/account - Fetch all bank accounts

Project Architecture

This project follows the clean architecture to achieve separation of concerns by dividing the software into layers.

  1. domain Layer - contains core business logic and entities. It is independent of any external technologies or frameworks.

  2. application Layer - orchestrates and coordinates the use cases (services) and interacts with the domain layer.

  3. adapters Layer - contains the implementations defined in the application layer.

  4. infrastructure Layer - contains the external components and technologies used by the application. It deals with the technical details of how data is stored, communicated, and presented.

The server.ts at the root of your project is the main application file, setting up the express server, middleware, and routes.

About

Flutterwave - Technical assessment

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages