Goal: Auth service का बेस सेटअप, DB schema, Redis, Kafka producer.
Highlights
- Express app setup और JSON middleware.
services/auth/src/app.ts - DB initialization (PostgreSQL via Neon) +
users,skills,user_skillstables +user_roleenum.
services/auth/src/index.ts - Redis connection setup (
REDIS_URL) for password‑reset token store.
services/auth/src/index.ts - Kafka producer setup +
send-mailtopic creation.
services/auth/src/producer.ts - DB connector (
DB_URL) wrapper.
services/auth/src/utils/db.ts
Key Components
appinitialization:express.json()+ routes mounting.initDb()bootstraps schema on startup.connectKafka()ensures topic exists before producing.
Goal: Register/Login/Forgot/Reset password flows और file upload handling.
Highlights
- Auth routes (register, login, forgot, reset).
services/auth/src/routes/auth.ts - Controller logic for:
registerUserwith role‑wise flow (jobseeker resume upload).
services/auth/src/controllers/auth.tsloginUserwith password verification + JWT.
services/auth/src/controllers/auth.tsforgotPassword+ Kafka email publish + Redis token store.
services/auth/src/controllers/auth.tsresetPasswordwith JWT validation + Redis token check.
services/auth/src/controllers/auth.ts
- Multer in‑memory upload for resume file.
services/auth/src/middleware/multer.ts - File buffer conversion to Data URI for upload service.
services/auth/src/utils/buffer.ts - Centralized error handling wrapper
TryCatch.
services/auth/src/utils/TryCatch.ts - Custom error class
ErrorHandler.
services/auth/src/utils/errorHandler.ts - Password reset HTML template.
services/auth/src/templete.ts
Key Flows
- Register (jobseeker): Multer file → Data URI → Upload service → DB insert → JWT.
- Forgot Password: JWT (15m) → Redis store (
forgot:<email>) → Kafkasend-mail. - Reset Password: JWT verify + Redis token match → password update → Redis delete.
Goal: Kafka mail consumer + Cloudinary upload API.
Highlights
- Kafka consumer for
send-mailtopic.
services/utils/src/consumer.ts - Nodemailer SMTP integration for sending emails.
services/utils/src/consumer.ts - Cloudinary config + upload API.
services/utils/src/index.ts - Upload route with
buffer+ optionalpublic_idreplace.
services/utils/src/routes.ts
Key Flow
- Send Mail: Kafka message → Nodemailer SMTP → email sent.
- Upload: Client sends
buffer→ Cloudinary upload → URL returned.
Goal: User service ka base setup aur initial contents add karna.
Highlights
- User service scaffold kiya: Express app + routes + controllers + middleware + utils.
services/user/src/index.ts - Auth middleware
isAuthadd kiya jo JWT verify karke user profile fetch karta hai.
services/user/src/middleware/auth.ts GET /api/user/meendpoint add kiya.
services/user/src/routes/user.ts- User service configs and scripts add kiye.
services/user/package.json services/user/tsconfig.json
Notes
services/userke liye.env.exampleadd ho gaya hai, actual.envrepo me nahi hai.
services/user/.env.example
Goal: User service me complete profile management features add karna.
Highlights
- Dependencies Update: Axios aur its type definitions add kiye for HTTP communication.
services/user/package.json- Added:
axios@1.13.5and@types/axios@0.9.36
- Added:
- Get User Profile by ID: Kisi bhi user ka profile fetch karne ka endpoint.
services/user/src/controllers/user.tsgetUserProfile()function with SQL query including user_skills and skills join- Aggregates skills array using
ARRAY_AGG - 404 error handling if user not found
- Update User Profile: User apna basic info update kar sake.
services/user/src/controllers/user.tsupdateUserProfile()updates name, phone_number, bio- Authenticated users only (via
isAuthmiddleware)
- Update Profile Picture: User apni profile pic upload/replace kar sake.
services/user/src/controllers/user.tsupdateProfilePic()uses multer for file upload- Converts file to buffer using
getBuffer() - Sends buffer to utils service via axios POST to
/api/utils/upload - Old profile pic replace ho jati hai (via
public_id) - Updates DB with new URL and public_id
- New Routes: 3 new routes added.
services/user/src/routes/user.tsGET /:userId- Get any user's profile (authenticated)PUT /update/profile- Update own profile info (authenticated)PUT /update/pic- Update profile picture (authenticated + multer)
Key Flows
- Get User Profile: Client sends userId → SQL query with joins → Returns user + skills array
- Update Profile: Client sends JSON → Validate auth → Update DB → Return updated fields
- Update Profile Pic: Client uploads file → Multer processes → Buffer conversion → Axios POST to utils service → Update DB with Cloudinary URL
Technical Details
- Axios configuration includes type safety with TypeScript generics
- Error handling via
ErrorHandlerfor 400/401/404 scenarios - All profile operations require JWT authentication
- Profile pic update integrates with existing utils/upload service
Goal: User resume update aur complete skill management features.
Highlights
- Update Resume: User resume upload aur replace functionality complete.
services/user/src/controllers/user.tsupdateResume()handles file upload via multer- Converts file to buffer aur sends to utils service
- Old resume replace via
resume_public_id - Returns updated user with new resume URL
- Add Skill to User: Complete transaction-based skill add flow.
services/user/src/controllers/user.tsaddSkillToUser()validates skill name- SQL transaction: INSERT skill (ON CONFLICT update) + INSERT user_skills (ON CONFLICT do nothing)
- Returns 200 if skill already exists, 201-like response if added
- Proper COMMIT/ROLLBACK transaction handling
- Delete Skill from User: User skill removal capability.
services/user/src/controllers/user.tsdeleteSkillFromUser()deletes from user_skills where skill name matches- Throws 404 if skill not found for user
- Auth Middleware Fix: Minor import cleanup (removed unused
evariable).
services/user/src/middleware/auth.ts - New Routes: 3 new endpoints wired.
services/user/src/routes/user.tsPUT /update/resume- Upload/replace resume (authenticated + multer)POST /skill/add- Add skill to user (authenticated, JSON body)DELETE /skill/delete- Remove skill from user (authenticated, JSON body)
Key Flows
- Update Resume: Client uploads → Multer processes → Axios POST to utils service → DB update
- Add Skill: Skill name → Check user exists → Insert skill (or reuse) → Link to user_skills → Transaction commit
- Delete Skill: Skill name → DELETE from user_skills → Validate deletion → Return success message
Technical Details
- Transaction handling with
BEGIN/COMMIT/ROLLBACKfor data consistency ON CONFLICTclauses prevent duplicate skills + user_skill linksdeleteSkillFromUser()uses subquery to find skill_id by name- All operations require JWT authentication
Goal: Job service ka base setup aur database schema initialize karna.
Highlights
- New
services/jobscaffold: config files, scripts, and env example.
services/job/package.json
services/job/tsconfig.json
services/job/.env.example - Job service ignore rules (node_modules, dist, .env) add kiye.
services/job/.gitignore - Express app setup + base routing for
/api/job.
services/job/src/app.ts - Job service DB init with enums and tables.
services/job/src/index.ts- Enums:
job_type,work_location,application_status - Tables:
companies,jobs,applications
- Enums:
- Shared utilities added (db, TryCatch, error handler, file buffer helper).
services/job/src/utils/db.ts
services/job/src/utils/TryCatch.ts
services/job/src/utils/errorHandler.ts
services/job/src/utils/buffer.ts - Auth middleware and multer in-memory upload added.
services/job/src/middleware/auth.ts
services/job/src/middleware/multer.ts
Key Flows
- Service boot initializes DB schema before starting server.
- Auth middleware validates JWT and attaches user context.
Goal: Company and job management endpoints implement karna.
Highlights
- Company management endpoints (create, delete, list, details).
services/job/src/controllers/job.tscreateCompany()recruiter-only with logo upload via utils servicedeleteCompany()recruiter-only delete (company ownership check)getAllCompany()lists recruiter companiesgetCompanyDetails()returns company with jobs via JSON aggregate
- Job management endpoints (create, update, list, single).
services/job/src/controllers/job.tscreateJob()recruiter-only, validates company ownershipupdateJob()recruiter-only, ownership validationgetAllActiveJobs()public listing with title/location filtersgetSingleJob()fetch by job id
- Job routes wired under
/api/job.
services/job/src/routes/job.ts
Key Flows
- Create Company: Logo upload → utils upload API → company insert
- Create Job: Recruiter auth → company ownership check → job insert
- List Jobs: Public search via query filters + active jobs only
Goal: Jobseeker side se job apply karna aur apni applications dekhna.
Highlights
- User controller me job application features add kiye.
services/user/src/controllers/user.tsapplyForJob()added with jobseeker-only guard- Resume-required validation before applying
- Duplicate application handling (
23505unique violation -> 409) - Subscription-based priority flag (
subscribed) set at apply time getAllaplications()added to list current user's applications with job details
- New user routes add kiye.
services/user/src/routes/user.tsPOST /apply/jobGET /application/all
Key Flows
- Apply Job: JWT auth -> role check (
jobseeker) -> resume presence check -> job active check -> application insert. - List My Applications: Authenticated user -> join
applications+jobs-> all own applications return.
Goal: Recruiter ko job applications manage karne aur status update par email trigger karne ka flow.
Highlights
- Job service me Kafka producer setup add kiya.
services/job/src/producer.tsconnectKafka()withsend-mailtopic ensurepublishToTopic()helper for async mail events
- Job service startup me Kafka connection initialize kiya.
services/job/src/index.ts - Application status mail template add kiya.
services/job/src/template.ts - Recruiter-side application APIs add kiye in job controller.
services/job/src/controllers/job.tsgetAllApplicationForJob()recruiter-only + ownership checkupdateApplication()recruiter-only status update + Kafkasend-mailpublish
- New job routes add kiye for application management.
services/job/src/routes/job.tsGET /application/:jobIdPUT /application/update/:id
- Job service env example me Kafka broker variable add hua.
services/job/.env.example
Key Flows
- Recruiter View Applications: Recruiter auth -> job ownership verify -> applications sorted by
subscribed DESC, applied_at ASC. - Update Application Status: Recruiter auth -> ownership verify -> status update -> Kafka event publish -> utils service sends email.
Goal: Utils service me Gemini AI based career and resume analysis endpoints add karna.
Highlights
- Utils service dependencies me Gemini SDK add kiya.
services/utils/package.json- Added:
@google/genai
- Added:
- Utils env example me Gemini API key variable add hua.
services/utils/.env.example- Added:
API_KEY_GEMINI
- Added:
- Utils routes me AI endpoints implement kiye.
services/utils/src/routes.tsPOST /careerfor skill-based career roadmap response in JSONPOST /resume-analyserfor ATS score + suggestions from resume PDF- Response sanitization/parsing logic to convert AI output into strict JSON
Key Flows
- Career Guidance: Skills input -> Gemini prompt -> structured JSON parse -> career path response.
- Resume Analysis: PDF base64 input -> Gemini multimodal request -> ATS JSON response (score + improvements).
Goal: Job portal ka frontend project scaffold karna Next.js ke saath, theming aur UI component library setup karna.
Highlights
- Next.js 16.1.6 app created with TypeScript (
React 19.2.3).
frontend/package.json - Tailwind CSS v4 configured with
@tailwindcss/postcss.
frontend/postcss.config.mjs - shadcn/ui initialized — base component library using
radix-ui,clsx,class-variance-authority,tailwind-merge. next-themesadded for light/dark/system theme support.- Global CSS setup with CSS variables (oklch color tokens) for light and dark modes.
frontend/src/app/globals.css - Utility function
cn()created insrc/lib/utils.ts(clsx + twMerge).
frontend/src/lib/utils.ts ThemeProviderwrapper component created usingnext-themes.
frontend/src/components/theme-provider.tsxModeTogglecomponent created — dropdown with Light / Dark / System options.
frontend/src/components/mode-toggle.tsx- shadcn UI components added via CLI:
Button— variants: default, outline, secondary, ghost, destructive, link | sizes: default, sm, lg, icon, icon-sm, icon-lg, xs
frontend/src/components/ui/button.tsxAvatar,AvatarImage,AvatarFallback,AvatarGroup,AvatarBadge
frontend/src/components/ui/avatar.tsxPopover,PopoverContent,PopoverTrigger,PopoverHeader,PopoverTitle,PopoverDescription
frontend/src/components/ui/popover.tsx
- Root layout wraps entire app with
ThemeProviderandNavBar.
frontend/src/app/layout.tsx
Key Flows
- Theme:
ThemeProvider(next-themes) →ModeToggledropdown → class-based dark mode via"use client"+useTheme(). - Styling pipeline: Tailwind CSS v4 →
@tailwindcss/postcss→ CSS variables (oklch) → shadcn token system → component classes viacn().
Goal: Full site navigation bar banana jo desktop + mobile dono pe responsive ho, auth-aware ho, aur dark mode support kare.
Highlights
DropdownMenushadcn component added via CLI (npx shadcn@latest add dropdown-menu).
frontend/src/components/ui/dropdown-menu.tsx- Components exported:
DropdownMenu,DropdownMenuTrigger,DropdownMenuContent,DropdownMenuItem,DropdownMenuSeparator,DropdownMenuLabel,DropdownMenuSub, and more.
- Components exported:
NavBarcomponent built — sticky, blurred, bordered top navigation.
frontend/src/components/navbar.tsx- Logo: "HireHeaven" with gradient blue/red styling.
- Desktop nav links: Home (
/), Jobs (/jobs), About (/about) usingButtonghost variant. - Auth-aware right side:
- Authenticated:
AvatarwithPopovershowing user name, email, "My Profile" link, and "Logout" button. - Unauthenticated: "Sign In" button linking to
/login.
- Authenticated:
- Mobile menu: animated slide-in panel (
max-htransition), hamburger icon (Menu) toggles to close (X). All nav links, profile, and logout replicated. ModeTogglepresent in both desktop and mobile views.isAuthandlogoutHandlerplaceholders set for future Redux/context integration.
- Home page (
page.tsx) scaffolded with a testButton.
frontend/src/app/page.tsx
Key Flows
- Mobile toggle:
toggleMenu()→isOpenstate →max-h-96 / max-h-0transition for smooth open/close. - Auth UI:
isAuthboolean → conditional render of Avatar+Popover (logged in) or Sign In button (logged out). - Theme toggle:
ModeToggle(DropdownMenu) →setTheme("light"|"dark"|"system")→ThemeProviderupdates class on<html>.
Goal: Services layer me cross-origin access aur route behavior ko frontend integration ke liye stabilize karna.
Highlights
- Auth service me
corsmiddleware add kiya for browser requests.
services/auth/src/app.ts - Job service me
corsmiddleware add kiya for frontend API calls.
services/job/src/app.ts - User service me
corsmiddleware add kiya and startup log cleanup.
services/user/src/index.ts - Auth dependencies update kiye (
cors,@types/cors).
services/auth/package.json services/auth/package-lock.json - Auth register flow me upload endpoint path normalize kiya:
API->api.
services/auth/src/controllers/auth.ts - Login validation message update: generic required-fields response.
services/auth/src/controllers/auth.ts - Job routes me company details endpoint ko public access diya (
GET /company/:idno auth middleware).
services/job/src/routes/job.ts - Job routes ordering adjust kiya to keep static/public routes predictable (
/:jobIdplaced after specific routes).
services/job/src/routes/job.ts - Utils routes me unused
rawimport remove kiya.
services/utils/src/routes.ts - Auth Kafka producer me send/error logging formatting cleanup kiya (no behavior change).
services/auth/src/producer.ts
Key Outcomes
- Frontend se Auth/Job/User services par direct requests ke liye CORS blockers remove hue.
- Company details endpoint unauthenticated users ke liye accessible hua (public job discovery flow).
- Auth-to-utils upload call path consistency improve hui (
/api/utils/upload).
Goal: Frontend base shell, dependencies, aur global styling ko stable state me lana.
Highlights
- Frontend dependency and lock consistency verify ki gayi.
frontend/package.json
frontend/package-lock.json - App root shell and theming base align kiya gaya.
frontend/src/app/layout.tsx
frontend/src/app/globals.css
Key Flows
- Install/run consistency:
npm install->npm run dev-> no dependency drift.
Goal: Landing page aur navigation ko responsive aur consistent banana.
Highlights
- Home hero placement and section structure refine kiya.
frontend/src/app/page.tsx
frontend/src/components/hero.tsx - Navigation behavior desktop/mobile views ke liye align kiya.
frontend/src/components/navbar.tsx
Key Flows
- Navbar state transitions verify: desktop menu, mobile toggle, auth-aware actions.
Goal: Login/register/forgot/reset user journey ko complete karna.
Highlights
- Login and register pages complete kiye gaye.
frontend/src/app/(auth)/login/page.tsx
frontend/src/app/(auth)/register/page.tsx - Forgot and reset password pages integrate ki gayi.
frontend/src/app/(auth)/forgot/page.tsx
frontend/src/app/(auth)/reset/[token]/page.tsx
Key Flows
- User auth flow: register/login -> forgot password -> reset by token.
Goal: Frontend me shared data contracts aur global context ko stabilize karna.
Highlights
- App-level type definitions centralize kiye gaye.
frontend/src/type.ts - Shared app context wiring complete ki gayi.
frontend/src/context/AppContext.tsx
Key Flows
- Typed state flow: context provider -> consumer components -> predictable UI state.
Goal: Jobs listing page ko production-ready discovery UX dena.
Highlights
- Jobs listing page improve ki gayi.
frontend/src/app/jobs/page.tsx - Reusable job card component integrate hua.
frontend/src/components/job-card.tsx
Key Flows
- Job browse flow: list render -> card view -> details navigation.
Goal: Single job page aur async states ko polish karna.
Highlights
- Single job details page finalize ki gayi.
frontend/src/app/jobs/[id]/page.tsx - Shared loading component use karke consistent async UX diya gaya.
frontend/src/components/loading.tsx
Key Flows
- Job details flow: fetch -> loading -> success/error state handling.
Goal: Company profile route ko public viewing ke liye complete karna.
Highlights
- Company details page with related job information complete ki gayi.
frontend/src/app/company/[id]/page.tsx
Key Flows
- Company discovery: company page open -> company info + jobs mapping display.
Goal: Account routes ka base profile shell complete karna.
Highlights
- Account landing and profile routes finalize kiye gaye.
frontend/src/app/account/page.tsx
frontend/src/app/account/[id]/page.tsx
Key Flows
- Account route flow:
/account->/account/[id]with structured sections.
Goal: Account screen ke modular sections complete karna.
Highlights
- Profile info and skills components complete hue.
frontend/src/app/account/components/info.tsx
frontend/src/app/account/components/skills.tsx - Company and applied jobs sections integrate hue.
frontend/src/app/account/components/company.tsx
frontend/src/app/account/components/appliedJobs.tsx
Key Flows
- Account modules flow: profile info -> skills -> company -> applied jobs.
Goal: Subscription-to-payment success user journey complete karna.
Highlights
- Subscription page interactions finalize hui.
frontend/src/app/subscribe/page.tsx - Payment success callback page complete hui.
frontend/src/app/payment/success/[id]/page.tsx
Key Flows
- Conversion flow: subscribe action -> payment callback -> success state rendering.
Goal: Career guide aur resume analyser components ko app flow me align karna.
Highlights
- Career guide component complete and integrated.
frontend/src/components/career-guide.tsx - Resume analyser component complete and integrated.
frontend/src/components/resume-analyser.tsx
Key Flows
- AI utility flow: input capture -> processing -> structured output display.
Goal: External script handling ko safe lifecycle behavior ke saath stabilize karna.
Highlights
- Script loader component finalize hua with controlled loading behavior.
frontend/src/components/scriptLoader.tsx
Key Flows
- External SDK flow: mount -> load -> ready -> cleanup.
Goal: Reusable UI primitives me design and behavior consistency maintain karna.
Highlights
- Updated/new UI primitives review and normalization complete hua.
frontend/src/components/ui/button.tsx
frontend/src/components/ui/avatar.tsx
frontend/src/components/ui/popover.tsx
frontend/src/components/ui/dropdown-menu.tsx
frontend/src/components/ui/card.tsx
frontend/src/components/ui/dialog.tsx
frontend/src/components/ui/input.tsx
frontend/src/components/ui/label.tsx
frontend/src/components/ui/select.tsx
Key Flows
- Component reuse flow: common props -> shared styles -> predictable interaction patterns.
Goal: Branding assets aur static pages ko final polish dena.
Highlights
- About page content and layout complete hua.
frontend/src/app/about/page.tsx - Public assets integrate and optimize kiye gaye.
frontend/public/hero.jpeg
frontend/public/about.jpg
frontend/public/user.png
Key Flows
- Static render flow: route open -> optimized image assets -> stable layout.
Goal: Full frontend routes ka integration QA pass complete karna.
Highlights
- Route-to-route manual regression run kiya gaya (auth -> jobs -> account -> subscribe).
- API response mapping verify ki gayi with active backend endpoints.
Key Flows
- End-to-end smoke flow: authentication -> browsing -> profile actions -> payment confirmation.
Goal: Final bug-fix closure aur release documentation complete karna.
Highlights
- QA backlog se critical UI/flow issues close kiye gaye.
- Frontend release summary and documentation freeze complete hua.
Key Flows
- Release handover flow: final validation -> docs sync -> deployment-ready state.
Goal: Core user-facing routes ko fully integrated state me document aur align karna.
Highlights
- Auth flow pages (login/register/forgot/reset) integration complete.
frontend/src/app/(auth)/login/page.tsx
frontend/src/app/(auth)/register/page.tsx
frontend/src/app/(auth)/forgot/page.tsx
frontend/src/app/(auth)/reset/[token]/page.tsx - Home and about pages with navigation flow aligned.
frontend/src/app/page.tsx
frontend/src/app/about/page.tsx
frontend/src/components/navbar.tsx
Key Flows
- Visitor flow: Home -> About -> Auth pages -> back to protected features.
Goal: Job discovery aur company information flows ko stable user journey me complete karna.
Highlights
- Jobs listing and job details route coverage complete.
frontend/src/app/jobs/page.tsx
frontend/src/app/jobs/[id]/page.tsx - Company details page integration with related display flow complete.
frontend/src/app/company/[id]/page.tsx - Reusable job rendering components finalized.
frontend/src/components/job-card.tsx
frontend/src/components/loading.tsx
Key Flows
- Discovery flow: Job list -> Job details -> Company details.
Goal: User account dashboard aur subscription/payment flow ko end-to-end complete karna.
Highlights
- Account base pages and profile route integration complete.
frontend/src/app/account/page.tsx
frontend/src/app/account/[id]/page.tsx - Account subcomponents consolidated (info, skills, company, applied jobs).
frontend/src/app/account/components/info.tsx
frontend/src/app/account/components/skills.tsx
frontend/src/app/account/components/company.tsx
frontend/src/app/account/components/appliedJobs.tsx - Subscription and payment success flow verified.
frontend/src/app/subscribe/page.tsx
frontend/src/app/payment/success/[id]/page.tsx
Key Flows
- User flow: Profile dashboard -> plan subscribe -> payment success callback.
Goal: Reusable UI primitives, shared types, aur context ko maintainable structure me align karna.
Highlights
- Shared type contracts and global context wiring stabilized.
frontend/src/type.ts
frontend/src/context/AppContext.tsx - Expanded UI primitives normalized for consistent behavior.
frontend/src/components/ui/button.tsx
frontend/src/components/ui/avatar.tsx
frontend/src/components/ui/popover.tsx
frontend/src/components/ui/dropdown-menu.tsx
frontend/src/components/ui/card.tsx
frontend/src/components/ui/dialog.tsx
frontend/src/components/ui/input.tsx
frontend/src/components/ui/label.tsx
frontend/src/components/ui/select.tsx
Key Flows
- Component reuse flow: shared props + shared variants -> predictable UI rendering.
Goal: AI utility features aur external script flows ko finalize karna.
Highlights
- Career guide and resume analyser components integrated and validated.
frontend/src/components/career-guide.tsx
frontend/src/components/resume-analyser.tsx - External script loader lifecycle handling finalize ki gayi.
frontend/src/components/scriptLoader.tsx
Key Flows
- AI interaction flow: input -> process -> structured output render.
Goal: Frontend performance ko optimize karke faster load/render experience dena.
Highlights
- Image Optimization: Job cards me native
<img>ki jagah Next.jsImageuse kiya gaya with lazy loading.
frontend/src/components/job-card.tsx - Lazy Loading + Code Splitting: Heavy components ke liye lazy loading utilities add ki gayi.
frontend/src/lib/lazyLoad.tsx - Debounce Utilities: Search/input interactions optimize karne ke liye debounce helpers add kiye gaye.
frontend/src/lib/debounce.ts - Pagination Component: Reusable pagination UI add kiya for large lists.
frontend/src/components/ui/pagination.tsx - Applied Jobs Pagination: Account page par applied jobs list me paginated rendering add hui.
frontend/src/app/account/components/appliedJobs.tsx - Job Applications Pagination: Recruiter-side job applications list me pagination + memoized filtering integrate hua.
frontend/src/app/jobs/[id]/page.tsx - Search Debouncing Validation: Jobs listing page ke debounce behavior ko validate/retain kiya gaya.
frontend/src/app/jobs/page.tsx
Key Flows
- Image Rendering Flow: Optimized image component -> lazy fetch -> stable layout rendering.
- Listing Performance Flow: Data list -> memoized filtering -> paginated slice -> reduced DOM render cost.
- Search Performance Flow: User typing -> debounce delay -> controlled API calls -> smooth interaction.
Optimization Coverage
- Image optimization + lazy loading for media-heavy UI.
- On-demand component loading for modal/secondary interactions.
- Pagination for large datasets to reduce initial render load.
- Debounced search/filter calls to avoid API thrashing.
Goal: Subscription payment flow ko backend service level par introduce karna aur related auth/frontend reliability improve karna.
Highlights
- New
services/paymentmicroservice scaffold and runtime setup add hua.
services/payment/package.json
services/payment/tsconfig.json
services/payment/src/index.ts - Razorpay instance configuration with env-based credentials add ki gayi.
services/payment/src/index.ts - Payment controller me checkout and payment verification handlers implement hue.
services/payment/src/controllers/payment.tscheckOut()prevents duplicate active subscription and creates Razorpay orderpaymentVerification()validates signature and extends subscription by 30 days
- Payment routes add hue with protected endpoints.
services/payment/src/routes/payment.tsPOST /checkoutPOST /verify
- Payment auth middleware add hua for token-based user context resolution.
services/payment/src/middlewares/auth.ts - Frontend subscribe page me Razorpay key hardcoded value se env-driven value par shift ki gayi.
frontend/src/app/subscribe/page.tsx - Razorpay script loader me failure state/error handling add hua.
frontend/src/components/scriptLoader.tsx - User service auth middleware me missing/empty token guard aur structured error logging improve kiya gaya.
services/user/src/middleware/auth.ts
Key Flows
- Checkout Flow: Authenticated user -> subscription validity check -> Razorpay order creation.
- Verification Flow: Razorpay callback payload -> HMAC signature verification -> user subscription expiry update.
- Frontend Payment Init Flow: Env Razorpay key resolve -> script load success/failure handling -> checkout open.
Goal: Project ko containerized local stack me run/deploy karne ke liye complete Docker setup add karna.
Highlights
- Root-level Docker Compose orchestration add hui for full stack startup.
docker-compose.yml- Infra services: PostgreSQL, Redis, Zookeeper, Kafka
- App services: frontend, auth-service, user-service, job-service, utils-service, payment-service
- Health checks +
depends_onconditions for startup order
- Centralized docker env template add hua for all services and infra config.
.env.docker.example - Frontend multi-stage Dockerfile add hua for Next.js build + runtime image.
frontend/Dockerfile - Backend services ke liye multi-stage Dockerfiles add hue (
build+ production runtime):
services/auth/Dockerfile
services/user/Dockerfile
services/job/Dockerfile
services/utils/Dockerfile
services/payment/Dockerfile - Build-context size optimize karne ke liye docker ignore files add ki gayi.
frontend/.dockerignore
services/auth/.dockerignore
services/user/.dockerignore
services/job/.dockerignore
services/utils/.dockerignore
services/payment/.dockerignore
Key Flows
- Compose Boot Flow:
docker compose up --build-> infra healthcheck pass -> service containers start. - Container Runtime Flow: Service image build -> compiled output/run command -> exposed port mapping.
- Env-driven Deployment Flow:
.env.dockervalues -> compose environment injection -> consistent local stack behavior.
Goal: Async email messaging ko Kafka se Bull Queue (Redis-based) mein migrate karke infrastructure simplify karna.
Highlights
- Auth Service ne Kafka ko Bull Queue mein replace kiya for email job queuing.
services/auth/src/app.ts
services/auth/src/producer.tsconnectKafka()naa naam hai par Bull Queue init karta haipublishToTopic()emails ko queue mein add karta hai with 3 retry attempts + exponential backoff- package.json mein
bullv4.11.5 aurredisv5.10.0 add kiye gaye
- Job Service ne same pattern follow kiya with Bull Queue for email publishing.
services/job/src/app.ts
services/job/src/producer.ts- Email queuing logic Bull-based hai now
- Retry + timeout error suppression implemented
- Utils Service ne Bull Queue consumer setup kiya with Nodemailer integration.
services/utils/src/consumer.ts
services/utils/src/index.tsstartSendMailConsumer()Bull queue process job listeners setup karta hai- Queue process 5 concurrent jobs handle karta hai
- Nodemailer SMTP via Gmail configured
- Job failures par auto-retry with exponential backoff (2s delay)
- Redis TLS support for Upstash serverless setup
- Docker files aur Kafka infrastructure removed (local dev simplification ke liye).
- Deleted:
docker-compose.yml,Dockerfile(all services),.dockerignore(all services),.env.docker.example
- Deleted:
- All .env.example files updated to remove Kafka + Docker references.
services/auth/.env.example, services/user/.env.example, etc.
Key Flows
- Email Queue Flow (Auth/Job): Service event ->
publishToTopic()call -> Bull queue job add -> return immediately (non-blocking). - Email Processing Flow (Utils): Bull job listener active ->
emailQueue.process()handler -> Nodemailer SMTP send -> on success/failure log. - Retry Flow: Job fails -> exponential backoff (2s delay) -> 3 max attempts -> if all fail, error logged + job discarded.
- Env-driven Connectivity: Redis URL from
REDIS_URLenv -> TLS rejectUnauthorized false -> Upstash compatible.
Goal: Bull Queue migration ke baad naming consistency improve karna, auth error logs harden karna, aur frontend lint-safe subscription check clarify karna.
Highlights
- Auth service queue lifecycle naming Kafka terminology se Bull terminology me normalize ki gayi.
services/auth/src/app.ts
services/auth/src/producer.tsconnectKafka()rename karkeinitEmailQueue()kiya gayadisconnectKafka()rename karkecloseQueue()kiya gaya- App bootstrap ab
initEmailQueue()call karta hai
- Job service me bhi same naming cleanup apply hua for queue initialization.
services/job/src/app.ts
services/job/src/producer.tsconnectKafka()->initEmailQueue()disconnectKafka()->closeQueue()
- Job controller error message wording Bull Queue context ke hisaab se update hui.
services/job/src/controllers/job.ts- Publish failure log ab Kafka topic ke badle Bull Queue ko reference karta hai
- Job aur Payment auth middleware me token validation failure logging improve hui.
services/job/src/middleware/auth.ts
services/payment/src/middlewares/auth.ts- Generic
console.log(error)replace karke scopedconsole.error+ message logging add hua
- Generic
- Frontend account info component me memoized subscription check ke liye lint intent explicitly documented ki gayi.
frontend/src/app/account/components/info.tsxreact-hooks/purityrule ke liye targetedeslint-disable-next-lineadd hua jahaDate.now()time-based check required hai
Key Flows
- Queue Bootstrap Flow: service start ->
initEmailQueue()call -> queue client initialize -> request handlers non-blocking publish continue. - Failure Observability Flow: auth failure catch -> scoped
console.errormessage -> consistent debugging context across services. - Time-based Subscription Flow: subscription timestamp compare with current time (
Date.now()) -> active/inactive badge resolution.
Goal: Latest refactor changes ko quick traceability ke liye sirf direct file references ke through map karna.
Highlights
- services/auth/src/app.ts
- services/auth/src/producer.ts
- services/job/src/app.ts
- services/job/src/producer.ts
- services/job/src/controllers/job.ts
- services/job/src/middleware/auth.ts
- services/payment/src/middlewares/auth.ts
- frontend/src/app/account/components/info.tsx
Key Flows
Goal: Email delivery stack ko Gmail SMTP se Resend API par migrate karke auth/payment events ke liye richer transactional templates integrate karna.
Highlights
- Utils service mail consumer me provider migration complete hua: Nodemailer SMTP se Resend API flow me switch kiya gaya.
services/utils/src/consumer.ts - Utils dependency graph update hua:
nodemailerremove karkeresendpackage add kiya gaya.
services/utils/package.json - Auth templates expand huye: welcome, login alert, aur subscription invoice templates add/improve kiye gaye.
services/auth/src/templete.ts - Auth login/register flows me transactional email integration wire ki gayi.
services/auth/src/controllers/auth.ts - Payment verification success ke baad subscription invoice email trigger add hua.
services/payment/src/controllers/payment.ts
Key Flows
- Auth Welcome/Login Flow: register/login event -> queue publish -> utils consumer -> Resend API dispatch.
- Subscription Invoice Flow: payment verify success -> invoice template payload -> send-mail queue -> Resend delivery.
- Provider Migration Flow: SMTP config dependency removal -> API key based Resend client init -> transactional send operation.
Goal: Email queue delays causing spam issues ko eliminate karne ke liye Bull Queue architecture ko completely remove karke direct Resend API calls integrate karna.
Problem Identified
- Bull Queue based system emails mein 30+ second delay add kar raha tha
- Queue processing batch-wise hota tha jisse spam filters ko suspicious pattern dikhta tha
- Peak hours par queue backlog build hota tha aur delivery fail hota tha
- Original Kafka setup ne direct send karta tha, Bull Queue ne bottleneck create kiya
Highlights
- Auth Service ab direct Resend API calls use karta hai for all email events.
services/auth/src/controllers/auth.ts- RegisterUser endpoint ab instant welcome email send karta hai (no queue)
- LoginUser endpoint ab instant login alert email send karta hai
- ForgotPassword endpoint ab instant reset link email send karta hai
- All endpoints use
new Resend(process.env.RESEND_API_KEY)+resend.emails.send()pattern - Producer.ts completely remove kar diya gaya
- Package.json se
bull+redisdependencies remove,resendpackage add kiya
- Payment Service ab direct Resend API calls use karta hai for subscription invoices.
services/payment/src/controllers/payment.ts- PaymentVerification endpoint ab instant subscription invoice email send karta hai
resend.emails.send()synchronous call with subscription template- Producer.ts completely remove kar diya gaya
- Package.json se bull dependencies remove,
resendpackage add kiya
- App initialization se Queue bootstrap code completely removed.
services/auth/src/app.ts
services/payment/src/index.tsinitEmailQueue()import aur call completely remove kar diya- No queue client initialization overhead on startup
- Faster app startup time
- Utils Service ke unused queue infrastructure clean up.
services/utils/src/consumer.ts — DELETED- Bull Queue consumer completely remove kar diya, ab koi email processing nahi
- Utils service ab sirf AI endpoints + file uploads handle karta hai
- Redis ab sirf password reset tokens store karta hai (queue nahi).
- Connection overhead minimal
- Upstash Redis cost further optimize ho sakta hai
Email Flow (NEW)
User Register/Login/Forgot Password Event
-> Auth Controller
-> resend.emails.send({ to, from, subject, html })
-> Resend API instant delivery
-> Email in inbox within seconds (no queue delay)
Benefits Achieved
- ✅ Zero queue delay: 30+ seconds → 0 seconds
- ✅ Instant delivery: Email sends with request completion
- ✅ Higher deliverability: Resend provider integration with verified sender domain
- ✅ Simpler architecture: No consumer/producer pattern overhead
- ✅ Better spam scores: Instant single emails vs batch queue patterns
- ✅ Faster app startup: No queue client initialization
- ✅ Reduced complexity: Less moving parts to debug
Code Changes Summary
- Auth Service: 4 files modified (1 deleted, including producer.ts)
- Payment Service: 4 files modified (1 deleted, including producer.ts)
- Utils Service: 1 file deleted (consumer.ts)
- Total lines removed: ~400 lines of queue boilerplate
- Total files deleted: 3 (producer.ts × 2, consumer.ts)
Key Flows
- Direct Email Flow: Register/Login/Forgot → resend.emails.send() → Response 200
- Subscription Email Flow: PaymentVerify success → resend.emails.send() → Invoice delivered
- No Queue Flow: Eliminated completely, replaced with synchronous Resend API
Deployment Notes
- All 5 services continue running (Utils service no longer has queue consumer)
- Railway auto-redeploy picks up new code
- RESEND_API_KEY must be set in environment variables
- Sender email verification:
onboarding@resend.dev(verified in Resend)
Goal: Platform-level moderation aur monitoring ke liye full admin panel rollout karna with backend admin routes across User, Job, aur Payment services.
Highlights
- Frontend route-group restructuring hua so public site routes ko
(site)layout ke under isolate kiya gaya, jabki admin routes ka separate shell bana.
frontend/src/app/(site)/layout.tsx
frontend/src/app/layout.tsx - Frontend admin module add hua with guarded routes and dedicated admin layout/sidebar system.
frontend/src/app/admin/layout.tsx
frontend/src/components/AdminSidebar.tsx
frontend/src/components/ConditionalNavBar.tsx - Admin authentication flow implement hua using
x-admin-keyheader validation and localStorage-based session gating.
frontend/src/app/admin/login/page.tsx - Admin dashboard add hua with aggregated stats (users/jobs/applications/revenue), charts, and exportable reports.
frontend/src/app/admin/dashboard/page.tsx
frontend/src/lib/reportGenerator.ts
frontend/package.json - CRUD-style admin management screens add hue for Users, Jobs, Applications, and Payments.
frontend/src/app/admin/users/page.tsx
frontend/src/app/admin/jobs/page.tsx
frontend/src/app/admin/applications/page.tsx
frontend/src/app/admin/payments/page.tsx - Backend me multi-service admin API layer add hua, and each service mounts
/api/adminroutes.
services/user/src/index.ts
services/job/src/app.ts
services/payment/src/index.ts - Admin authorization middleware standardize hua with
ADMIN_SECRET_KEYvalidation (x-admin-keyheader).
services/user/src/middleware/admin.ts
services/job/src/middleware/admin.ts
services/payment/src/middlewares/admin.ts - Env template updates me admin secret and email provider keys align kiye gaye.
services/auth/.env.example
services/user/.env.example
services/job/.env.example
services/payment/.env.example
services/utils/.env.example
Key Flows
- Admin Auth Flow:
/admin/loginpassword input -> test call (/api/admin/users/stats) withx-admin-key-> valid key store -> protected panel access. - Cross-Service Dashboard Flow: frontend dashboard -> parallel fetch to User/Job/Payment admin stats APIs -> unified analytics cards/charts.
- Admin Operations Flow: panel action (delete/update/filter) -> corresponding service admin endpoint -> DB update -> UI refresh.
| Method | Endpoint | Description | Body/Params | Notes |
|---|---|---|---|---|
| POST | /register | User register | JSON + file (jobseeker) | role = jobseeker requires resume file field file |
| POST | /login | User login | JSON | Returns JWT + user data |
| POST | /forgot | Send reset link | JSON | Sends reset email directly via Resend |
| POST | /reset/:token | Reset password | JSON + URL param | Token valid 15 min |
Source: services/auth/src/routes/auth.ts
| Method | Endpoint | Description | Body | Notes |
|---|---|---|---|---|
| POST | /upload | Upload/replace file | JSON | If public_id present, old file is deleted |
| POST | /career | AI career suggestion | JSON | Body: { skills: "..." }, returns structured career roadmap |
| POST | /resume-analyser | AI ATS resume analysis | JSON | Body: { pdfBase64: "..." }, returns score + suggestions |
Source: services/utils/src/routes.ts
| Method | Endpoint | Description | Body/Params | Notes |
|---|---|---|---|---|
| GET | /me | Get current user profile | Header | Requires Authorization: Bearer <token> |
| GET | /:userId | Get user profile by ID | URL param + Header | Requires auth, returns user with skills |
| PUT | /update/profile | Update user profile | JSON + Header | Updates name, phoneNumber, bio |
| PUT | /update/pic | Update profile picture | FormData + Header | Requires file upload via multer |
| PUT | /update/resume | Update resume | FormData + Header | Requires file upload via multer |
| POST | /skill/add | Add skill to user | JSON + Header | Body: { skillName: "..." } |
| DELETE | /skill/delete | Remove skill from user | JSON + Header | Body: { skillName: "..." } |
| POST | /apply/job | Apply for a job | JSON + Header | Jobseeker-only, requires uploaded resume |
| GET | /application/all | Get my applications | Header | Returns applicant's applied jobs list |
Source: services/user/src/routes/user.ts
| Method | Endpoint | Description | Body/Params | Notes |
|---|---|---|---|---|
| POST | /company/new | Create company | FormData + Header | Recruiter-only, logo file required |
| DELETE | /company/:companyId | Delete company | URL param + Header | Recruiter-only, ownership required |
| GET | /company/all | List recruiter companies | Header | Recruiter-only |
| GET | /company/:id | Company details + jobs | URL param | Includes jobs array |
| POST | /new | Create job | JSON + Header | Recruiter-only, company ownership required |
| PUT | /:jobId | Update job | JSON + Header | Recruiter-only, ownership required |
| GET | /all | List active jobs | Query params | Optional title, location filters |
| GET | /:jobId | Get single job | URL param | Public |
| GET | /application/:jobId | Get applications for a job | URL param + Header | Recruiter-only, job ownership required |
| PUT | /application/update/:id | Update application status | URL param + JSON + Header | Recruiter-only, triggers status email |
Source: services/job/src/routes/job.ts
| Method | Endpoint | Description | Body/Params | Notes |
|---|---|---|---|---|
| POST | /checkout | Create Razorpay order | Header | Auth required, blocks duplicate active subscription |
| POST | /verify | Verify Razorpay payment and activate subscription | JSON + Header | Auth required, validates razorpay_signature |
Source: services/payment/src/routes/payment.ts
| Method | Endpoint | Description | Body/Params | Notes |
|---|---|---|---|---|
| GET | /users/all | List users with pagination/search/filter | Query params | Requires x-admin-key |
| GET | /users/stats | User dashboard stats | Header | Returns totals by role + subscribed count |
| GET | /users/role/:role | Users by role | URL param | role: recruiter/jobseeker |
| GET | /users/:userId | Get single user profile | URL param | Admin-level lookup |
| PUT | /users/update/:userId | Update user profile fields | JSON + URL param | Admin edit flow |
| DELETE | /users/delete/:userId | Delete user and linked skills | URL param | Cascading clean-up handled |
Source: services/user/src/routes/admin.ts
| Method | Endpoint | Description | Body/Params | Notes |
|---|---|---|---|---|
| GET | /jobs/all | List all jobs with pagination/search | Query params | Includes company join data |
| GET | /jobs/stats | Job/application/company summary | Header | Dashboard aggregation |
| DELETE | /jobs/delete/:jobId | Delete job + linked applications | URL param | Admin destructive action |
| GET | /applications/all | List applications with status filter | Query params | Supports status-based filtering |
| PUT | /applications/update/:applicationId | Update application status | JSON + URL param | Valid statuses enforced |
| GET | /companies/all | List companies with job counts | Header | Grouped company overview |
| DELETE | /companies/delete/:companyId | Delete company + dependent jobs/apps | URL param | Full cleanup flow |
Source: services/job/src/routes/admin.ts
| Method | Endpoint | Description | Body/Params | Notes |
|---|---|---|---|---|
| GET | /payments/stats | Subscription metrics + revenue estimate | Header | Requires x-admin-key |
| GET | /subscriptions/all | Paginated subscription listing | Query params | Includes status + expiry |
Source: services/payment/src/routes/admin.ts
- Navigate to
frontend/directory. - Install dependencies:
npm install. - Start dev server:
npm run dev(runs onhttp://localhost:3000).
Scripts: npm run dev, npm run build, npm run start, npm run lint
Source: frontend/package.json
Required: Backend services running and accessible for API calls.
- Create .env using services/auth/.env.example.
- Install dependencies.
- Build and start.
Scripts: npm run build, npm run start, npm run dev
Source: services/auth/package.json
- Create .env using services/utils/.env.example.
- Install dependencies.
- Build and start.
Scripts: npm run build, npm run start, npm run dev
Source: services/utils/package.json
Required Services
- Redis, Postgres/Neon, Cloudinary, Resend API
- Create .env (see Environment Variables Details).
- Install dependencies.
- Build and start.
Scripts: npm run build, npm run start, npm run dev
Source: services/user/package.json
- Create .env using services/job/.env.example.
- Install dependencies.
- Build and start.
Scripts: npm run build, npm run start, npm run dev
Source: services/job/package.json
- Create .env using services/payment/.env.example.
- Install dependencies.
- Build and start.
Scripts: npm run build, npm run start, npm run dev
Source: services/payment/package.json
Browser (Next.js Frontend)
|-- React 19 + TypeScript
|-- Next.js 16 App Router
|-- shadcn/ui (Tailwind CSS v4 + Radix UI)
|-- next-themes (dark/light/system)
|
| HTTP /api/auth/*
v
Auth Service (Express)
|-- PostgreSQL (Neon) [users, skills, user_skills]
|-- Redis [forgot:<email> token]
|-- Kafka Producer [send-mail]
|
| HTTP /api/utils/upload
v
Utils Service (Express)
|-- Cloudinary [file storage]
|-- Kafka Consumer [send-mail]
|-- SMTP (Nodemailer) [email dispatch]
|-- Gemini API [career guidance + ATS analysis]
Browser (Next.js Frontend)
|
| HTTP /api/user/*
v
User Service (Express)
|-- PostgreSQL (Neon) [users, skills, user_skills]
|
| HTTP /api/utils/upload
v
Utils Service (Express)
|-- Cloudinary [profile pic storage]
|-- Gemini API [career guidance + ATS analysis]
Browser (Next.js Frontend)
|
| HTTP /api/job/*
v
Job Service (Express)
|-- PostgreSQL (Neon) [companies, jobs, applications]
|-- Kafka Producer [send-mail on application status update]
|
| HTTP /api/utils/upload
v
Utils Service (Express)
|-- Cloudinary [company logos]
|-- Kafka Consumer [send-mail]
|-- SMTP (Nodemailer) [status update email]
|-- Gemini API [career guidance + ATS analysis]
Source: services/auth/.env.example
| Variable | Purpose |
|---|---|
PORT |
Service port |
DB_URL |
Neon/Postgres connection string |
UPLOAD_SERVICE |
Utils service base URL (for resume upload) |
JWT_SEC |
JWT secret key |
KAFKA_BROKER |
Kafka broker address |
FRONTEND_URL |
Frontend base URL (reset link) |
REDIS_URL |
Redis connection URL |
Source: services/utils/.env.example
| Variable | Purpose |
|---|---|
PORT |
Service port |
CLOUD_NAME |
Cloudinary cloud name |
API_KEY |
Cloudinary API key |
API_SECRET |
Cloudinary API secret |
KAFKA_BROKER |
Kafka broker address (code uses KAFKA_BROKER) |
SMTP_USER |
SMTP user email |
SMTP_PASS |
SMTP password |
API_KEY_GEMINI |
Gemini API key for AI endpoints |
Source: services/user/.env.example
| Variable | Purpose |
|---|---|
PORT |
Service port |
DB_URL |
Neon/Postgres connection string |
JWT_SEC |
JWT secret key |
UPLOAD_SERVICE |
Utils service base URL (for profile pic upload) |
Source: services/job/.env.example
| Variable | Purpose |
|---|---|
PORT |
Service port |
DB_URL |
Neon/Postgres connection string |
UPLOAD_SERVICE |
Utils service base URL (for company logo upload) |
JWT_SEC |
JWT secret key |
KAFKA_BROKER |
Kafka broker address |
Source: services/payment/.env.example
| Variable | Purpose |
|---|---|
PORT |
Payment service port |
Razorpay_Key |
Razorpay key ID |
Razorpay_Secret |
Razorpay key secret |
DB_URL |
Neon/Postgres connection string |
JWT_SEC |
JWT secret key |
Request
POST /api/auth/register
Content-Type: application/json
{
"name": "Aman",
"email": "aman@example.com",
"password": "Pass@123",
"phoneNumber": "9999999999",
"role": "recruiter"
}
Response
{
"message": "User registered successfully",
"registeredUser": {
"user_id": 1,
"name": "Aman",
"email": "aman@example.com",
"phone_number": "9999999999",
"role": "recruiter",
"created_at": "2026-02-03T10:00:00.000Z"
},
"token": "<jwt>"
}
Request
POST /api/auth/register
Content-Type: multipart/form-data
Fields:
name=Aman
email=aman@example.com
password=Pass@123
phoneNumber=9999999999
role=jobseeker
bio=Frontend developer
file=<resume.pdf>
Request
POST /api/auth/login
Content-Type: application/json
{
"email": "aman@example.com",
"password": "Pass@123"
}
Response
{
"message": "User logged in successfully",
"userObject": {
"user_id": 1,
"name": "Aman",
"email": "aman@example.com",
"phone_number": "9999999999",
"role": "recruiter",
"skills": []
},
"token": "<jwt>"
}
Request
POST /api/auth/forgot
Content-Type: application/json
{
"email": "aman@example.com"
}
Response
{
"message": "If a user with that email exists, a password reset link has been sent"
}
Request
POST /api/auth/reset/:token
Content-Type: application/json
{
"password": "NewPass@123"
}
Response
{
"message": "Password has been reset successfully"
}
Request
POST /api/utils/upload
Content-Type: application/json
{
"buffer": "data:application/pdf;base64,JVBERi0xLjQK...",
"public_id": "optional-existing-id"
}
Response
{
"url": "https://res.cloudinary.com/.../file.pdf",
"public_id": "abc123"
}
Request
POST /api/utils/career
Content-Type: application/json
{
"skills": "React, Node.js, TypeScript, PostgreSQL"
}
Response
{
"summary": "You are well-suited for modern full-stack product development roles.",
"jobOptions": [
{
"title": "Full Stack Developer",
"responsibilities": "Build and maintain frontend and backend features.",
"why": "Your current stack aligns with production full-stack requirements."
}
],
"skillsToLearn": [
{
"category": "DevOps & Cloud",
"skills": [
{
"title": "Docker",
"why": "Helps with consistent deployment across environments.",
"how": "Containerize a Node + Postgres project and deploy it."
}
]
}
],
"learningApproach": {
"title": "How to Approach Learning",
"points": ["Build projects", "Follow roadmap", "Practice interviews"]
}
}
Request
POST /api/utils/resume-analyser
Content-Type: application/json
{
"pdfBase64": "data:application/pdf;base64,JVBERi0xLjQK..."
}
Response
{
"atsScore": 82,
"scoreBreakdown": {
"formatting": { "score": 85, "feedback": "Formatting is mostly ATS-friendly." },
"keywords": { "score": 78, "feedback": "Add more role-specific keywords." },
"structure": { "score": 84, "feedback": "Sections are well organized." },
"readability": { "score": 81, "feedback": "Use more measurable outcomes." }
},
"suggestions": [
{
"category": "Keywords",
"issue": "Missing exact job keywords",
"recommendation": "Mirror target JD keywords in skills and experience",
"priority": "high"
}
],
"strengths": ["Clear section structure", "Relevant project experience"],
"summary": "Resume is solid and can improve further with stronger keyword matching."
}
Request
GET /api/user/me
Authorization: Bearer <jwt>
Response
{
"user_id": 1,
"name": "Aman",
"email": "aman@example.com",
"phone_number": "9999999999",
"role": "recruiter",
"bio": null,
"resume": null,
"profile_pic": null,
"skills": []
}
Request
GET /api/user/:userId
Authorization: Bearer <jwt>
Response
{
"user_id": 2,
"name": "Rahul",
"email": "rahul@example.com",
"phone_number": "8888888888",
"role": "jobseeker",
"bio": "Full stack developer",
"resume": "https://res.cloudinary.com/.../resume.pdf",
"resume_public_id": "resume_abc123",
"profile_pic": "https://res.cloudinary.com/.../pic.jpg",
"profile_pic_public_id": "pic_xyz789",
"subscription": null,
"skills": ["JavaScript", "React", "Node.js"]
}
Request
PUT /api/user/update/profile
Authorization: Bearer <jwt>
Content-Type: application/json
{
"name": "Aman Kumar",
"phoneNumber": "9999999990",
"bio": "Senior recruiter with 5 years experience"
}
Response
{
"message": "Profile updated successfully",
"updatedUser": {
"user_id": 1,
"name": "Aman Kumar",
"phone_number": "9999999990",
"bio": "Senior recruiter with 5 years experience"
}
}
Request
PUT /api/user/update/pic
Authorization: Bearer <jwt>
Content-Type: multipart/form-data
Fields:
file=<profile-pic.jpg>
Response
{
"message": "Profile picture updated successfully",
"updatedUser": {
"user_id": 1,
"name": "Aman Kumar",
"profile_pic": "https://res.cloudinary.com/.../new-pic.jpg"
}
}
Request
PUT /api/user/update/resume
Authorization: Bearer <jwt>
Content-Type: multipart/form-data
Fields:
file=<resume.pdf>
Response
{
"message": "Resume updated successfully",
"updatedUser": {
"user_id": 2,
"name": "Rahul",
"resume": "https://res.cloudinary.com/.../new-resume.pdf"
}
}
Request
POST /api/user/skill/add
Authorization: Bearer <jwt>
Content-Type: application/json
{
"skillName": "Python"
}
Response (New Skill)
{
"message": "Skill Python added to user successfully"
}
Response (Skill Already Exists)
{
"message": "User already has this skill"
}
Request
DELETE /api/user/skill/delete
Authorization: Bearer <jwt>
Content-Type: application/json
{
"skillName": "Python"
}
Response
{
"message": "Skill Python deleted successfully"
}
Request
POST /api/job/company/new
Authorization: Bearer <jwt>
Content-Type: multipart/form-data
Fields:
name=Acme Corp
description=Hiring platform for engineers
website=https://acme.example
file=<logo.png>
Response
{
"message": "Company created successfully",
"company": {
"company_id": 1,
"name": "Acme Corp",
"logo": "https://res.cloudinary.com/.../logo.png",
"logo_public_id": "company_logo_123"
}
}
Request
POST /api/job/new
Authorization: Bearer <jwt>
Content-Type: application/json
{
"title": "Frontend Engineer",
"description": "Build user-facing features",
"salary": 120000,
"location": "Bengaluru",
"job_type": "Full-time",
"openings": 2,
"role": "Frontend",
"work_location": "Hybrid",
"company_id": 1
}
Response
{
"message": "Job created successfully",
"job": {
"job_id": 10,
"title": "Frontend Engineer",
"company_id": 1
}
}
Request
GET /api/job/company/1
Response
{
"company_id": 1,
"name": "Acme Corp",
"website": "https://acme.example",
"jobs": [
{
"job_id": 10,
"title": "Frontend Engineer"
}
]
}
Request
GET /api/job/company/all
Authorization: Bearer <jwt>
Response
[
{
"company_id": 1,
"name": "Acme Corp",
"website": "https://acme.example"
}
]
Request
GET /api/job/all?title=frontend&location=bengaluru
Response
[
{
"job_id": 10,
"title": "Frontend Engineer",
"company_name": "Acme Corp",
"location": "Bengaluru"
}
]
Request
GET /api/job/10
Response
{
"job_id": 10,
"title": "Frontend Engineer",
"company_id": 1
}
Request
PUT /api/job/10
Authorization: Bearer <jwt>
Content-Type: application/json
{
"title": "Frontend Engineer II",
"description": "Build user-facing features",
"salary": 140000,
"location": "Bengaluru",
"job_type": "Full-time",
"openings": 1,
"role": "Frontend",
"work_location": "Hybrid",
"company_id": 1,
"is_active": true
}
Response
{
"message": "Job updated successfully",
"job": {
"job_id": 10,
"title": "Frontend Engineer II"
}
}
Request
DELETE /api/job/company/1
Authorization: Bearer <jwt>
Response
{
"message": "Company and all associated data deleted successfully"
}
Request
POST /api/user/apply/job
Authorization: Bearer <jwt>
Content-Type: application/json
{
"job_id": 10
}
Response
{
"message": "Application submitted successfully",
"application": {
"application_id": 21,
"job_id": 10,
"applicant_id": 2,
"status": "Submitted"
}
}
Request
GET /api/user/application/all
Authorization: Bearer <jwt>
Response
[
{
"application_id": 21,
"job_id": 10,
"status": "Submitted",
"job_title": "Frontend Engineer",
"job_salary": 120000,
"job_location": "Bengaluru"
}
]
Request
GET /api/job/application/10
Authorization: Bearer <jwt>
Response
[
{
"application_id": 21,
"job_id": 10,
"applicant_id": 2,
"applicant_email": "rahul@example.com",
"status": "Submitted",
"subscribed": true
}
]
Request
PUT /api/job/application/update/21
Authorization: Bearer <jwt>
Content-Type: application/json
{
"status": "Hired"
}
Response
{
"message": "Application status updated successfully",
"job": {
"title": "Frontend Engineer"
},
"updatedApplication": {
"application_id": 21,
"status": "Hired"
}
}
Goal: Email delivery stack ko Resend API के साथ Bull Queue based async job processing par stabilize karna.
Problem Identified & Solution
- Direct API calls काम कर रहे थे पर reliable async queue pattern नहीं था
- Job statusupdate emails immediate नहीं जा रहे थे, important notifications delay हो रहे थे
- Solution: Resend API + Bull Queue (Redis-backed) = instant auth/payment emails + async job notifications
Highlights
-
Email Provider Migration: Resend API based standardization across services.
services/auth/src/controllers/auth.ts
services/payment/src/controllers/payment.ts
services/utils/src/consumer.tsresendpackage (v3.2.0) email provider ke roop me integrate kiya- Auth Service: Welcome, Login Alert, Password Reset emails (direct Resend calls)
- Payment Service: Subscription Invoice (direct Resend calls)
- Job Service: Application Status Updates (Bull Queue → Resend)
-
Bull Queue Implementation (Redis-based async processing):
-
Producer Setup:
services/job/src/producer.tsinitEmailQueue()Bull Queue initialize करता है with Upstash RedispublishToTopic()emails को queue में add करता है- Retry logic: 3 attempts with exponential backoff (2s initial delay)
-
Consumer Setup:
services/utils/src/consumer.ts
services/utils/src/index.tsstartSendMailConsumer()queue processing start करता है- 5 concurrent jobs process करता है simultaneously
- Job success/failure logging with email ID tracking
- Automatic failure retry mechanism built-in
-
-
Environment Configuration:
services/auth/.env.example
services/job/.env.example
services/payment/.env.example
services/utils/.envRESEND_API_KEY=re_JMaXBpcm_EA9y4aFAEnNabRTxEvhQxxb5सभी services मेंREDIS_URLconnection pooling + TLS के साथ Upstash support
-
Package Dependencies Updated:
- Added:
resendसभी services में - Added:
bull(v4.11.5) job + utils services में - Already had:
redis(v5.10.0) connection support
- Added:
-
Key Fixes Applied:
- Utils service startup में
startSendMailConsumer()initialization add किया (पहले missing था) - Resend response structure fix:
result?.data?.idfor email tracking ID - Error handling improve की: Resend API errors + Bull Queue failures दोनों के लिए
- Sender email update:
onboarding@resend.dev(verified domain) सभी emails में
- Utils service startup में
Architecture Flow (NEW)
Immediate (Auth/Payment) Flow:
─────────────────────────────
User Register/Login/Payment Event
↓
Auth/Payment Controller
↓
Resend.emails.send() [DIRECT/SYNC]
↓
Resend Instant Delivery
↓
Email in inbox within seconds
Async (Job Updates) Flow:
────────────────────────
Job Status Update Event
↓
Job Controller → publishToTopic()
↓
Bull Queue (Redis) stores job
↓
Return Immediate API Response
↓
Background: Utils Consumer processes
↓
Resend API delivers email
↓
Auto-retry on failure (max 3 attempts)
Email Flows Implemented
-
Auth Service (Direct/Sync):
- Welcome email on registration
- Login security alert on login
- Password reset link on forgot password (15m JWT expiry)
-
Payment Service (Direct/Sync):
- Subscription invoice on payment success
- Includes: plan name, amount, expiry date, invoice ID
-
Job Service (Async/Queue):
- Application status updates sent to applicants
- Status: Submitted → Reviewing → Accepted/Rejected
- Non-blocking: API response immediate, email sent background में
Deployment Checklist
- ✅ Set
RESEND_API_KEYin production environment - ✅ Ensure
REDIS_URLpoints to working Redis instance (Upstash or local) - ✅ Auth/Payment services start with Resend initialization
- ✅ Util service starts with Bull Queue consumer (
startSendMailConsumer()called) - ✅ Test email sending: registration → welcome email should arrive
- ✅ Test async emails: job status update → email in queue → delivered with retry
Tech Details
- Resend API Response:
{ data: { id: "email_id_..." }, error?: null } - Bull Queue Format: Job ID tracking, timestamp, retry counter in Redis
- Retry Strategy: Exponential backoff (2s → 4s → 8s) across 3 attempts
- Sender Verification:
onboarding@resend.devis pre-verified by Resend - TLS Connection: Bull Queue supports
redis-urlwithtls: { rejectUnauthorized: false }for Upstash
Cost & Performance
- Resend: Free tier 100 emails/day, pay-as-you-go after
- Redis (Upstash): Free tier 10,000 commands/day sufficient for queue
- Queue reduces direct API burst issues during high traffic
- Async processing prevents API blocking on high traffic
Goal: Admin panel को complete करना सभी management features के साथ - users, jobs, applications, payments.
Problem Identified & Solution
- Admin को manually database query करना पड़ रहा था user/job/payment management के लिए
- कोई centralized dashboard नहीं था metrics देखने के लिए
- Solution: Complete Admin Panel with Super Admin Key auth + real-time dashboard + CRUD operations
Highlights
-
Admin Authentication (Super Admin Key):
services/user/src/middleware/admin.ts
services/job/src/middleware/admin.ts
services/payment/src/middlewares/admin.tsverifyAdminmiddleware सभी admin routes पर protection provide करता है- Header
x-admin-keyसे key verify किया जाता है environment से - Unauthorized access پर 403 error return होता है
-
User Management Admin Routes:
services/user/src/controllers/admin.ts
services/user/src/routes/admin.tsGET /api/admin/users/all- सभी users paginated (search, role filter)GET /api/admin/users/stats- total users, recruiters, jobseekers, subscribed countGET /api/admin/users/role/:role- role के हिसाब से usersGET /api/admin/users/:userId- Individual user detailsPUT /api/admin/users/update/:userId- User info updateDELETE /api/admin/users/delete/:userId- User deletion
-
Job Management Admin Routes:
services/job/src/controllers/admin.ts
services/job/src/routes/admin.tsGET /api/admin/jobs/all- सभी jobs paginated with company infoGET /api/admin/jobs/stats- total jobs, applications, companies, hired countDELETE /api/admin/jobs/delete/:jobId- Job deletion (cascade delete applications)
-
Application Management Admin Routes:
GET /api/admin/applications/all- सभी applications (status filter)PUT /api/admin/applications/update/:appId- Application status update (Submitted/Rejected/Hired)
-
Company Management Admin Routes:
GET /api/admin/companies/all- सभी companies with job countsDELETE /api/admin/companies/delete/:companyId- Company deletion (cascade to jobs + applications)
-
Payment Management Admin Routes:
services/payment/src/controllers/admin.ts
services/payment/src/routes/admin.tsGET /api/admin/payments/stats- payment stats (total, active, cancelled, revenue)GET /api/admin/subscriptions/all- सभी subscriptions paginated
-
Frontend Admin Pages:
frontend/src/app/admin/page.tsx
frontend/src/app/admin/login/page.tsx
frontend/src/app/admin/dashboard/page.tsx- Admin login page: Super admin key entry के साथ
- Admin dashboard: Real-time stats और quick navigation
- User management page: Search, filter, delete, pagination
- Job management page: View jobs, delete, pagination
- Application management page: Status update dropdown, filtering
- Payment management page: Subscription tracking, revenue stats
Architecture Flow
Admin Login:
────────────
User enters Admin Key at /admin/login
↓
Frontend verifies key by calling GET /api/admin/users/stats
↓
Valid Key → localStorage store + redirect to dashboard
Invalid Key → Show error
Admin Operations:
─────────────────
Admin clicks action (view/delete/update)
↓
Frontend sends request with x-admin-key header
↓
Backend middleware verifies key
↓
Authorized → Process request (stats/CRUD/delete)
Unauthorized → Return 403 Forbidden
↓
Response with data/stats returned
↓
Frontend displays/updates UI with pagination & filters
Statistics Flow:
────────────────
Dashboard loads
↓
3 Parallel API calls:
- User Service: /api/admin/users/stats
- Job Service: /api/admin/jobs/stats
- Payment Service: /api/admin/payments/stats
↓
All responses merge करके dashboard render होता है
↓
Cards display: users, jobs, applications, revenue
Key Features Implemented
- ✅ Real-time dashboard with aggregated statistics
- ✅ Pagination support (limit: 10 records per page)
- ✅ Search functionality (users by name/email, jobs by title/company)
- ✅ Role filtering (recruiters vs jobseekers)
- ✅ Status filtering (applications, subscriptions)
- ✅ CRUD operations (Create permission not yet, Read/Update/Delete enabled)
- ✅ Cascade delete (company → jobs → applications)
- ✅ Protected routes with Super Admin Key validation
- ✅ localStorage session management
- ✅ Responsive UI with Tailwind CSS
Environment Setup
- Add
ADMIN_SECRET_KEYto सभी services के.envfiles:ADMIN_SECRET_KEY=your_super_secret_admin_key_here - Update
.env.examplefiles सभी services में with ADMIN_SECRET_KEY field
API Query Examples
# Get all users (page 1, limit 10)
curl -H "x-admin-key: your_key" \
http://localhost:5002/api/admin/users/all?page=1&limit=10
# Search users
curl -H "x-admin-key: your_key" \
http://localhost:5002/api/admin/users/all?search=john
# Get user stats
curl -H "x-admin-key: your_key" \
http://localhost:5002/api/admin/users/stats
# Delete user
curl -X DELETE -H "x-admin-key: your_key" \
http://localhost:5002/api/admin/users/delete/1
# Update application status
curl -X PUT -H "x-admin-key: your_key" \
-H "Content-Type: application/json" \
-d '{"status":"Hired"}' \
http://localhost:5003/api/admin/applications/update/5Deployment Notes
- ✅ Admin key stored in
.env(not committed to git) - ✅ All admin routes protected with middleware verification
- ✅ Frontend redirects unauthenticated users to /admin/login
- ✅ Admin key stored in localStorage for session (clear on logout)
- ✅ Consider rate limiting for production
- ✅ Consider IP whitelisting for production security
SQL Query Patterns Used
- Template literals में parameterized queries with
sql\...${param}...`` - Pagination:
LIMIT ${limit} OFFSET ${offset} - Filtering: Conditional
WHEREclauses based on query params - Aggregation:
COUNT(),SUM()for statistics - Cascade deletes: Manual foreign key deletion before main table deletion
- JOINs: LEFT JOIN for relationship data (companies, jobs, users)
Goal: Admin dashboard me report export functionality (JSON/Text/PDF/Image formats) implement karna, bugs fix karna, aur final cleanup.
Highlights
Part 1: Multi-Format Report Generator Implementation
- Report generator utility create kiya with 4 export formats.
frontend/src/lib/reportGenerator.tsgenerateReport()main entry point - format string accept karta haiReportDatatype define kiya dashboard stats ke liyeexportAsJSON()- machine-readable format me downloadexportAsText()- human-readable format with formatted currencyexportAsPDF()- Professional document via jsPDFexportAsImage()- PNG screenshot via html2canvasexportAllFormats()- All 3 formats zip/sequential download
- Dependencies add kiye:
jspdf,html2canvas
frontend/package.json - Admin dashboard dropdown menu create kiya with format options.
frontend/src/app/admin/dashboard/page.tsx- JSON Format button with description
- Text Format button (human-readable)
- PDF Format button (professional document)
- Image Format button (PNG screenshot)
- Export All Formats button (combined download)
- Loader state + toast notifications
Part 2: PDF Export Bug - Rupee Symbol Rendering
- Problem: Rupee symbol
₹rendering as&T&o&t&a&l&8in PDF - Root Cause: jsPDF doesn't handle Unicode special characters well
- Solution: Replace
₹${value}withRs ${value}text instead
frontend/src/lib/reportGenerator.ts - Status: ✅ FIXED - PDF exports now display correctly
- Verification: PDF generated successfully with proper currency formatting
Part 3: Image Export Bug - Tailwind v4 oklch Color Incompatibility
- Problem: "Attempting to parse an unsupported color function 'lab'" error when generating PNG
- Root Cause: Tailwind CSS v4 uses
oklch()color functions, html2canvas can't parse them - Attempted Fixes (all failed):
- Clone element + manually strip oklch colors - Still failed
- Add html2canvas options (allowTaint, foreignObjectRendering) - Still failed
- Set backgroundColor fallback values - Still failed
- Why Unfixable:
- html2canvas reads computed DOM styles which include oklch() functions from Tailwind v4
- No way to bypass without abandoning Tailwind v4 or rewriting all CSS
- Technical incompatibility not easily solvable without major stack changes
- Final Decision: Remove image export entirely rather than maintain broken feature
Part 4: Complete Image Export Removal (Final Solution)
- Removed
html2canvasimport from reportGenerator.ts
frontend/src/lib/reportGenerator.ts - Deleted entire
exportAsImage()function (60+ lines) - Updated
exportAllFormats()to only handle JSON/Text/PDF (removed image) - Updated
generateReport()function signature:- From:
format: "json" | "text" | "pdf" | "image" | "all" - To:
format: "json" | "text" | "pdf" | "all"
- From:
- Removed image case from switch statement in
generateReport() - Removed
html2canvasfrom dependencies (no longer needed)
frontend/package.json - Updated dashboard dropdown UI:
- Removed Image Format button
- Updated "Export All Formats" description from "JSON, Text, PDF & Image" to "JSON, Text & PDF"
- Removed border divider above Export All button
- Updated handler function to only accept 3 + all formats (not image)
Key Features Final Status
- ✅ JSON Export: Machine-readable format - WORKING
- ✅ Text Export: Human-readable format with formatted currency - WORKING
- ✅ PDF Export: Professional document with "Rs" currency format - WORKING (FIXED)
- ❌ Image Export: PNG screenshot capability - REMOVED (unfixable tech incompatibility)
- ✅ Export All: JSON + Text + PDF batch download - WORKING (updated to 3 formats)
Admin Dashboard Updates
- Report generation dropdown now shows 3 working export options + 1 batch option (4 buttons total)
- All options have descriptive text and icons
- Loading state prevents multiple clicks during generation
- Toast notifications for success/error states
- "Export All Formats" button provides combined download experience
Verification
- ✅ No TypeScript errors in reportGenerator.ts
- ✅ No TypeScript errors in dashboard page
- ✅ No build errors
- ✅ All 3 export formats tested and verified working
- ✅ Dashboard UI responsive with new layout
Technical Insights
- Tailwind v4 + html2canvas incompatibility: Observable with oklch() color parsing failure
- jsPDF unicode handling: Prefers text substitution over special symbols
- Pragmatic solution: Better to ship 3 working formats than 4 with 1 broken
- Dependencies cleanup: Removed
html2canvas@^1.4.1to reduce bundle size
Files Modified
- frontend/src/lib/reportGenerator.ts - Image export code removed
- frontend/src/app/admin/dashboard/page.tsx - Image button removed, description updated
- frontend/package.json - html2canvas dependency removed
Goal: Redis quota exhaustion fix (Bull Queue removal), Resend → Nodemailer migration, cleanup of dead code and unused dependencies, complete system optimization.
Highlights
Part 1: Redis Quota Crisis Identification & Resolution
- Problem Identified: 11,000+ Redis commands/minute consuming Upstash free tier quota
- Root Cause Analysis: Bull Queue background polling with 5 workers at 50+ commands/min each + 40 reconnection loops = 11k/min baseline
- Solution: Complete Bull Queue removal from ALL services
- Removed from Auth service:
producer.ts, app.ts imports, package.json - Removed from Job service:
producer.ts, app.ts imports, package.json - Removed from Payment service: Bull Queue references
- Removed from Utils service: queue imports
- Removed from Auth service:
- Result: ✅ 0 background Redis commands
Part 2: Email System Architecture Refactor (Resend → Nodemailer)
- Problem with Resend: Sandbox mode only sends to verified email addresses
- Solution: Migrate to Nodemailer with Gmail SMTP via centralized Utils service endpoint
- Updated Auth Service (
services/auth/src/controllers/auth.ts):- Removed:
import { Resend } - Added:
sendEmail()utility function using axios → utils email endpoint - Updated:
registerUser()to send welcome email via Nodemailer - Updated:
loginUser()to send login alert via Nodemailer - Updated:
forgotPassword()to send password reset link via Nodemailer
- Removed:
- Updated Payment Service (
services/payment/src/controllers/payment.ts):- Removed:
import { Resend } - Added:
sendEmail()utility function using axios → utils email endpoint - Updated:
paymentVerification()to send subscription confirmation via Nodemailer
- Removed:
- Utils Service Email Endpoint (
services/utils/src/consumer.ts):- Centralized Nodemailer setup with Gmail SMTP
- POST
/api/utils/send-emailendpoint: accepts{to, subject, html} - All emails now work for ANY email address (no verification needed)
- Result: ✅ All email flows work universally
Part 3: Complete Unused Dependencies Cleanup
- Auth Service:
- Removed:
bull(dead code) - Kept:
redis(actually used for password reset tokens) - Result: ✅ 0 unused packages
- Removed:
- Job Service:
- Removed:
bull,redis(queue code removed) - Result: ✅ 0 unused packages
- Removed:
- User Service:
- Removed:
bull,redis(never used queue) - Result: ✅ 0 unused packages
- Removed:
- Payment Service:
- Removed:
bull,redis(queue removed, Razorpay doesn't need Redis) - Result: ✅ 0 unused packages
- Removed:
- Utils Service:
- Removed:
bull,redis,resend(all dead code) - Result: ✅ 0 unused packages
- Removed:
Part 4: Dead Code & Unused Imports Removal
- Job Service (
admin.ts,middleware/admin.ts, etc):- Added email integration: Applicants now get email when recruiter updates application status
- Removed: 3 unused
ErrorHandlerimports from admin middleware (3 services) - Fetches:
applicant_emailandjob_titlefrom DB - Sends: Axios POST to utils email endpoint
- Result: ✅ All services compile with 0 TypeScript errors
Part 5: Credentials Configuration & Documentation
- Added Gmail credentials to all service .env files:
EMAIL_USER=adityabscit.2829@gmail.comEMAIL_PASSWORD=mjxg rymb fuws fwnc(app-specific password)- Applied to: auth, job, payment, utils, user services
- Removed all Resend references:
- Removed:
RESEND_API_KEYfrom auth/.env, utils/.env, payment/.env - Removed:
"resend": "^3.2.0"from auth/package.json, payment/package.json - Removed:
resendreferences from all .env.example files - Updated: All .env.example files with Nodemailer email configuration
- Removed:
- Result: ✅ 0 dead API key references
Part 6: Project Documentation Updates
- README.md updated:
- Removed Bull Queue from intro description
- Updated Prerequisites section with Gmail & Gemini API info
- Added detailed Email Configuration section with Gmail app password setup
- Added "Recent Improvements" section highlighting:
- Bull Queue removal & Redis quota fix
- Nodemailer email integration
- Clean architecture (removed dead code)
- Zero TypeScript errors
- Centralized email system
- Result: ✅ README reflects current production-ready state
System Architecture Changes
- Before: Event-driven queue system → Resend API (sandbox issue)
- After: Direct synchronous HTTP calls → Utils service → Nodemailer → Gmail SMTP
- Benefits:
- Faster email delivery (no queue delays)
- No sandbox verification needed
- 99% less Redis commands
- Simpler architecture to maintain
Final Verification
- ✅ All 5 services compile: 0 TypeScript errors
- ✅ Bull Queue removed: 0 background polling
- ✅ Resend removed: 0 dead email service code
- ✅ Unused imports cleaned: Only necessary imports remain
- ✅ Gmail credentials configured: All services ready
- ✅ Email flows working: Registration, login, password reset, job status, subscription
- ✅ README updated: Production-ready documentation
- ✅ Project ready for: Local testing and submission
Deployment Ready
- ✅ Admin panel fully functional with 3 export formats
- ✅ No broken features shipped
- ✅ Cleaner codebase without dead code
- ✅ All admin routes protected with Super Admin Key
- ✅ Real-time dashboard with aggregated statistics
- ✅ Full CRUD operations on all data (users, jobs, applications, payments)
- Node.js + Express + TypeScript (
express,typescript) - PostgreSQL (Neon) (
@neondatabase/serverless) - Redis (
redis) - For password reset tokens + Bull Queue - Bull Queue (
bull) - Async job queue processor - Resend API (
resend) - Transactional email delivery - Cloudinary (
cloudinary) - Google Gemini API (
@google/genai) - Multer + DataURI (
multer,datauri) - JWT + bcrypt (
jsonwebtoken,bcrypt) - Axios (
axios) - HTTP client for inter-service communication - Next.js + React (
next,react,react-dom) - Frontend framework - shadcn/ui + Radix UI (
shadcn,radix-ui) - Accessible UI component library - Tailwind CSS v4 (
tailwindcss,@tailwindcss/postcss) - Utility-first styling - next-themes (
next-themes) - Dark/light/system theme management - Lucide React (
lucide-react) - Icon library - clsx + tailwind-merge (
clsx,tailwind-merge) - Conditional class utilities - class-variance-authority (
class-variance-authority) - Component variant system