The candidate should build a simple polling application using Phoenix framework as back-end and React as front-end. The application should allow users to create new polls, vote in polls, and see real-time updates of the poll results. The solution must use an SQL database as storage to persist users, polls and poll results. You are free to use any Elixir/Erlang library and any open-source CSS framework for the design.
- All code should be shared via private Github repository.
- The solution should be built using Phoenix for back-end and React for front-end.
- The solution should use database as a persistent storage.
- Users should be able to create account by inserting their username.
- Users should be able to create new polls.
- Users should be able to vote in existing polls.
- Users should be able to see real-time updates of the poll results.
- User can only vote once in a single poll.
- You are free to use any Elixir/Erlang library and any open-source CSS framework for the UI.
- The application should start with
mix phx.server
so it can be started locally. - The application should be well-structured, and the code should be readable.
- The database should be set up with Docker and should be started with docker-compose.
Please provide a link to a GitHub repository containing your solution to the above task. Your solution should include:
- A Phoenix/React application that meets the above requirements.
- A README file that explains how to set up and run the application. This includes any kind of set up instructions required for the database.
- Clear and concise documentation on how the application works, including any design decisions you made and any trade-offs you considered.
- Well-structured code that adheres to best practices and is easy to understand and modify.
- The core business functionality of the application must be covered by unit tests.
We will evaluate your solution based on the following criteria:
- Functionality: Does your application meet all the requirements listed above?
- Code quality: Is your code well-structured and easy to understand and modify? Does it adhere to best practices?
- Design decisions: Did you make thoughtful and well-reasoned design decisions? Did you consider trade-offs and explain your reasoning?
- Documentation: Is your README file clear and comprehensive? Does it include instructions for setting up and running the application? Does your documentation explain how the application works and any design decisions you made?
- Unit testing: Does your solution include unit tests that cover core business functionality?
Good luck!