Code Monkey home page Code Monkey logo

awesome-skeleton's Introduction

Awesome Skeleton for modern development on PHP 7.4+ (incl. PHP 8)

Contains quality tested packages, thoughtful structure and everything you need to develop microservices.

Build Status Code Coverage Scrutinizer Code Quality Total Downloads Latest Stable Version License


Installation

composer create-project 'sunrise/awesome-skeleton:^3.0' app

Cooking

Set up your database connection:

cp .env.example .env && nano .env

Execute a migration:

php bin/app migrations:migrate --service 'master' --no-interaction

Run CLI

incl.: Doctrine DBAL, Doctrine ORM, Doctrine Migrations.

php bin/app

Run via PHP

listen 0.0.0.0:3000

composer serve

Run via RoadRunner

listen 0.0.0.0:3000

Set up your server:

cp .rr.yml.example .rr.yml && nano .rr.yml

Run the server:

rr -dv serve

Run via Swoole

Coming soon...

Run tests

composer test

Run benchmarks

composer bench

Run routes through cURL

you may need to change the server address...

Home (index)

curl -X 'GET' 'http://127.0.0.1:3000/'

OpenAPI document

curl -X 'GET' 'http://127.0.0.1:3000/openapi'

Create an entry (example bundle)

curl -X 'POST' -H 'Content-Type: application/json' -d '{"name": "foo", "slug": "foo"}' 'http://127.0.0.1:3000/api/v1/entry'

Update an existing entry (example bundle)

you need to set an existing ID.

curl -X 'PATCH' -H 'Content-Type: application/json' -d '{"name": "foo", "slug": "foo"}' 'http://127.0.0.1:3000/api/v1/entry/b06fd41d-d131-4bb9-a472-eb583369437c'

Delete an existing entry (example bundle)

you need to set an existing ID.

curl -X 'DELETE' 'http://127.0.0.1:3000/api/v1/entry/b06fd41d-d131-4bb9-a472-eb583369437c'

Read an existing entry (example bundle)

you need to set an existing ID.

curl -X 'GET' 'http://127.0.0.1:3000/api/v1/entry/b06fd41d-d131-4bb9-a472-eb583369437c'

List of entries (example bundle)

curl -X 'GET' 'http://127.0.0.1:3000/api/v1/entry'

Useful commands

Deploy

bash bin/deploy

Down

bash bin/down 'Reason...'

Up

bash bin/up

Generate Systemd unit for RoadRunner

php bin/app app:roadrunner:generate-systemd-unit > app.service

Generate OpenApi document

php bin/app app:openapi:generate-document > openapi.json

Used stack

see composer.json

Used technology

RoadRunner

OpenApi (Swagger) specification

Json Schema specification


It may be useful to you

Awesome middlewares for your application


with โค๏ธ for you

awesome-skeleton's People

Contributors

fenric avatar renovate-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

awesome-skeleton's Issues

Swoole Worker

Is your feature request related to a problem? Please describe.
no.

Describe the solution you'd like

(new ServerRequestFactory)->createFromSwoole($swooleRequest);
(new ResponseFactory)->createFromSwoole($swooleResponse);

Describe alternatives you've considered
ready-made solution?

Additional context
no.

Workerman Worker

Is your feature request related to a problem? Please describe.
no.

Describe the solution you'd like

(new ServerRequestFactory)->createFromWorkerman($workermanRequest);
(new ResponseFactory)->createFromWorkerman($workermanResponse);

Describe alternatives you've considered
ready-made solution?

Additional context
no.

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.