Giter VIP home page Giter VIP logo

dfcu-loans-api's Introduction

DFCU Loans API

This document describes how to set up and test run the outstanding loans API.

  • To see and test how the API works, please visit the docs page after starting the application

Tech Stack

This API is built using the following languages and tools

  • Backend: PHP >= 8.1 (Laravel Framework >= 10.2)
  • Database: MySQL
  • Package Managers: npm >= 6.14 with NodeJS >= 14.21, composer >= 2.0
  • Frontend: Javascript & CSS (Tailwind CSS >= 3.1)

Setup and running the project

Tasks and the respective commands

  1. Clone the repository
    git clone [email protected]:allandereal/dfcu-loans-api.git
  2. Move into the dfcu-loans-api directory
    cd dfcu-loans-api
  3. Install composer dependencies
    composer install
  4. Install javascript dependencies with npm
    npm install
  5. Copy the .env file from the .env.example file
    cp .env.example .env
  6. Generate the application key
    php artisan key generate
  7. Run migrations (update the database settings in the .env file first by setting the database, username and password)
    php artisan migrate
  8. Seed the database if you want to generate test data
    php artisan db:seed
  9. Start the development server at http://127.0.0.1:8000
    php artisan serve

Running Tests

Copy .env.testing file from .env and update database parameters to the testing database
cp .env.example .env.testing
Run php artisan test

User Interfaces

1. API performance Dashboard http://127.0.0.1:8000/dashboard

You are required to be authenticated to view this dashboard. You can use the following credentials generated by the php artisan db:seed command email: [email protected], password: password

Test account numbers and their responses (this works after running `php artisan db:seed``)

1000000001 => Returns outstanding loans 1000000002 => Return no outstanding loan

2. API Documentation http://127.0.0.1:8000/docs

To test run the API, you will need an access token that can be generated on the admin dashboard

Simulating the API

A command that takes sample account numbers and runs them through the API endpoint. A text file containing the API endpoint simulation results is saved in the public folder in the format loans-api-simulation-*.txt on completion. Please use the command php artisan loan:simulate to execute this.

Screenshots

Admin dashboard

Dark Theme admin dashboard dark

Light Theme
admin dashboard light

API Docs

api docs

Developers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.