- PHP 7.x
- MySql database
- NPM
- Composer
The project by default uses the following database configuration (located in testLWs/app/config/parameters.yml.dist):
database_host: 127.0.0.1
database_port: ~
database_name: symfony
database_user: root
database_password: ~
Note: It all depends how the database settings are defined on your computer! Please update this file according your current local settings.
More info: Configuration of MySql
Please run the following for backend initialization:
composer install
php bin/console doctrine:database:create
php bin/console doctrine:schema:update --force
For the client files generation, please run:
npm install
npm run build
To run server:
php bin/console server:run
I chose 2 frameworks for the project:
- Symfony (Backend): as it(as a framework) gives us the power to have wrapper for all the possible php low-level features, e.g. super global varibales, response handling ...
- AngularJs (Frontend): as it gives us the ability to design the application with a completely modular structure
One of the enjoyable points of symfony is the cli tool that it provides to auto-create both creation and migration of the project. I used it for many parts, including entity creation and controller initialization. For the backend side, all of the used libraries are taken from the Symfony itself. All the routings are done by the annotations(decoration pattern).
For the frontend section, I used jQuery for the easier html operation handling, lodash for easier data processing, bootstrap for responsive design, ui-router for a better and more structured routing.
The application was inteded to work with usernames as email address, however in the current version the email address validation for the username is removed and the application accepts any username string with 2<=length<=30 and password with 8<=length<=15.
Any login with a new username will cause auto-registration of the user information. Any repeated username for the login will need the currect password to be entered.
After login and keeping the computer idle for 1 minute, it will logout automatically.