Subham
发布时间:2026-09-19 | 浏览:1
Instantly share code, notes, and snippets.
https://dev.to/codexam
@codexamofficial
@TheSubhamMaity
Sort Recently created Least recently created Recently updated Least recently updated
Recently created
Least recently created
Recently updated
Least recently updated
1. Project Overview
The ATS (Applicant Tracking System) Backend is a high-performance, scalable server-side application built with NestJS . It handles core business logic for recruitment, including job management, lead tracking, automated assessments, AI-driven interview analysis, and payment integrations.
Core Technology Stack
Framework : NestJS (Node.js)
Language : TypeScript
“Internet Download Manager has been registered with a fake Serial Number”
Base Configuration
WebSocket Endpoint
1. Customer Flow - Cart & Order Creation
1.1 Add Items to Cart
Endpoint: POST {{url-mv}}/xam/carts/items
This system handles multi-vendor payments where customers pay once and funds are automatically distributed to multiple vendors with platform commission deducted via Stripe application fees. Each vendor receives direct deposits to their bank accounts.
Vendor Onboarding - Vendors create Stripe accounts and complete verification
Payment Initiation - Customer initiates payment for multi-vendor cart
Payment Processing - Multiple direct charges created (one per vendor)
Fund Distribution - Vendors receive net amount, platform gets commission automatically
User fills the form with required details
App calls /initiate API to create Razorpay order
Razorpay checkout opens with order details
User completes payment
App receives payment response and calls /verify API
This guide provides a detailed, step-by-step process to deploy multiple NestJS servers using Docker on a Virtual Private Server (VPS), allowing access via the VPS’s IP address and unique port numbers (e.g., <VPS_IP>:3000 , <VPS_IP>:3001 ). It assumes you have a NestJS application ready, a VPS with SSH access, and basic familiarity with development tools. The guide covers installing Docker, creating Docker images, deploying containers, and running multiple servers on different ports. Optional steps for setting up Nginx for domain names and SSL, as well as considerations for Kubernetes, are included. If you’ve been following a non-Docker deployment guide (e.g., using PM2), this adapts the process to use Docker for consistency and scalability.
Before starting, ensure you have:
A VPS with Ubuntu (or similar OS) and SSH access.
A NestJS application with a working package.json and built output (e.g., dist/main.js ).
How the Frontend Differentiates Timers for Different Assignments
The Problem : If a driver has multiple assignments (e.g., Product 1 and Product 2), how does the frontend know which timer belongs to which assignment?
The Solution : The backend sends timer updates via WebSocket with an assignmentId alongside the expiresAt timestamp. This assignmentId is a unique identifier for each assignment, allowing the frontend to distinguish between timers.
Backend Sends Data : When the backend emits a timerUpdate event to a driver’s room (e.g., driver123 ), it includes both the assignmentId and expiresAt . For example: