CatLover App exercise #25
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CatLovers App (GWI Interview Task)
What this solves
Allows users to browse random cat images, explore breeds, and keep a list of favourites, all backed by TheCatAPI.
Getting started
Note
I suggest to use nvm for better compatibility and run
nvm use
before installing.env.sample
to.env
and add yourVITE_CAT_API_KEY
(If you don't have it, there is no pagination or using favorites).npm install
npm run dev
Note: The key was left intentionally in the
env.sample
file for reviewer's convenience (for the exercise) and because this is used by the client either way. In any other case it shouldn't be included in the repo.Please read more info in the
README.md
file in the repo for the project details.Live demo
https://exercise-beta-ashen.vercel.app/
Key features
Home (Random Cats)
/cats/:id
. We can utilisecanBookmark
to disable it in Favorites if we want to have urls specific to each view.Breeds
Favourites
/cat/:id
.Error handling and loading
Performance and caching
Testing and CI
lint
,type-check
, andtest
on every PRStructure
My goal was to strike the right balance between folder structure and component separation for a v0.1 project. In a larger team or enterprise app I’d adopt a more granular layout, but here I’ve kept things simple to make code reviews easier.
Libraries
Next steps (in priority order)
@apply
directivereact-window
.env
variables when it makes for multiple environment support. For exampleBASE_URL
etc.Thank you for taking the time to review it.