Create a NextJS application which allows you to manage users' addresses. The database schema with sample records is provided for you, you can set it up by running:
docker compose up
- The UI should only include what's required in task's description. There is no need to build authentication, menus or any features besides what's required.
- The UI should consist of:
- A paginated users' list. Add a mocked button to Create a new user above the list and in each record, a context menu with mocked Edit and Delete buttons.
- A paginated users' addresses list. The list should be visible after clicking a user record in the users' list.
- In the addresses list, include a context menu where you can Edit and Delete an address record.
- Add the ability to Create a new user address.
- Create and Edit forms should be implemented in modals.
- When inputting address fields, display a preview of the full address in the realtime in the following format:
<street> <building_number>
<post_code> <city>
<country_code>
- You may use any UI library: MUI, AntD, etc.
- Handle data validation errors coming from the server.
- Use the database schema provided. Do not modify it.
- Implement "Server Actions" which the frontend should use to interact with the database.
- You may use any ORM or Query Builder.
- Introduce simple data validation. Nothing fancy, you can use constraints from the database schema. Country codes use ISO3166-1 alpha-3 standard.
- Expect the application to eventually include many similar CRUD components (i.e. "users_tasks", "users_permissions", etc.), make your code modular, extensible and generic so that similar modules can be developed with less overhead.
- Keep the code clean, scalable, follow known conding conventions, paradigms, patterns, etc.
- Use TypeScript.
- You do not have to deploy the application, but prepare the codebase for deployment to an environment of your choice.