Commit History

  1. 🌟 Project Summary: Employee Work & Payroll Management Web App πŸ”° OVERVIEW You will build a full-featured web app for a reputed company that: Allows Employees to post their workflow updates. Enables HR to monitor workflows, verify employees, and manage payments. Grants Admin full control over employees and HRs, including salaries and permissions. 🧩 CORE REQUIREMENTS βœ… GitHub Client-side: Minimum 20 meaningful commits Server-side: Minimum 12 meaningful commits βœ… README.md Include: Project name Admin login credentials (email/password) Live site URL At least 10 bullet points describing your app's features βœ… Responsiveness Must work perfectly on mobile, tablet, and desktop Responsive dashboard too βœ… Private Routes After refresh, user should stay logged in and not redirected to login βœ… Security Use .env to hide Firebase config and MongoDB credentials βœ… No Dummy Text No Lorem Ipsum – use relevant/real text βœ… Notifications Use SweetAlert / Toast / Notification (no alert()) Show notifications on: login, signup, CRUD operations βœ… Data Fetching Use TanStack Query (React Query) for all GET requests πŸ‘₯ AUTHENTICATION & ROLES πŸ” Email/Password Authentication (Required) Roles: Employee, HR (Admin cannot register from frontend) Use Dropdown to select role during registration (required) Show field-level errors for password issues: Less than 6 characters No capital letter No special character πŸ” Login Errors Handle and show Firebase errors for wrong email/password πŸ”‘ User Data Collection (Stored in DB) bank_account_no, salary, designation, photo (via imgbb upload) πŸ”— Social Login (Google/GitHub) Users registering via social login will be Employee by default Assign default/random values for other fields 🧭 ROUTES STRUCTURE 🏠 Public Routes / (Home): Banner, Services, Testimonials + 2 more relevant sections /contact-us: Dummy address + contact form /login, /register: Toggle between them πŸ“Œ Navbar Logo, Conditional Login/Register or User Photo + Logout Nav Items: Dashboard (Private), Contact Us πŸ“Š Dashboard Routes (Role-Based Private Routes) πŸ‘· For Employee: /dashboard/work-sheet Form + Table to submit daily tasks (task type, hours, date) Tasks: Sales, Support, Content, Paper-work, etc. Features: Add/Edit/Delete (modal based), Live UI update without page reload /dashboard/payment-history Table: Monthly payment history (month/year, amount, txn id) Implement pagination or infinite scroll (5+ entries) πŸ§‘β€πŸ’Ό For HR: /dashboard/employee-list Table with all employees: Name, Email, Verified βœ…/❌ (toggle), Bank Account, Salary, Pay (modal), Details Only verified employees can be paid Clicking "Pay" opens modal to request salary payment (sent to Admin) Verified toggle also updates DB /dashboard/details/:slug View single employee details (name, photo, designation, etc.) Dynamic Bar Chart: Salary vs. Month & Year from DB /dashboard/progress View all submitted tasks by employees Filter by employee name or month (optional: 🟩 Green feature) πŸ‘‘ For Admin: /dashboard/all-employee-list View all verified users (including HR) Features: Promote to HR Fire user (disable future login) Adjust Salary (Only increase) 🟦 Blue feature Table view ↔ Card view toggle (🟦 Blue) /dashboard/payroll View payment requests from HR Fields: Employee name, salary, month/year, payment date, Pay button Once Paid: Payment date updates Button disables UI updates instantly βœ… Prevent duplicate payment for same month/year (🟨 Yellow) βœ‰ Contact Us Page Static company address Form: email + message Messages are visible to Admin πŸ” Role-based Security with JWT Use JWT token (email, role embedded) Backend middleware must verify: Admin: for promoting/firing/changing salary HR: for payment Employee: for work submissions πŸ† Optional & Challenge Features Color Meaning 🟩 Green Extra filters for HR (progress page) 🟦 Blue Toggle between table and card view, only allow salary increase 🟨 Yellow Prevent duplicate payments & integrate payment gateway - Initial Deployment

    Verified signature
    df5b5ea
  2. initial commit

    Verified signature
    f322139