Skip to content

zuamsyah/pos-api

Repository files navigation

REST API with Lumen

Build Status Total Downloads Latest Stable Version Latest Unstable Version License

Point of sales app, build with Lumen micro-framework.

live preview

Features

  • Validation
  • JWT Authentication
  • Models with proper relationships
  • API Response with Fractal
  • Pagination
  • Seeding Database
  • Error Handling
  • CORS Support
  • Endpoint Tests and Unit Tests
  • Postman Collection
  • RESTful routing
  • Filter data
  • Custom respond function
  • PostgreSQL Database

Requirements

  • PostgreSQL
  • PDO Driver PGSQL
  • PHP >=7.2
  • Composer
  • Apache service
  • Postman

Installation

  • git clone https://github.com/zuams/api-rupiah.id.git
  • cd api-rupiah.id
  • cp .env.example .env
  • composer install
  • Since Lumen doesn't have the php artisan key:generate command, there's a custom route http://localhost:8000/key to help you generate an application key. Copy key to APP_KEY
  • php artisan jwt:secret and Set to yourJWT_SECRET
  • Copy your API KEY Rajaongkir to RAJAONGKIR_API_KEY
  • Set your PostgreSQL connection details
  • php artisan migrate --seed
  • php -S localhost:8000 -t public
  • Postman collection link https://www.getpostman.com/collections/002a7a8f9d37d4e1ecb8

API Documentation

Swagger docs

Postman docs

License

The Lumen framework is open-sourced software licensed under the MIT license.