All Projects → alissonphp → lumen-api-skeleton

alissonphp / lumen-api-skeleton

Licence: MIT License
Lumen API skeleton with JWT to manager tokens, Socialite to OAuth Providers, MongoDB driver and Predis to Redis cache storage.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to lumen-api-skeleton

lumen-oauth2
OAuth2 module for the Lumen PHP framework.
Stars: ✭ 29 (+31.82%)
Mutual labels:  oauth, lumen
lumen-route-list
Display all the registered route list in lumen application just like laravel.
Stars: ✭ 33 (+50%)
Mutual labels:  lumen
goth fiber
Package goth_fiber provides a simple, clean, and idiomatic way to write authentication packages for fiber framework applications.
Stars: ✭ 26 (+18.18%)
Mutual labels:  oauth
github-oauth-plugin
Jenkins authentication plugin using GitHub OAuth as the source.
Stars: ✭ 97 (+340.91%)
Mutual labels:  oauth
docker-lumen
Lumen running on top of a Docker LEMP stack.
Stars: ✭ 16 (-27.27%)
Mutual labels:  lumen
Authl
A library for managing federated identity
Stars: ✭ 20 (-9.09%)
Mutual labels:  oauth
phabricator-extensions
Github mirror of "phabricator/extensions" - our actual code is hosted in phabricator
Stars: ✭ 13 (-40.91%)
Mutual labels:  oauth
MrHuo.OAuth
.netcore 下最好用的第三方登录组件集合,集成了国内外大部分平台,欢迎使用。
Stars: ✭ 152 (+590.91%)
Mutual labels:  oauth
OpenAM
OpenAM is an open access management solution that includes Authentication, SSO, Authorization, Federation, Entitlements and Web Services Security.
Stars: ✭ 476 (+2063.64%)
Mutual labels:  oauth
okta-api-center
Get up and running quickly with Okta's OAuth as a Service and your favorite API Gateway.
Stars: ✭ 58 (+163.64%)
Mutual labels:  oauth
legacy-api-documentation
This is the 500px API documentation.
Stars: ✭ 19 (-13.64%)
Mutual labels:  oauth
Vulnerable-OAuth-2.0-Applications
vulnerable OAuth 2.0 applications: understand the security implications of your OAuth 2.0 decisions.
Stars: ✭ 224 (+918.18%)
Mutual labels:  oauth
Updoot
A reddit client built for android
Stars: ✭ 51 (+131.82%)
Mutual labels:  oauth
httpx-oauth
Async OAuth client using HTTPX
Stars: ✭ 55 (+150%)
Mutual labels:  oauth
lsso
Nginx SSO middleware for protecting your internets.
Stars: ✭ 42 (+90.91%)
Mutual labels:  oauth
lumen-start-app
Boilerplate for laravel/lumen framework https://github.com/laravel/lumen, ready to be used with https://github.com/ionghitun/react-start-app or https://github.com/ionghitun/next-start-app
Stars: ✭ 41 (+86.36%)
Mutual labels:  lumen
WooDroid
Simple, robust Woocommerce API sdk for java and android
Stars: ✭ 77 (+250%)
Mutual labels:  oauth
redux-oauth
Bearer token-based authentication library with OAuth2 support for redux applications.
Stars: ✭ 68 (+209.09%)
Mutual labels:  oauth
oauth
OAuth library for nim
Stars: ✭ 54 (+145.45%)
Mutual labels:  oauth
verdaccio-github-oauth-ui
📦🔐 GitHub OAuth plugin for Verdaccio
Stars: ✭ 56 (+154.55%)
Mutual labels:  oauth

Rest API Lumen Skeleton

Basic structure for creating REST APIs using Lumen Framework and extra packages

System requirements

  • PHP >= 5.6.4
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Mongo DB drive
  • PHPUnit
  • Redis Drive

Installation

$ git clone https://github.com/alissonphp/lumen-api-skeleton
$ cd lumen-api-skeleton/

IMPORTANT: configure .env (copy .env.example) at the root of the application with the development variables: connections with MySQL and MongoDB, APP Ids of the authentication services (google, facebook).

$ composer install
$ php artisan jwt:secret
$ php artisan migrate
$ php artisan db:seed
$ php -S localhost:8000 -t public

Development server running in: http://localhost:8000

Packages Used

Modularization

The application is architected in Modules. Each module has defined responsibility and   Layers. The standard model of a module follows the following structure:

app
└───Modules
│   │   Controllers
│   │   Events
│   │   Listeners
│   │   Middlewares
│   │   Models
│   │   Supports
│   │   Tests
│   │   routes.php

To enable / disable the functionality of a module simply inform the Namespace in the array of the config / modules.php file Important to verify interoperability between modules before deactivating it.

Routes

Routes are defined in the routes.php files within the root directory of each module. The RouteServiceProvider is responsible for loading the routes of each module defined in config / modules.php. No need to instantiate new calls.

Endpoints composition

Tests

There are two types of tests: Integration and Unit. The default directory where the cases should be is /Tests within the module under development. For integration tests use the "test + type + Test" naming standard, for example: LoginIntegrationTest (test: Login, type: Integration).

Run the tests using the command referencing the testsuite as 'unit' or 'integration':

$ phpunit --testsuite integration
$ phpunit --testsuite unit

Contributions

The purpose of this repository is to create a fast model for implementing REST APIs using the Lumen Framework. We still have enough to get close to an "ideal" model: rules for accessing endpoints, improving standards, writing tests, translations, etc.

Fork, enjoy and join us in this project! Send yours pull requests, share to your friends.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].