Skip to content

SoftGuar/irchad_for_decider_web_app

Repository files navigation

IRCHAD Frontend - Decision Maker Dashboard

A comprehensive React/Next.js dashboard application for decision makers to monitor and analyze navigation data, user activity, sales metrics, and system performance.

πŸš€ Features

Dashboard Analytics

  • Zones & Navigation Dashboard: Monitor navigation patterns, obstacle analysis, and routing efficiency
  • Users Dashboard: Track user activity with daily, weekly, and monthly analytics
  • Sales Dashboard: Analyze quotation performance, conversion rates, and customer metrics
  • Real-time Notifications: WebSocket-powered notification system with in-app alerts

Key Components

  • Interactive Charts: Time-spent analysis, POI visits, obstacle mapping, and success rates
  • Data Visualization: Bar charts, line graphs, and statistical displays using Chart.js
  • PDF Report Generation: Comprehensive analytics reports with charts and insights
  • User Management: Profile management with role-based access control

Technical Features

  • Responsive Design: Mobile-first approach with Tailwind CSS
  • Real-time Updates: WebSocket integration for live notifications
  • Type Safety: Full TypeScript implementation
  • API Integration: RESTful API consumption with proper error handling

πŸ› οΈ Tech Stack

  • Framework: Next.js 14 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Charts: Chart.js / React-Chartjs-2
  • PDF Generation: jsPDF with autoTable
  • State Management: React Context API
  • HTTP Client: Fetch API with custom service layer
  • Real-time: WebSocket for notifications
  • Icons: Heroicons, Lucide React

πŸ“¦ Installation

  1. Clone the repository
git clone (https://github.com/SoftGuar/irchad_for_decider_web_app.git)
cd irchad_front_decideur
  1. Install dependencies
npm install
# or
yarn install
# or
pnpm install
# or
bun install
  1. Environment Setup Create a .env.local file in the root directory:
NEXT_PUBLIC_API_URL=your_api_base_url
NEXT_PUBLIC_WS_URL=your_websocket_url
  1. Run the development server
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
  1. Open your browser Navigate to http://localhost:3000 to see the result.

πŸ“ Project Structure

src/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ (logged_in)/                 # Protected routes
β”‚   β”‚   β”œβ”€β”€ profile/                 # User profile management
β”‚   β”‚   β”œβ”€β”€ users_dashboard/         # User analytics dashboard
β”‚   β”‚   β”œβ”€β”€ sales_dashboard/         # Sales metrics dashboard
β”‚   β”‚   └── zones_dashboard/         # Navigation analytics
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ cards/                   # Reusable card components
β”‚   β”‚   β”œβ”€β”€ shared/                  # Shared UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ navbar/              # Navigation bar
β”‚   β”‚   β”‚   β”œβ”€β”€ sidebar/             # Side navigation
β”‚   β”‚   β”‚   └── footer/              # Footer component
β”‚   β”‚   └── ui/                      # Base UI components
β”‚   β”œβ”€β”€ login/                       # Authentication pages
β”‚   └── layout.tsx                   # Root layout
β”œβ”€β”€ services/                        # API service layer
β”‚   β”œβ”€β”€ apiService.ts               # Base API configuration
β”‚   β”œβ”€β”€ userApi.ts                  # User-related endpoints
β”‚   β”œβ”€β”€ zonesApi.ts                 # Navigation analytics APIs
β”‚   β”œβ”€β”€ deviceApi.ts                # Device management APIs
β”‚   └── notificationsApi.ts         # Notification services
β”œβ”€β”€ type/                           # TypeScript type definitions
β”‚   β”œβ”€β”€ user.ts                     # User interfaces
β”‚   │── notifications.ts            # Notification types
β”‚   └── environment.ts              # Environment/Zone types
β”œβ”€β”€ utils/                          # Utility functions and contexts
β”‚   β”œβ”€β”€ userContext.tsx             # User state management
β”‚   └── notificationsContext.tsx    # Notification state management
└── globals.css                     # Global styles and Tailwind config

🎯 Key Features Detail

Navigation Analytics

  • Zone Monitoring: Track time spent in different zones with visual charts
  • Obstacle Analysis: Identify areas with highest obstacle counts
  • POI Tracking: Monitor most visited points of interest
  • Success Rates: Analyze navigation completion rates with decimal precision
  • Routing Logs: Detailed navigation history with timestamps and durations

User Activity Dashboard

  • Multi-timeframe Analysis: Daily, weekly, and monthly user activity trends
  • User Comments: Feedback collection and analysis
  • Activity Patterns: Identify usage peaks and engagement trends
  • Export Capabilities: Generate comprehensive PDF reports

Sales Intelligence

  • Quotation Analytics: Track conversion rates and performance metrics
  • Customer Insights: Analyze new vs. existing customer patterns
  • Product Performance: Monitor most quoted products and conversion rates
  • Revenue Tracking: Comprehensive sales analytics with trend analysis

Real-time Notifications

  • WebSocket Integration: Live notification delivery
  • Multi-channel Support: In-app, email, and push notification support
  • Interactive Management: Mark as read/unread, delete, bulk operations
  • Priority Handling: Support for different notification priorities

πŸ”§ API Integration

The application integrates with multiple backend services:

  • Analytics APIs: /analytics/zones/*, /analytics/users/*, /analytics/navigation/*
  • User Management: /users/*, /admin/users/*
  • Device Management: /admin/dispositives/*
  • Notifications: WebSocket + REST API for notification management

πŸ“Š Chart Components

Time Spent Analysis

  • Line charts showing zone visit duration
  • Converts seconds to minutes for better readability
  • Zone name mapping for user-friendly display

POI Visualization

  • Bar charts for point of interest popularity
  • Visit count tracking and trending

Obstacle Mapping

  • Visual representation of areas with navigation challenges
  • Helps prioritize improvement efforts

Success Rate Metrics

  • Percentage displays with 2 decimal precision
  • Color-coded indicators for performance levels

🎨 Styling & Theme

  • Dark Theme: Professional dark color scheme with orange accents
  • Responsive Grid: CSS Grid and Flexbox for layout management
  • Custom Components: Consistent design system with reusable components
  • Loading States: Elegant loading animations and skeleton screens

πŸ“± Responsive Design

  • Mobile-First: Optimized for mobile devices
  • Breakpoint System: Tailwind's responsive utility classes
  • Adaptive Layouts: Grid systems that adjust to screen size
  • Touch-Friendly: Appropriate sizing for mobile interactions

πŸ”’ Authentication & Security

  • Protected Routes: Route-based access control
  • User Context: Centralized user state management
  • Role-Based Access: Different access levels based on user roles
  • Secure API Calls: Token-based authentication

πŸ“ˆ Performance Optimization

  • Code Splitting: Route-based code splitting with Next.js
  • Image Optimization: Next.js Image component for optimized loading
  • Lazy Loading: Components loaded on demand
  • Memoization: React.memo and useMemo for performance optimization

πŸš€ Deployment

Build for Production

npm run build
npm start

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

Environment Variables

Ensure all environment variables are properly set in your production environment.

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“š Learn More

To learn more about the technologies used in this project:

πŸ“ License

This project is proprietary software developed for IRCHAD navigation systems.

πŸ“ž Support

For technical support or questions about the dashboard, please contact the development team.


Built with ❀️ for IRCHAD Decision Makers

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors