api/
- Symfony4 application - APIclient/
- React.js frontend application
- Application has a series of check to validate that host machine has all dependencies and configuration set up
- To run this check use the following command (if you are using docker run it inside the php container)
php bin/console monitor:health
- For more info about the tool look at the official documentation for LiipMonitorBundle
- Class naming concise and intuitive. Duplicate names are ok. Differentiation is done by namespaces.
- Slim Classes - One public method per class. Private methods are ok.
- For the new API endpoints, use actions instead of controllers. Examples of AbstractAction.
- Code is structured in folders that mimic GUI section that uses them. See example.
- Use Repository Interface instead of injecting Doctrine implementations.
- Repositories should contain only basic methods (findById, findBy, save). For more complex queries use QueryObjects.
- Routes structured by Laravel REST convention - see here - table under
Actions Handled By Resource Controller
- Routes are structured to follow the resoure relations. For example to get all comments one message for one thread, the route would be /thread/{thread_id}/message/{message_id}/comments
- Route parameters that do not uniquely define the resource should not be in route path, they shoud be in query params. For example, filters and pagination