This project was built for animus.de
- *nix operation system (e.g. Ubuntu Linux, Mac OS)
php 7.1
or highermysql 5.6
or higherpython
(for create simple smtp debug server)
node.js
yarn
make install
-- install an application and create table in databasemake install-fe
-- install symfony-encode for demo application
make start
-- start backendmake stop
-- stop backendmake build-fe-prod
-- build js and css for demo application
- FOSRestBundle
- JMSSerializerBundle
- NelmioCorsBundle
- NelmioApiDocBundle
Field | Type | Length | Description |
---|---|---|---|
ID | int | 4 | Autoincrement field |
move-in-date | date | - | Date for move |
street | string | 255 | Street of apartment |
post code | string | 10 | Postal code |
town | string | 255 | City of apartment |
country | string | 255 | Country of apartment |
contact e-mail | 255 | Contact email | |
security token | string | 32 | Authorization token for edit or delete entity |
posted at | datetime | - | Date and time when entity was created |
edited at | datetime | - | Date and time when entity was edited last time or deleted |
Main controller of application.
Route name | HTTP Method | Location | Function |
---|---|---|---|
api_list | GET | /api/apartment | Get a list of apartments ordered by timestamp of creation with pagination |
api_view | GET | /api/apartment/{id} | Get an apartment by id |
api_create | POST | /api/apartment | Create new apartment |
api_edit | PUT | /api/apartment/{id} | Update an exists apartment by id. Required secret code in HTTP headers |
api_delete | DELETE | /api/apartment/{id} | Delete an exists apartment by id. Required secret code in HTTP headers |
Controller for testing with backend php rendering.
Route name | HTTP Method | Location | Function |
---|---|---|---|
list | GET | /apartment/ | Page with a list of apartment with pagination |
view | GET | /apartment/view/{id} | Page of single apartment |
create | GET,POST | /apartment/create | Form for creation a new apartment |
edit | GET,POST | /apartment/edit/{id} | Form for edit exists apartment by id. Required secret code in query string |
delete | GET | /apartment/delete/{id} | Location for deleting exists apartment by id. Required secret code in query string |
- Build skeleton for application
- Build apartment entity
- Build simple controllers
- Custom validation for some fields (eg. email)
- Pagination for apartments list
- RESTapi
- Create vue.js app (https://github.com/Sibirtsev/animus_fe)
- Add Makefile
- Add shell scripts for start and stop application
- README.md
- Migrations
- Image upload
- Custom error pages
- Extract symfony service from controller
- Unit tests
- Nginx
- Dockerize app
- Docker compose