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
|
|
|
|
| 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 |
Node.js v18+
npm or yarn# 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 ..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=developmentOption 1: Run Both Together (Recommended)
npm run devThis starts both frontend (port 3000) and backend (port 3001) simultaneously.
Option 2: Run Separately
Terminal 1 - Backend:
cd server
node index.jsTerminal 2 - Frontend:
npm run client| Service | URL |
|---|---|
| π₯οΈ Frontend | http://localhost:3000 |
| π Backend API | http://localhost:3001 |
| β€οΈ Health Check | http://localhost:3001/api/health |
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
SmartDev features a Demo Booking system that allows potential clients to schedule a demo without requiring an account:
| 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) |
- Click "Book a Demo" on the homepage
- Fill in contact information (name, email, optional company/phone)
- Describe your project needs
- Select available date and time slot
- Submit request - Admin will confirm and send meeting link
SmartDev features two AI-powered assistants powered by Google Gemini:
A full-page AI consultant that helps clients:
- Define project requirements
- Get technology recommendations
- Understand project timelines
- Break down complex projects
A compact assistant widget that:
- Helps navigate the website
- Answers questions about services
- Provides quick assistance
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/consultation |
Project consultation AI |
POST |
/api/copilot |
Website copilot AI |
GET |
/api/health |
Health check |
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/i18nfiles (seenotifications.*keys).
The frontend Notifications component uses the MongoDB-backed API client in src/services/api.ts.
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).
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.
| 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 |
VITE_API_URL=http://localhost:3001GEMINI_API_KEY=your_api_key_here
PORT=3001
NODE_ENV=developmentβ "I'm having trouble connecting to the AI service"
- Make sure the backend server is running on port 3001
- Check that your
GEMINI_API_KEYis valid - 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.devicePixelRatioin console