Develop a simple web app allowing users to send emails. The app should have the following features:
- The main page should have a sidebar with a list of emails (Apple Mail style)
- When selecting an email from the sidebar, the selected email should be displayed on the right side of the screen
- The sidebar should contain a search bar at the top
- When typing text in the search bar, the list of emails in the sidebar should be filtered based on the search text
- We should do the filtering on the backend
- We should debounce the requests to the backend (i.e. wait for 500ms after the user stops typing before sending the request)
- The search should return results where either the
to,cc,bcc,subject, orsubjectfields contain the search text
The main page should have a button to compose a new email (placed at the bottom right corner of the screen). The following fields should be present in the compose email form:
- To
- CC
- BCC
- Subject
- Body
- No need to actually send the email - it's enough to save it in the database
- Do not spend more than 1h on this assignment, just do as much as you can in that time
- Please remove the
.nextfolder before sending the task - Please remove the
dev.sqlite3folder before sending the task - Please remove the
node_modulesfolders before sending the task - Please remove any other ignored files before sending the task
This is a monorepo. It has two folders:
frontend: This is the frontend of the application. It is built using Next.js.backend: This is the backend of the application. It is built using Fastify.
cd frontend- Go to the frontend folderyarn install- Install the dependenciesyarn dev- Start the development server (http://localhost:3000)cd ../backend- Go to the backend folderyarn install- Install the dependenciesyarn migrate- Run the knex db migrationsyarn dev- Start the development server (http://localhost:3001)
- MUI is installed and used for the design of the frontend.