https://github.com/reiterus/microapi-core
MicroApi Core is an ultra-lightweight, tiny engine based on Symfony packages.
https://github.com/reiterus/microapi-core
api api-rest microapi php php8 reiterus rest-api restapi symfony
Last synced: 8 months ago
JSON representation
MicroApi Core is an ultra-lightweight, tiny engine based on Symfony packages.
- Host: GitHub
- URL: https://github.com/reiterus/microapi-core
- Owner: reiterus
- License: mit
- Created: 2023-04-05T04:43:16.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-09T15:24:14.000Z (almost 3 years ago)
- Last Synced: 2025-07-17T19:48:28.382Z (8 months ago)
- Topics: api, api-rest, microapi, php, php8, reiterus, rest-api, restapi, symfony
- Language: PHP
- Homepage:
- Size: 41 KB
- Stars: 7
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MicroAPI Core
MicroApi Core is an ultra-lightweight,
tiny engine based on Symfony packages.
It is intended for building **small REST API** applications.
Since MicroApi is based on the Symfony architecture,
it can be developed to **any level of complexity** if desired.
Forming your application based on this engine,
you will always be sure that there is
**nothing superfluous** in your code.
Features of MicroApi Core out of the box:
- all endpoints are public
- loading all types of env files
- use of attributes
- only two configuration files
- use autoload_runtime.php
- minimum php version: 8.1
- Docker
- JSON response to an exception
- Makefile
- quality tools
- PHP CS Fixer
- PHPStan
#### Join the development of MicroApi!
## Usage
It's very simple! Just run these two commands:
- `composer create-project reiterus/microapi-core folder && cd folder`
- `make docker-start`
That's all!
Now your API app is available at http://localhost:8008
## Engine progress
- [MicroApi Secure](https://github.com/reiterus/microapi-secure)
## Makefile commands
For the convenience of working with the project, there are several make-commands: local and for Docker.
See more...
#### Local
- make phpunit: run `./vendor/phpunit/phpunit/phpunit`
- make phpfixer: run `./vendor/bin/php-cs-fixer fix`
- make phpstan: run `./vendor/bin/phpstan analyse`
- make server: run `cd public/ && php -S 127.0.0.1:8008`
- make remover: run `rm -rf var/ && rm -rf vendor/`
#### Docker
- make docker-start: run `docker-compose up -d --build && docker-compose exec api composer install`
- make docker-restart: run `rm -rf var/ && rm -rf vendor/ && docker-compose up -d --build && docker-compose exec api composer install`
- make docker-build: run `docker-compose up -d --build`
- make docker-install: run `docker-compose exec api composer install`
- make docker-down: run `docker-compose down`
- make docker-rm: run `docker rm $(docker ps -aq) -f`
- make docker-rmi: run `docker rmi $(docker images -aq) -f`
## Installation
You can install the project in two ways
From packagist.org
```shell
composer create-project reiterus/microapi-core
```
From GitHub repository
```json
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/reiterus/microapi-core.git"
}
]
}
```
## License
This library is released under the [MIT license](LICENSE).