🚀 Pull Request: Todo App Improvements and Redis Caching#3
Open
HarysVizcaino wants to merge 2 commits intomandrade86:mainfrom
Open
🚀 Pull Request: Todo App Improvements and Redis Caching#3HarysVizcaino wants to merge 2 commits intomandrade86:mainfrom
HarysVizcaino wants to merge 2 commits intomandrade86:mainfrom
Conversation
- Cache task list responses on GET /tasks - Invalidate cache on POST, PUT, and DELETE requests to ensure data consistency - Improves performance and reduces MongoDB load
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR includes several improvements and optimizations to the existing Todo application built with Next.js and Node.js:
✨ What’s New
• Redis Integration
• Implemented Redis caching for the GET /tasks endpoint.
• Added cache invalidation on task creation, update, and deletion to ensure data accuracy.
• Code Quality
• Refactored backend structure into controllers, services, and models for better separation of concerns.
• Added a reusable custom hook on the frontend for managing tasks state.
• Frontend Enhancements
• Added UI improvements using Tailwind CSS.
• Introduced toast notifications for better user feedback on actions (add, update, delete).
• Docker Setup
• Added docker-compose configuration to run MongoDB, backend, and frontend containers easily.
⸻
🧪 How to Test
1. Clone the repo and run docker-compose up from the root directory.
2. Visit http://localhost:3000 to access the frontend.
3. Interact with the Todo UI – all changes should reflect immediately, and data will persist.
4. Redis caching is applied for fast task fetching.
⸻
Demo Video:
https://youtu.be/vdcjjRE75X8
⸻
Let me know if any adjustments are needed or if you’d like me to split this PR by feature. Thanks for reviewing! 🙌