date: 2025-08-14
topics: [Next.js, TypeScript, Authentication, Error-Handling]
day: 28
Day 28 – Frontend and Debugging
✅ Work Done
- Frontend: Fixed ESLint warnings, debugged API route types, implemented NextAuth credential login with server-only tokens, built dynamic user profile page, handled cross-domain cookies, added toast notifications.
- DSA Practice: Check Even/Odd, Multiplication Table, Sum of Naturals & Squares, Swap Numbers, Closest Number, Dice Problem, Nth Term of AP.
📚 Key Learnings
- Next.js 15+ API routes require
await params
.
- Server-only tokens improve security; TypeScript interfaces prevent runtime errors.
- Cross-domain cookies need
SameSite=None
and Secure
.
- Mathematical formulas optimize iterative solutions; multiple swap techniques; edge case handling.
❌ Blockers
- Route param mismatches, NextAuth session config, TypeScript strict types, ESLint deps rules.
- Overthinking simple DSA problems, forgetting edge cases, formula mix-ups.
🧠 Reflection
Next.js 15 brings breaking changes; careful state management, async handling, and error feedback are key. DSA practice complements frontend debugging and builds problem-solving confidence.