Simple site that displays what products are used by what users and what users are using what products.
Have Docker installed along with docker-compose. From the project root run:
docker-compose up --build
- Used docker compose to separate the frontend from the backend.
- Extended the express api with a /users route.
- Users route makes use of a model (handles db queries) and controller (logic) to aggregate user data and return an array of items.
- Made use of HAL for better responses to make the (limited) api explorable.
- Added a /users/:id route to get a single user
- Initialized the UI using create-react-app
- Used CSS modules along with sass to style in a modular extensible way.
- Table display the user data and is responsive to sizing. (resize window < 580px)
- Pagination in the get /users api request.
In its current state the application is quite basic. In hindsight, I would have used a ui/component framework to spend less time on styling and use that time to add features.
These are the things I'd add/change to make it more useable and pleasing:
- Break up the current sql query along with the data model so that I can display a minimal amount in the ui and give the user the option to display more (row expanding, modal, etc.).
- Add additional routes for products, and update the the current routes to include any necessary verbs.
- Add places in the UI for CRUD operations if it made sense to this type of application.
- Better error handling in the client and server.
- Validation in the server.
- API documentation.
- Thorough comments throughout the codebase.
- Unit testing using jest.
- pagination on the client side.
- Search functionality