Giter Site home page Giter Site logo

loan-app's Introduction

Loan App Game

The APP

  • Frontend: No frontend
  • Backend: http://localhost:80/api
  • Database
    • Hostname: mysql
    • Port: 3306
    • Username: root
    • Password:
    • Database: loan_app

Default tech stack

  • PHP 8.1.4
  • Laravel Framework 9.19.0
  • MySQL 8.0

My Tech Stack

  • PHPStorm
  • MySql
  • Laravel
  • Some spatie packages

Instructions to run the app

  • Composer install
  • Copy the .env.example to .env and fill the values
  • php artisan key:generate && php artisan migrate:fresh --seed
  • Use the postman collection to test the api

Clone the project

git clone https://github.com/nitinkaware/loan-app

Go to the project directory

cd loan-app

Install dependencies

composer install

Start the server with Sail - (make sure you have docker installed) OR Laravel Valet (Valet Preferences)

Run tests

php artisan test

Run migrations and seed the database

php artisan migrate:fresh --seed

API Reference

Register a user

POST /api/register
Parameter Type Description
email string Required.
name string Required.
password string Required and must match with password_confirmation
password_confirmation string Required

Login

This api is same for both users and admins.

POST /api/login
Parameter Type Description
email string Required
password string Required
device_name string Required

Request a new loan [AUTH REQUIRED]

POST /api/loan-requests
Parameter Type Description
amount_required float Required
terms_in_week integer Required

Approve a loan [ADMIN AUTH REQUIRED]

No request payload required.

POST /api/loan-requests/approve/{loan}

Make a repayment [AUTH REQUIRED]

POST /api/loan-repayments/repayment/{repayment}
Parameter Type Description
amount_paid float Required

View all my all loans [AUTH REQUIRED]

GET /api/loans
Parameter Type Description
cursor string Optional

loan-app's People

Contributors

nitinkaware avatar

Watchers

 avatar

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.