This week you learned five big ideas - cache, queue, security, upload, real-time. You understood each one separately, but interviewers and production both want to see whether they all work together in one project. Today is for that weaving.
Today's work - growing the week 1-2 API itself
- Redis cache on the most-read endpoint (menu or product list) - with invalidation
- Moving email/notification sending after order confirmation into a BullMQ queue
- Helmet on, CORS only for your own domain, rate limit on login
- File upload on at least one endpoint - with multer, limit and type check
- When an order's status changes, telling the relevant user live with Socket.io
When the weaving is done, walk one full journey yourself: log in, place an order, check whether the notification is going through the queue, as an admin change the status and check whether the live update arrives on the customer's tab, and measure whether the menu's second request comes from cache. In this one journey, all three weeks of work get tested together.
If you get stuck somewhere, do not be discouraged - most of the time the problem is small: is Redis running? Is the worker started separately? Are the environment variables right? Production debugging happens exactly like this - checking step by step.
The mistake everyone makes
Practicing in a new empty project. The point of this week is standing on previous work - in a real job too, you will always build new features on running code, not on a blank page.
Today's practice
After finishing the five jobs above, walk the full journey once. Then say the week's three interview questions out loud: what will the cache invalidation strategy be, how will you implement rate limiting, why is cursor pagination better on big data.
How to say it in an interview
Test yourself: 'In my API, frequently read data is cached in Redis with invalidation, slow work runs behind in a queue, login is protected with rate limiting, and when an order's status changes the customer knows at once through Socket.io. Every part handles a separate responsibility.'