- Data Handling: Handled API requests using
fetchand Vue Query (TanStack), with caching methods likeuseQuery,prefetchQuery, andinvalidateQueries. - Component Styling: Used ShadCN for Vue as the base for components, along with Tailwind CSS for simple and responsive styling.
- Loading State: Added skeleton loaders for joke cards to improve user experience during API calls or retries.
- Pagination: Added server-side pagination and connected it to the front-end.
- Favorites Management: Created and connected favorite/unfavorite endpoint.
- Sorting: Added sorting options for ascending or descending order based on joke titles.
- Error Handling: Included a toaster to show error messages when users hit API limits.
Install the required dependencies by running:
cd ui && npm installTo start the development server with hot-reload:
cd ui && npm run devInstall the necessary dependencies by running:
cd api && npm installStart the backend development server with automatic restarts using nodemon:
cd api && npm run dev