To run the project, Docker (depends on your operating system) and Docker compose should be available on your computer.
There are some helper scripts to deliver smoother experience, but they require sh
-like environment (e.g. Bash
, zsh
).
The way to use scripts (this will take a while):
./start.sh
After all steps are finished, wait Docker containers to start and execute following:
./run_migrations.sh
To run tests launch the following command:
./run_tests.sh
If it does not work for you for some reason, do the following steps in your console manually:
- Build the project:
docker-compose build
docker-compose up
- Run migrations:
docker exec feed_php bin/console doctrine:migrations:migrate
- Run tests:
docker exec feed_php bin/phpunit
- Launch the project
Go to http://localhost:4210/
- DB: MySQL 8
- PHP 7.4
- Nginx
- Angular7 + TypeScript
- PHP + Symfony5
- PHPUnit
URL: POST /api/v1.0/users/register
Body:
{
"email": "[email protected]",
"password": "SecureP@ssw0rd",
"repeat": "SecureP@ssw0rd"
}
Password must be at least 6 symbols containing both letters and numbers.
Response (Response code is 201):
{
"success": true
}
URL: POST /api/v1.0/users/login
Body:
{
"username": "[email protected]",
"password": "SecureP@ssw0rd"
}
Response:
{
"success": true,
"username": "[email protected]"
}
URL: GET /api/v1.0/users/email/[email protected]
Response:
{
"is_free": true
}
URL: GET /api/v1.0/feeds
Response:
{
"mostPopularWords": {
"word1": 33,
"word2": 16,
"word3": 10
},
"items": [
{
"title": "Title",
"link": "https://link.go.com/test",
"summary": "<h4>Some text</h4>",
"lastModified": "2011-12-26T15:58:18+00:00",
"authorName": "",
"authorEmail": "",
"authorUri": ""
}
],
"title": "The Register - Software",
"logo": "https://www.theregister.co.uk/Design/graphics/Reg_default/The_Register_r.png",
"url": ""
}
User should be authorized to use this endpoint.
- Sensitive data are stored in project (like DB password for Docker setup). In production, all this should be done through special utilities like
helm
for Docker orChef
for hardware setup. - Backend is not fully covered with all possible tests. Frontend is not covered with tests at all.
- PHP session is used for authentication(Any token authentication system should be used instead).
- No API docs generators (NelmioApiDocBundle can be used).
- Not a real REST project (API Platform or FOSRestBundle can be used instead).
- No pre-commit hooks with Code style validation and static analysis added (I would use GrumPHP) for that.