Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alifruliarso/simpleloan
Simple Loan REST API powered by Laravel Sail
https://github.com/alifruliarso/simpleloan
docker-compose laravel loan-application restful-api
Last synced: 4 days ago
JSON representation
Simple Loan REST API powered by Laravel Sail
- Host: GitHub
- URL: https://github.com/alifruliarso/simpleloan
- Owner: alifruliarso
- License: mit
- Created: 2023-03-14T05:48:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-03-14T07:00:43.000Z (over 1 year ago)
- Last Synced: 2023-10-18T05:00:29.135Z (about 1 year ago)
- Topics: docker-compose, laravel, loan-application, restful-api
- Language: PHP
- Homepage:
- Size: 94.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# Simple Loan _REST_ API
This project provides the following function:
1. Create User/Admin
2. Login User/Admin
3. Create a loan by User
4. Approve a loan by Admin
4. Pay the loan through scheduled payment## Setup local development
### Clone the project
-
```sh
git clone https://github.com/alifruliarso/simpleloan.git
cd simpleloan
```### Setup environment variable.
- Default api url : http://localhost:8000/api/
- MySQL can be accessed from host using port 33066, user=root with empty password
- For using different port, change it inside application's ```.env``` file
```
APP_PORT=8000
FORWARD_DB_PORT=33066
```### Install With Docker (Sail).
- Run the following command :```shell
cd simpleloan
cp .env.sample .env
make dev
```### Install Without Docker
1. Change the directory, and Install the dependencies:```shell
cd simpleloan
cp .env.sample .env
composer install
```2. Generate application key:
```shell
php artisan key:generate
```3. Run database migration with seeder:
```shell
php artisan migrate --seed
```4. Start the local server:
```shell
php artisan serve
```## Features
### API Documentation- Swagger UI : [http://localhost:8000/swagger-ui](http://localhost:8000/swagger-ui)
### Code style and lint using Laravel Pint
```shell
./vendor/bin/pint
```### Running the Test.
```shell
php artisan test
```### To generate the OpenAPI Specification file, run command:
```shell
composer openapi
```### docker-compose Commands
```shell
sail up Start the application
sail up -d Start the application in the background
sail stop Stop the application
sail restart Restart the application
sail ps Display the status of all containers
```### **Demo User Credentials**
```
Email: [email protected]
Password: 123456
```### **Demo Admin Credentials**
```
Email: [email protected]
Password: 123456
```## Credits
This starter kit is inspired by the project [Pandora](https://arifszn.github.io/pandora),
[laravel-makefile](https://github.com/kkamara/laravel-makefile/blob/main/README.md).