Skip to content

Repository files navigation

πŸš€ SmartDev Client Portal

A Modern, AI-Powered Client Management Platform

React TypeScript Vite Tailwind CSS Google AI


SmartDev Logo

SmartDev is a cutting-edge client portal featuring AI-powered project consultation, intelligent booking management, and a stunning animated user interface.

✨ Features β€’ πŸ› οΈ Tech Stack β€’ πŸš€ Quick Start β€’ πŸ“ Project Structure β€’ πŸ€– AI Integration


✨ Features

🎨 Beautiful UI/UX

  • πŸŒ“ Dark/Light mode support
  • 🎯 Custom animated cursor with color cycling
  • ✨ Smooth Framer Motion animations
  • πŸ“± Fully responsive design
  • 🎭 Micro-interactions & hover effects

πŸ€– AI-Powered

  • πŸ’¬ AI Project Consultant (Gemini)
  • 🀝 Floating AI Copilot assistant
  • 🧠 Context-aware conversations
  • 🌍 Multilingual support (EN/FR/NL/DE)

οΏ½ Client Management

  • πŸ“Š Interactive Dashboard
  • πŸ“… Smart Booking System
  • 🎫 Demo Booking (No login required)
  • πŸ“ Project Management
  • πŸ”” Real-time Notifications

πŸ” Admin Features

  • πŸ‘€ User Management
  • βœ… Booking Approvals
  • πŸ“ˆ Analytics Overview
  • πŸ›‘οΈ Role-based Access

πŸ› οΈ Tech Stack

Category Technologies
Frontend React 19 β€’ TypeScript β€’ Vite
Styling Tailwind CSS β€’ Framer Motion
Backend Node.js β€’ Express
AI Google Gemini API
Icons Lucide React
Charts Recharts

πŸš€ Quick Start

Prerequisites

Node.js v18+ 
npm or yarn

πŸ“¦ Installation

# Clone the repository
git clone https://github.com/OUARAS-khelil-Rafik/SmartDev-ClientPortal.git

# Navigate to project
cd SmartDev-ClientPortal

# Install frontend dependencies
npm install

# Install backend dependencies
cd server && npm install && cd ..

βš™οΈ Configuration

Create a server/.env file:

# Get your API key at: https://aistudio.google.com/app/apikey
GEMINI_API_KEY=your_api_key_here
PORT=3001
NODE_ENV=development

🎯 Running the Application

Option 1: Run Both Together (Recommended)

npm run dev

This starts both frontend (port 3000) and backend (port 3001) simultaneously.

Option 2: Run Separately

Terminal 1 - Backend:

cd server
node index.js

Terminal 2 - Frontend:

npm run client

🌐 Access the App

Service URL
πŸ–₯️ Frontend http://localhost:3000
πŸ”Œ Backend API http://localhost:3001
❀️ Health Check http://localhost:3001/api/health

πŸ“ Project Structure

SmartDev-ClientPortal/
β”œβ”€β”€ πŸ“‚ src/
β”‚   β”œβ”€β”€ πŸ“‚ components/
β”‚   β”‚   β”œβ”€β”€ 🎨 AdminDashboard.tsx    # Admin control panel
β”‚   β”‚   β”œβ”€β”€ πŸ€– AIConsultant.tsx      # AI chat interface
β”‚   β”‚   β”œβ”€β”€ 🎯 AllComponents.tsx     # All components showcase
β”‚   β”‚   β”œβ”€β”€ πŸ“¬ AllNotifications.tsx  # All notifications view
β”‚   β”‚   β”œβ”€β”€ πŸŽͺ AppsShowcase.tsx      # Apps showcase section
β”‚   β”‚   β”œβ”€β”€ πŸ” Auth.tsx              # Authentication
β”‚   β”‚   β”œβ”€β”€ πŸ“… Booking.tsx           # Booking system (logged-in users)
β”‚   β”‚   β”œβ”€β”€ ⚠️ ConfirmDialog.tsx     # Confirmation dialog
β”‚   β”‚   β”œβ”€β”€ 🎯 CustomCursor.tsx      # Animated cursor
β”‚   β”‚   β”œβ”€β”€ πŸ“Š Dashboard.tsx         # Client dashboard
β”‚   β”‚   β”œβ”€β”€ 🎫 DemoBooking.tsx       # Demo booking (no login required)
β”‚   β”‚   β”œβ”€β”€ πŸ’¬ FloatingCopilot.tsx   # AI assistant widget
β”‚   β”‚   β”œβ”€β”€ 🏠 Hero.tsx              # Landing hero section
β”‚   β”‚   β”œβ”€β”€ 🧭 Navbar.tsx            # Navigation bar
β”‚   β”‚   β”œβ”€β”€ πŸ”” Notifications.tsx     # Notification system
β”‚   β”‚   └── πŸ› οΈ Services.tsx          # Services showcase
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ i18n/
β”‚   β”‚   β”œβ”€β”€ πŸ‡¬πŸ‡§ en.ts                 # English translations
β”‚   β”‚   β”œβ”€β”€ πŸ‡«πŸ‡· fr.ts                 # French translations
β”‚   β”‚   β”œβ”€β”€ πŸ‡³πŸ‡± nl.ts                 # Dutch translations
β”‚   β”‚   β”œβ”€β”€ πŸ‡©πŸ‡ͺ de.ts                 # German translations
β”‚   β”‚   └── πŸ“¦ index.tsx             # i18n provider
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ img/
β”‚   β”‚   └── πŸ“‚ tech-icons/           # Technology icons
β”‚   β”‚
β”‚   β”œβ”€β”€ πŸ“‚ services/
β”‚   β”‚   β”œβ”€β”€ πŸ€– geminiService.ts      # AI API client
β”‚   β”‚   └── 🌐 api.ts                # MongoDB-backed API client
β”‚   β”‚
β”‚   β”œβ”€β”€ 🎨 App.tsx                   # Main application
β”‚   β”œβ”€β”€ 🎭 index.css                 # Global styles
β”‚   β”œβ”€β”€ πŸ“¦ index.tsx                 # Entry point
β”‚   └── πŸ“ types.ts                  # TypeScript types
β”‚
β”œβ”€β”€ πŸ“‚ server/
β”‚   β”œβ”€β”€ πŸš€ index.js                  # Express server
β”‚   β”œβ”€β”€ πŸ“¦ package.json              # Server dependencies
β”‚   β”œβ”€β”€ πŸ”’ .env                      # Environment variables
β”‚   └── πŸ“„ .env.example              # Environment template
β”‚
β”œβ”€β”€ πŸ“„ package.json                  # Project dependencies
β”œβ”€β”€ ⚑ vite.config.ts                # Vite configuration
β”œβ”€β”€ 🎨 tailwind.config.cjs           # Tailwind configuration
└── πŸ“ tsconfig.json                 # TypeScript configuration

🎫 Demo Booking

SmartDev features a Demo Booking system that allows potential clients to schedule a demo without requiring an account:

✨ Features

Feature Description
🚫 No Login Required Book a demo without creating an account
πŸ“ Simple Form Collect name, email, company, and phone
πŸ“… Live Availability Real-time slot checking to prevent double-booking
πŸ“§ Admin Notifications Admins receive instant notifications of new demo requests
🌍 Fully Translated Available in all supported languages (EN/FR/NL/DE)

πŸ“‹ Booking Flow

  1. Click "Book a Demo" on the homepage
  2. Fill in contact information (name, email, optional company/phone)
  3. Describe your project needs
  4. Select available date and time slot
  5. Submit request - Admin will confirm and send meeting link

πŸ€– AI Integration

SmartDev features two AI-powered assistants powered by Google Gemini:

πŸ’¬ AI Project Consultant

A full-page AI consultant that helps clients:

  • Define project requirements
  • Get technology recommendations
  • Understand project timelines
  • Break down complex projects

🀝 Floating Copilot

A compact assistant widget that:

  • Helps navigate the website
  • Answers questions about services
  • Provides quick assistance

API Endpoints

Method Endpoint Description
POST /api/consultation Project consultation AI
POST /api/copilot Website copilot AI
GET /api/health Health check

πŸ”” Notifications

SmartDev includes a real-time notification system used for booking updates, demo requests, and admin alerts.

  • Users receive notifications scoped to their account; admins see all notifications.
  • Notifications support marking read/unread, deleting, and bulk actions.
  • Translations for notification UI strings live in the src/i18n files (see notifications.* keys).

The frontend Notifications component uses the MongoDB-backed API client in src/services/api.ts.


🎨 Custom Cursor

The portal features a unique animated cursor experience:

Feature Description
🎯 Smooth Following Ring follows cursor with smooth animation
🌈 Color Cycling Automatic HSL color rotation
πŸ’« Click Ripples Animated ripples on click
πŸ” Hover Effects Ring grows on interactive elements
β™Ώ Accessibility Respects prefers-reduced-motion

Note: The cursor is only active on devices with fine pointers (not touch devices).


🌍 Internationalization

The app supports multiple languages:

Language Code Status
πŸ‡¬πŸ‡§ English en βœ… Complete
πŸ‡«πŸ‡· French fr βœ… Complete
πŸ‡³πŸ‡± Dutch nl βœ… Complete
πŸ‡©πŸ‡ͺ German de βœ… Complete

Toggle language using the language switcher in the navbar.


πŸ“œ Available Scripts

Command Description
npm run dev Start frontend + backend together
npm run client Start frontend only
npm run server Start backend only
npm run build Build for production
npm run preview Preview production build

πŸ”§ Environment Variables

Frontend (.env in root)

VITE_API_URL=http://localhost:3001

Backend (server/.env)

GEMINI_API_KEY=your_api_key_here
PORT=3001
NODE_ENV=development

πŸ› Troubleshooting

❌ "I'm having trouble connecting to the AI service"
  1. Make sure the backend server is running on port 3001
  2. Check that your GEMINI_API_KEY is valid
  3. Verify the API key at Google AI Studio
❌ Port already in use

Kill the process using the port:

# Windows
Get-Process -Id (Get-NetTCPConnection -LocalPort 3001).OwningProcess | Stop-Process -Force
❌ Custom cursor offset issues
  • Set browser zoom to 100%
  • Check OS display scaling settings
  • Verify window.devicePixelRatio in console

πŸ‘¨β€πŸ’» Author

OUARAS Khelil Rafik

GitHub


⭐ Star this repo if you found it helpful!

Made with ❀️ and β˜•

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages