The Feedback App allows us to collect feedback. Here is the requirement for the app.
- Anyone can submit feedback using this form.
- Anyone can see the number of submissions so far based on the date.
- Logged-in User can search, view and export the feedback from the Admin Interface.
- PHP 8+
- Mysql
- Apache 2.4+
- Composer 2+
- A github account
Note: You need to fork this repository. See How to submit your work?
- Create a database in your Mysql server
- Clone your forked repository
- Run composer install and create .env file
composer install
cp .env.example .env- Update the database settings in .env file
- Run database build to setup initial data
./vendor/bin/sake dev/build "flush=1"- Run the Dev server and access the site http://localhost:5050
php -S localhost:5050 -t public/You can access the admin interface using the http://localhost:5050/admin with the following credentials:
Credentials:
- Username: admin
- Password: password
- New Feedback Page Type: Create a new page type called "Feedback" Page. A new page of the "Feedback" type should be created under Home and accessed from the main menu.
- Add Feedback Form To Feedback Page: Add form to the Feedback Page which saves user entries to the database on submission. Form fields are:
- First Name
- Last Name
- Message
- Feedback Form Validations: Add the following validation using backend code to the form
- First Name - Should be a required field, have less than or equal to 20 characters, and only allow [A-Z] of both lower & upper cases
- Last Name - Should be required field, only have less than or equal to 20 characters and only allow [A-Z] of both lower & upper cases
- Email - Should be a required field and valid email format
- Message - Should be required field and only have less than or equal to 255
- Unit Test For Feedback Form Validations: Add PHPUnit test for the validation code in task 4.
- Admin Access to Feedback Submissions: Logged in user should be able to access submissions from the Admin interface with the following features:
- Submission should be sorted by First Name, Email, and submitted date.
- Submission should be searchable using First Name, Last Name, and Email.
- Submission can be exported as a CSV file which should have First Name, Last Name, Email, Message, and Submitted Date as columns.
- Stats On Feedback Submissions: Stats on the number of submissions by date for the last 10 days should be shown below the form in the front end. E.g.
- 10 - 11 Jan 2023
- 5 - 10 Jan 2023
- All tasks are to be completed in a week. The time starts as soon as you receive access to the code.
- How well you are using existing SilverStripe features to add this new functionality?
- How well you are following SilverStripe coding standards?
- Code is structured properly and easy to read. Simple clear code comments in the code will be helpful.
- Separate your commits by task and use the following format for your commit messages: {task heading - Bold text in task} - {time taken in hours} e.g. 'New Feedback Page Type - 3:20hr'.
- Having a simple UI for the feedback form(Please use the simple theme which comes with this repo). UI work will be only considered as a bonus.
-
First you need to fork this repository.
-
Install the app locally. See the installation guide.
-
Once you've completed your work, you can submit a pull request to the remote repository.
We will review the pull request and contact you regarding the next step.
