✅ Social Media DB Schema Design (Users, Posts, Likes, Follows)
✅ Data Types (VARCHAR vs CHAR, INT vs BIGINT for phone numbers)
#chaicode#SQL#PostgreSQL#100DaysOfCode
Just covered SQL Part 2. Here are the topics
✅ Joins (Inner, Left, Right, Full Outer)
✅ Foreign Keys (Cascade, Set Null, Restrict)
✅ Indexing & EXPLAIN ANALYZE
✅ ACID Properties (Atomicity, Consistency, Isolation, Durability)
Attended an insightful webinar on Designing Production-Ready Databases for AI Products by @ChaiAurCode
Learned about production DB design and the architecture of the Mail to Master application.
Thanks, Shubham Sir, for the valuable insights!
#BuildInPublic#backend
Today I practiced Auth in Node.js/Express: middleware timing, bcrypt vs bcryptjs, password hashing, comparePassword, email verification with token hashing, and app setup with cookie-parser. Also learned next() is a callback that passes control to the next middleware.
Implemented full services for login, refresh, logout, and forgot-password from scratch. Continuously sharpening the backend toolkit!
#BuildInPublic#NodeJS#Backend#WebDev
Deep-dived into Node.js Backend & Authentication Workflows today
Focused on building production-grade RESTful APIs, securing sessions, and structuring clean architecture.
Security & Validation:
• Early request validation using DTOs to protect DB resources
• JWT structure: Header, Payload, Signature
• Hashing refresh tokens with sha256 & password hashing with salt
✅ Why res.status(201)? Because it's not just about sending data; it's about accurately communicating state (201 Created, 429 Too Many Requests, etc.) to the client.
✅ Why limit payloads? Because security is a backend responsibility.
#chaicode#BackendEngineer#NodeJS
Day 5
Key takeaways from my revision:
✅ Why Express? It eliminates the verbose, repetitive code required by Node's built-in http module.
✅ Why next()? If you forget it, your request hangs forever. Middleware is a relay race, and next() is the baton pass!
Day 4 of backend with chaicode web cohort
Today's deep dive into Express.js was a masterclass in request handling and security.
✅ Routing: Set up clean GET, POST, PUT, and DELETE routes using express.Router() or app.route().
✅ Middleware Flow: Traced the journey of a request: Client ➔ Server ➔ Middleware ➔ Route Handler ➔ Response.
✅ Logging & Rate Limiting: Built custom middleware to log every request and another to limit requests (returning a 429 status if exceeded).
✅ Status Codes: Got comfortable with 201 Created, 404 Not Found, and 204 No Content. ✅ Security First: Adopted a "Zero Trust" mindset and learned to limit request body sizes to prevent attacks.
Writing clean, scalable, and secure backend code is starting to click! 🧠
The Internals:
✅ The Event Loop cycle (Timers ➔ I/O Polling ➔ setImmediate ➔ Close Callbacks)
✅ Top-level code execution vs. Event Callbacks
✅ The UV_THREADPOOL_SIZE environment variable for handling async tasks
✅ Handling SIGINT for graceful server shutdowns
Day 3 of my Backend Journey: TypeScript + Node.js Internals 🛠️
Today was all about efficiency and understanding the "why" behind Node.js.
The Setup:
✅ TypeScript config (rootDir & outDir)
✅ Auto-compiling with tsc-watch
✅ Express.js + Type definitions (@types/express)