Run with docker
$ docker-compose up -d
Or run them individually
Steps are available in ./api and ./ui directories README.md
A cats gallery app.
- Picked up NextJS since the application isn’t currently behind any authentication system yet.
- Using SWR instead of react-query because it goes well with NextJS. Otherwise, I’d have picked up react-query to cache my fetch queries.
- About the UI, I got the main feature in the middle of the page with basic CSS and a nearly dumb logic.
- Made use of NextJS's cool server to get the fixture json data over network.
- Made use of react grid layout for the drag and drop feature in a 3 x 2 grid with 5 cards.
- Made use of react modal for the overlay feature.
- Find some fancy loader (Skeleton UI) or something quick to represent the loading state.
Using Starlette, and SQLAlchemy
- Got a simple get all cats resource ready.
- Made use of SQLite db that can hold the data instead of the static json file.
- A REST API that can fetch the data from this cats table and add data to this table.
- Added individual Dockerfile and wrote a docker-compose at the root dir. (Should be good for development env.).