Revised Implementation Plan - UI/UX Refactoring & Role-Based Workflows
Refactor the existing CHS Lite UI design to be more flexible, user-friendly, and visually premium using shadcn/ui and Tailwind CSS v4 patterns. The system will use Green as its main theme color (referencing Synergy Housing Societies ERP).
User Review Required
Important
- Green Theme Integration: Change overall project’s primary color variables in
app/globals.cssto a vibrant, modern green. - Login Page Refactoring:
- Redesign the layout with a premium green aesthetic.
- Place a theme toggle (light/dark mode) at the top-right corner of the login screen.
- Remove the theme toggle from the profile page.
- Add a helpful contact link to
https://erpcrystal.in/synergy-housing-societies-erpexplaining how new societies or users can connect with support or request a demo.
- Housing Society Member (User):
- Redirect to
/profileon login. - Standard members will have navigation options for Dashboard (
/- lightweight), Invoices (/invoices), Visitors (/visitors), Requests (/service-requests), Notices (/notices), and Profile (/profile). These will be separate pages rather than embedded inside the profile.
- Redirect to
- Security:
- Redirect to
/on login, which renders the visitors view directly. - Hide any registration or check-in buttons (Security has view-only access and cannot create or delete visitors).
- The Security user’s
/profilepage will load and render their own member details from the database.
- Redirect to
- System, Admin, and Manager:
- Group the 16 dashboard modules into Sales, Purchase, Finance, and Utilities sections with section dividers.
Proposed UI Architecture models
1. Housing Society Member (User) Navigation
- Default Login Landing Page:
/profile(shows user’s own Member Details, S3 documents, and Telegram link). - Navigation Tabs:
- Dashboard (
/): Lightweight notices board and recent gate alerts. - Invoices (
/invoices): Separate page for invoices list. - Visitors (
/visitors): Guest bookings and logs. - Requests (
/service-requests): Service request portal. - Notices (
/notices): Notice board. - Profile (
/profile): Member details and logout.
- Dashboard (
2. Security Flow
- Default Login Landing Page:
/(which will display the Visitors list directly). - Navigation Tabs:
- Home/Visitors (
/): Visitors log list. No register/create buttons are visible. - Profile (
/profile): Loads security staff’s own member details and logout.
- Home/Visitors (
3. System, Admin, & Manager Homepage (Module Categorization)
- Sales:
- Invoices (
/invoices) - Service Charges (
/admin/service-charges) - Service Groups (
/admin/service-groups)
- Invoices (
- Purchase:
- Vendors (
/admin/vendors) - Vendor Bills (
/admin/bills)
- Vendors (
- Finance:
- Accounts (
/admin/accounts) - Vouchers (
/admin/vouchers) - Journal Vouchers (
/admin/journal-vouchers) - Opening Balances (
/admin/opening-balances) - Investments (
/admin/investments)
- Accounts (
- Utilities:
- Members (
/admin/members) - Visitors (
/visitors) - Notices (
/notices) - Service Requests (
/service-requests) - Email Templates (
/admin/std-instructions) - Societies (
/admin/societies- visible to System only)
- Members (
Proposed Changes
Theme Updates
[MODIFY] globals.css
- Change
--primaryand--primary-foregroundin:rootand.darkblocks:- Light mode:
--primarytooklch(0.52 0.18 142)(rich green/emerald),--primary-foregroundtooklch(0.99 0 0)(white). - Dark mode:
--primarytooklch(0.76 0.18 142)(vibrant bright green),--primary-foregroundtooklch(0.15 0 0)(dark gray).
- Light mode:
Login Page Updates
[MODIFY] login/page.tsx
- Redesign the card and background with subtle green gradients and premium styling.
- Theme Switcher: Render the
ThemeTogglecomponent absolute in the top-right corner. - Synergy Link: Add a link at the bottom of the card or card description:
- Text:
"New to Synergy ERP? Learn how to connect your society or contact us"linking tohttps://erpcrystal.in/synergy-housing-societies-erp.
- Text:
Navigation Updates
[MODIFY] bottom-nav.tsx & sidebar.tsx
- Update dynamic navigation rendering:
- Security: Home (
/- Visitors), Profile (/profile). - User (Resident): Profile (
/profile), Dashboard (/), Invoices (/invoices), Visitors (/visitors), Requests (/service-requests), Notices (/notices). - System, Admin, Manager: Home (
/), Members (/admin/members), Vendors (/admin/vendors), Profile (/profile).
- Security: Home (
- Update
BottomNavstyling to handle 6 columns cleanly (use responsive grids).
Home/Dashboard Updates
[MODIFY] page.tsx
- Redirects on Login / Landing:
- Inside
useEffect, if standard user (user.role === "User"), redirect on first load to/profile(if navigating from login). If they explicitly click the Dashboard navigation tab, show the lightweight dashboard at/. - If
user.role === "Security", render the visitors list directly on the home page/with a “View Only” restriction.
- Inside
- Admin/Manager Dashboard Categorization:
- Reorganize dashboard modules into 4 distinct cards/sections labeled Sales, Purchase, Finance, and Utilities using premium grids and clean layout styling.
Visitors Page Updates
[MODIFY] visitors/page.tsx
- Security Action Restrictions:
- Hide the “Register” button if
isSecurityis true. - Disable any edit/status action options if
isSecurityis true.
- Hide the “Register” button if
Profile Page Updates
[MODIFY] profile/page.tsx
- Remove
ThemeTogglerow (now located on Login page). - Security & Resident Member Details Profile:
- If user role is
User(Resident) orSecurity:- Fetch user’s member details using
getMember(user.memberId). - Render their Profile summary, Additional Info, and S3 Document Manager directly on
/profile.
- Fetch user’s member details using
- Else (Admin/System/Manager):
- Render the standard management profile page (Society switcher, Financial year switcher, Sign out).
- If user role is
Verification Plan
Manual Verification
- Login Page Visuals & Theme Toggle:
- Check green styling.
- Verify theme toggle works on login page.
- Verify link to
https://erpcrystal.in/synergy-housing-societies-erpis visible and functional.
- Housing Society Member Login:
- Log in and verify redirect to
/profile. - Verify
/profileloads member details and document uploader. - Verify Dashboard, Invoices, Visitors, Requests, and Notices are separate options in bottom navigation.
- Log in and verify redirect to
- Security Personnel Login:
- Log in and verify immediate rendering of the Visitors list at
/. - Verify no “Register” or edit actions are available on the visitors list.
- Verify
/profileloads the security user’s member details.
- Log in and verify immediate rendering of the Visitors list at
- Admin/Manager Dashboard:
- Verify categories (Sales, Purchase, Finance, Utilities) are divided cleanly.
- welcome page and then login page