How govindadd/crm works
Project type and purpose
• This is a modern, enterprise-ready full-stack CRM (Customer Relationship Management) system.
• Frontend: React + Redux Toolkit + Vite + Tailwind CSS for a highly interactive, animated dashboard.
• Backend: Node.js + Express + MongoDB (Mongoose) following an API-first, modular design.
• Core features: user & role management, department management, attendance tracking, modular business domains (HR, Sales, Training, Data Mining, After Sales, Telecom), JWT & OAuth authentication, file uploads (Cloudinary), email notifications (Nodemailer), RBAC.
File structure
A. Top-level directories
• client/ → React SPA code
• server/ → Express API code
• z/ → Postman collection and image assets (auxiliary)
B. Frontend layout
• public/ (static files)
• src/
• assets (logos, videos)
• components (feature folders: attendance, department, forms, hrTabs, profile, ui)
• hooks (domain-specific custom hooks)
• layouts, pages (route-level components)
• services (API wrappers, private route)
• store (Redux slices, store config)
• utils (helpers: date formatting, PDF export)
• entry points: main.jsx, App.jsx, AppLayout.jsx
C. Backend layout
• src/
• config (Passport, constants)
• controllers (business logic per domain)
• db (MongoDB connection)
• middlewares (auth, roles, Multer uploads)
• models (Mongoose schemas per domain)
• routes (REST endpoints per resource)
• utils (error handling, async, Cloudinary, email, OTP)
• app.js, index.js (server bootstrap)
D. Cross-cutting files
• .env & .envExample, ESLint/Prettier configs, package.json in each module
README insights
• Confirms architecture: API-first, modular backend, React + Redux front.
• Lists technologies, major endpoints, environment variables, developer & deployment steps.
Detail
• Don’t just lump “backend” together—break it into Routes, Middlewares, Controllers, Models.
• On the frontend, separate pages, components, hooks, store.
• Critical flows: authentication handshake, role validation, OTP flow, file upload.
• Environment configurations (e.g., .env endpoints) if relevant for deployment.