{"id":26715030,"url":"https://github.com/tarlepp/symfony-backend","last_synced_at":"2026-03-13T15:39:34.107Z","repository":{"id":147147033,"uuid":"55162645","full_name":"tarlepp/symfony-backend","owner":"tarlepp","description":"REST API with Symfony","archived":false,"fork":false,"pushed_at":"2017-05-03T17:30:55.000Z","size":1208,"stargazers_count":22,"open_issues_count":0,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-06T00:37:26.850Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tarlepp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-03-31T15:43:06.000Z","updated_at":"2024-10-29T11:20:18.000Z","dependencies_parsed_at":"2023-06-28T19:16:30.986Z","dependency_job_id":null,"html_url":"https://github.com/tarlepp/symfony-backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tarlepp/symfony-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarlepp%2Fsymfony-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarlepp%2Fsymfony-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarlepp%2Fsymfony-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarlepp%2Fsymfony-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tarlepp","download_url":"https://codeload.github.com/tarlepp/symfony-backend/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarlepp%2Fsymfony-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30469329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T11:00:43.441Z","status":"ssl_error","status_checked_at":"2026-03-13T11:00:23.173Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-27T13:51:47.942Z","updated_at":"2026-03-13T15:39:34.101Z","avatar_url":"https://github.com/tarlepp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is this?\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n[![Build Status](https://travis-ci.org/tarlepp/symfony-backend.png?branch=master)](https://travis-ci.org/tarlepp/symfony-backend)\n[![Coverage Status](https://coveralls.io/repos/github/tarlepp/symfony-backend/badge.svg?branch=master)](https://coveralls.io/github/tarlepp/symfony-backend?branch=master)\n\nSimple JSON API which is build on top of [Symfony](https://symfony.com/) framework.\n\nTable of Contents\n=================\n  * [What is this?](#what-is-this)\n  * [Table of contents](#table-of-contents)\n  * [Main points](#main-points)\n    * [TODO](#todo)\n  * [Requirements](#requirements)\n  * [Installation](#installation)\n    * [Environment checks](#environment-checks)\n    * [CLI](#cli)\n    * [WEB](#web)\n      * [Apache](#apache)\n    * [Configuration](#configuration)\n    * [Database initialization](#database-initialization)\n  * [Development](#development)\n    * [PHP Code Sniffer](#php-code-sniffer)\n    * [Database changes](#database-changes)\n    * [Tests](#tests)\n    * [XDebug](#xdebug)\n  * [Useful resources + tips](#useful-resources--tips)\n  * [Contributing \u0026amp; issues \u0026amp; questions](#contributing--issues--questions)\n  * [Authors](#authors)\n  * [LICENSE](#license)\n\n# Main points\n* This is just an API, nothing else\n* Only JSON responses from API\n* Easy REST API configuration and customization, see examples [here](src/App/Controller/BookController.php) and [here](src/App/Controller/UserController.php#L94)\n* JWT authentication\n* API documentation\n\n## TODO\n- [x] Configuration for each environment and/or developer\n- [x] Authentication via JWT\n- [x] CORS support\n- [ ] \"Automatic\" API doc generation (Swagger)\n- [x] Database connection (Doctrine dbal + orm)\n- [x] Console tools (dbal, migrations, orm)\n- [x] Docker support\n- [x] Logger (monolog) \n- [x] TravisCI tests\n- [x] Make tests, every endpoint\n- [ ] Docs - Generic \n- [ ] Docs - New api endpoint \n- [ ] Docs - New REST service\n- [ ] And _everything_ else...\n\n# Requirements\n* PHP 7.0+\n* Apache / nginx see configuration information [here](https://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html)\n \n# Installation\n* Use your favorite IDE and get checkout from git OR just use command ```git clone https://github.com/tarlepp/symfony-backend.git```\n* Open terminal, go to folder where you make that checkout and run following commands\n\nJWT SSH keys generation\n```bash\n$ openssl genrsa -out app/var/jwt/private.pem -aes256 4096\n$ openssl rsa -pubout -in app/var/jwt/private.pem -out app/var/jwt/public.pem\n```\n\nFetch all dependencies\n```bash\n$ curl -sS https://getcomposer.org/installer | php\n$ php composer.phar install\n```\n\nNote that this will also ask you some environment settings; db, mail, secrets, jwt, etc.\n\n## Environment checks\nYou need to check that your environment is ready to use this application in CLI and WEB mode.\nFirst step is to make sure that ```var``` directory permissions are set right. Instructions \nfor this can be found [here](http://symfony.com/doc/current/book/installation.html#book-installation-permissions).\n\n## CLI\nOpen terminal and go to project root directory and run following command.\n\n```bash\n$ ./bin/symfony_requirements\n```\n\nCheck the output from your console.\n\n## WEB\nOpen terminal and go to project root directory and run following command to start standalone server.\n\n```bash\n$ ./bin/console server:run\n```\n\nOpen your favorite browser with ```http://127.0.0.1:8000/config.php``` url and check it for any errors.\nAnd if you get just blank page double check your [permissions](http://symfony.com/doc/current/book/installation.html#book-installation-permissions).\n\n### Apache\nTo get JWT authorization headers to work correctly you need to make sure that your Apache config has `mod_rewrite` enabled. This you can do with following command:\n\n```bash\n$ sudo a2enmod rewrite\n```\n\n## Configuration\nApplication will ask your configuration settings when you first time run ```php composer.phar install``` command.\nAll those parameters that you should change are in ```/app/config/parameters.yml``` file, so just open that and \nmade necessary changes to it.\n\nIf you want to answer those parameter values again, you can just delete ```/app/config/parameters.yml``` file and\nthen run ```php composer.phar update``` command. \n\n## Database initialization\nAt start you have just empty database which you have configured in previous topic. To initialize your database\njust run following command:\n\n```bash\n$ ./bin/console doctrine:schema:update --force\n```\n\n## Creation of user groups and users\nFirst you need to create `user groups` for your `users`. You can create new user groups with following command:\n\n```bash\n$ ./bin/console user:createGroup\n```\n\nAnd after that you can create new users with following command:\n```bash\n$ ./bin/console user:create\n```\n\n# Development\n* [Coding Standards](http://symfony.com/doc/current/contributing/code/standards.html) \n\n## PHP Code Sniffer\nIt's highly recommended that you use this tool while doing actual development to application. PHP Code Sniffer is added to project ```dev``` dependencies, so all you need to do is just configure it to your favorite IDE. So the ```phpcs``` command is available via following example command.\n\n```bash\n$ ./vendor/bin/phpcs -i\n```\n\nIf you're using [PhpStorm](https://www.jetbrains.com/phpstorm/) following links will help you to get things rolling.\n* [Using PHP Code Sniffer Tool](https://www.jetbrains.com/help/phpstorm/10.0/using-php-code-sniffer-tool.html)\n* [PHP Code Sniffer in PhpStorm](https://confluence.jetbrains.com/display/PhpStorm/PHP+Code+Sniffer+in+PhpStorm)\n\n## Database changes\nGenerally you will need to generate migration files from each database change that you're doing. Easiest way to\nhandle these are just following workflow:\n\n1. Made your changes to Entity (```/src/App/Entity/```)\n2. Run diff command to create new migration file; \n```bash\n$ ./bin/console doctrine:migrations:diff\n```\n\nWith this you won't need to write those migration files by yourself, just let doctrine handle those - although remember to really look what those generated migration files really contains...\n\n## Tests\nProject contains bunch of tests (unit, functional, integration, etc.) which you can run simply by following commands:\n\n```bash\n# PHPUnit \n$ ./vendor/bin/phpunit\n\n# PHPSpec\n$ ./vendor/bin/phpspec run\n```\n\n* [PHPUnit](https://phpunit.de/)\n* [PHPSpec](http://www.phpspec.net/)\n\nOr you could easily configure your IDE to run these for you.\n\n## XDebug\nAdd following lines to your ```xdebug.ini``` file to get XDebug work:\n\n```\nxdebug.remote_enable=on\nxdebug.remote_autostart=off\n```\n\n# Useful resources + tips\n* [Symfony Development using PhpStorm](http://blog.jetbrains.com/phpstorm/2014/08/symfony-development-using-phpstorm/) - Guide to configure your PhpStorm for Symfony development\n* [PHP Annotations plugin for PhpStorm](https://plugins.jetbrains.com/plugin/7320) - PhpStorm plugin to make annotations really work\n* [Php Inspections (EA Extended) for IntelliJ IDEA](https://plugins.jetbrains.com/idea/plugin/7622-php-inspections-ea-extended-) - Static Code Analysis tool for PHP\n* Use 1.1-dev version of composer, so that you can use ```php composer.phar outdated``` command to check package versions\n\n# Contributing \u0026 issues \u0026 questions\nPlease see the [CONTRIBUTING.md](.github/CONTRIBUTING.md) file for guidelines.\n\n# Authors\n[Tarmo Leppänen](https://github.com/tarlepp)\n\n# LICENSE\n[The MIT License (MIT)](LICENSE)\n\nCopyright (c) 2017 Tarmo Leppänen","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarlepp%2Fsymfony-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarlepp%2Fsymfony-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarlepp%2Fsymfony-backend/lists"}