├── src ├── layouts │ ├── GuestLayout.jsx │ ├── AuthenticatedLayout.jsx │ ├── PublicLayout.jsx │ └── DashboardLayout.jsx ├── components │ ├── GuestNavbar.jsx │ ├── AuthenticatedNavbar.jsx │ ├── auth │ │ ├── ProtectedRoute.jsx │ │ └── RoleBasedRoute.jsx │ └── common │ │ ├── LoadingSpinner.jsx │ │ └── ErrorBoundary.jsx ├── pages │ ├── Profile.jsx │ ├── auth │ │ ├── Login.jsx │ │ ├── Register.jsx │ │ ├── ForgotPassword.jsx │ │ ├── ResetPassword.jsx │ │ ├── ForgotPasswordPage.jsx │ │ ├── LoginPage.jsx │ │ ├── ResetPasswordPage.jsx │ │ └── RegisterPage.jsx │ ├── welcome │ │ └── Welcome.jsx │ ├── admin │ │ ├── AdminHome.jsx │ │ ├── ExpoManagement │ │ │ ├── ExpoManagementEdit.jsx │ │ │ ├── ExpoManagementIndex.jsx │ │ │ ├── ExpoManagementCreate.jsx │ │ │ ├── ExpoManagementForm.jsx │ │ │ └── ExpoManagementList.jsx │ │ ├── ScheduleManagement │ │ │ ├── ScheduleManagementEdit.jsx │ │ │ ├── ScheduleManagementIndex.jsx │ │ │ └── ScheduleManagementCreate.jsx │ │ ├── ExhibitorManagement │ │ │ ├── ExhibitorManagementEdit.jsx │ │ │ ├── ExhibitorManagementIndex.jsx │ │ │ └── ExhibitorManagementCreate.jsx │ │ ├── AnalyticsandReporting │ │ │ ├── AnalyticsandReportingEdit.jsx │ │ │ ├── AnalyticsandReportingIndex.jsx │ │ │ └── AnalyticsandReportingCreate.jsx │ │ ├── ExpoManagement.jsx │ │ ├── UserManagement.jsx │ │ ├── AnalyticsPage.jsx │ │ └── AdminDashboard.jsx │ ├── exhibitor │ │ ├── Communication.jsx │ │ ├── BoothDetails.jsx │ │ ├── ExhibitorApplications.jsx │ │ ├── ExhibitorAnalytics.jsx │ │ ├── ExhibitorDashboard.jsx │ │ ├── BoothSelection.jsx │ │ ├── Profile.jsx │ │ └── ExhibitorProfile.jsx │ ├── shared │ │ ├── MessagesPage.jsx │ │ ├── ProfilePage.jsx │ │ ├── NotificationsPage.jsx │ │ ├── FeedbackPage.jsx │ │ └── DashboardHome.jsx │ ├── organizer │ │ ├── CreateExpo.jsx │ │ ├── ManageExpos.jsx │ │ ├── AttendeeManagement.jsx │ │ ├── BoothManagement.jsx │ │ ├── ScheduleManagement.jsx │ │ ├── ExhibitorApplications.jsx │ │ └── OrganizerDashboard.jsx │ ├── attendee │ │ ├── MyRegistrations.jsx │ │ ├── AttendeeProfile.jsx │ │ ├── NetworkingPage.jsx │ │ ├── SessionSchedule.jsx │ │ ├── ExhibitorDirectory.jsx │ │ ├── AttendeeDashboard.jsx │ │ ├── Schedule.jsx │ │ ├── ExhibitorSearch.jsx │ │ └── EventList.jsx │ ├── Welcome.jsx │ ├── Feedback.jsx │ └── public │ │ ├── ExposPage.jsx │ │ ├── HomePage.jsx │ │ └── ExpoDetailPage.jsx ├── services │ ├── feedback.js │ ├── expo.js │ ├── attendee.js │ ├── booth.js │ ├── schedule.js │ ├── exhibitor.js │ └── api.js ├── hooks │ └── useAuth.js ├── main.jsx ├── App.css ├── index.css ├── context │ ├── ThemeContext.jsx │ └── AuthContext.jsx ├── assets │ └── react.svg └── App.jsx ├── vite.config.js ├── tailwind.config.js ├── .gitignore ├── index.html ├── README.md ├── eslint.config.js ├── public └── vite.svg └── package.json /src/layouts/GuestLayout.jsx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/GuestNavbar.jsx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/AuthenticatedNavbar.jsx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/layouts/AuthenticatedLayout.jsx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/pages/Profile.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const Profile = () => { 4 | return ( 5 |
Profile
6 | ) 7 | } 8 | 9 | export default Profile -------------------------------------------------------------------------------- /src/pages/auth/Login.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const Login = () => { 4 | return ( 5 |
Login
6 | ) 7 | } 8 | 9 | export default Login -------------------------------------------------------------------------------- /src/pages/auth/Register.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const Register = () => { 4 | return ( 5 |
Register
6 | ) 7 | } 8 | 9 | export default Register -------------------------------------------------------------------------------- /src/pages/welcome/Welcome.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const Welcome = () => { 4 | return ( 5 |
Welcome
6 | ) 7 | } 8 | 9 | export default Welcome -------------------------------------------------------------------------------- /src/pages/admin/AdminHome.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const AdminHome = () => { 4 | return ( 5 |
AdminHome
6 | ) 7 | } 8 | 9 | export default AdminHome -------------------------------------------------------------------------------- /src/services/feedback.js: -------------------------------------------------------------------------------- 1 | import API from './api'; 2 | 3 | export const submitFeedback = (data) => API.post('/feedback', data); 4 | export const getAllFeedback = () => API.get('/feedback'); 5 | -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /src/hooks/useAuth.js: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | import { AuthContext } from '../context/AuthContext'; 3 | 4 | const useAuth = () => useContext(AuthContext); 5 | 6 | export default useAuth; 7 | -------------------------------------------------------------------------------- /src/pages/exhibitor/Communication.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const ExhibitorCommunication = () => { 4 | return
Exhibitor Communication
5 | } 6 | 7 | export default ExhibitorCommunication 8 | -------------------------------------------------------------------------------- /src/pages/admin/ExpoManagement/ExpoManagementEdit.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const ExpoManagementEdit = () => { 4 | return ( 5 |
ExpoManagementEdit
6 | ) 7 | } 8 | 9 | export default ExpoManagementEdit -------------------------------------------------------------------------------- /src/pages/admin/ExpoManagement/ExpoManagementIndex.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const ExpoManagementIndex = () => { 4 | return ( 5 |
ExpoManagementIndex
6 | ) 7 | } 8 | 9 | export default ExpoManagementIndex -------------------------------------------------------------------------------- /src/pages/admin/ExpoManagement/ExpoManagementCreate.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const ExpoManagementCreate = () => { 4 | return ( 5 |
ExpoManagementCreate
6 | ) 7 | } 8 | 9 | export default ExpoManagementCreate -------------------------------------------------------------------------------- /src/pages/admin/ScheduleManagement/ScheduleManagementEdit.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const ScheduleManagementEdit = () => { 4 | return ( 5 |
ScheduleManagementEdit
6 | ) 7 | } 8 | 9 | export default ScheduleManagementEdit -------------------------------------------------------------------------------- /src/pages/admin/ExhibitorManagement/ExhibitorManagementEdit.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const ExhibitorManagementEdit = () => { 4 | return ( 5 |
ExhibitorManagementEdit
6 | ) 7 | } 8 | 9 | export default ExhibitorManagementEdit -------------------------------------------------------------------------------- /src/pages/admin/ScheduleManagement/ScheduleManagementIndex.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const ScheduleManagementIndex = () => { 4 | return ( 5 |
ScheduleManagementIndex
6 | ) 7 | } 8 | 9 | export default ScheduleManagementIndex -------------------------------------------------------------------------------- /src/pages/admin/ExhibitorManagement/ExhibitorManagementIndex.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const ExhibitorManagementIndex = () => { 4 | return ( 5 |
ExhibitorManagementIndex
6 | ) 7 | } 8 | 9 | export default ExhibitorManagementIndex -------------------------------------------------------------------------------- /src/pages/admin/ScheduleManagement/ScheduleManagementCreate.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const ScheduleManagementCreate = () => { 4 | return ( 5 |
ScheduleManagementCreate
6 | ) 7 | } 8 | 9 | export default ScheduleManagementCreate -------------------------------------------------------------------------------- /src/pages/admin/AnalyticsandReporting/AnalyticsandReportingEdit.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const AnalyticsandReportingEdit = () => { 4 | return ( 5 |
AnalyticsandReportingEdit
6 | ) 7 | } 8 | 9 | export default AnalyticsandReportingEdit -------------------------------------------------------------------------------- /src/pages/admin/ExhibitorManagement/ExhibitorManagementCreate.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const ExhibitorManagementCreate = () => { 4 | return ( 5 |
ExhibitorManagementCreate
6 | ) 7 | } 8 | 9 | export default ExhibitorManagementCreate -------------------------------------------------------------------------------- /src/pages/admin/AnalyticsandReporting/AnalyticsandReportingIndex.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const AnalyticsandReportingIndex = () => { 4 | return ( 5 |
AnalyticsandReportingIndex
6 | ) 7 | } 8 | 9 | export default AnalyticsandReportingIndex -------------------------------------------------------------------------------- /src/pages/admin/AnalyticsandReporting/AnalyticsandReportingCreate.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | const AnalyticsandReportingCreate = () => { 4 | return ( 5 |
AnalyticsandReportingCreate
6 | ) 7 | } 8 | 9 | export default AnalyticsandReportingCreate -------------------------------------------------------------------------------- /src/main.jsx: -------------------------------------------------------------------------------- 1 | import { StrictMode } from 'react' 2 | import { createRoot } from 'react-dom/client' 3 | import './index.css' 4 | import App from './App.jsx' 5 | 6 | createRoot(document.getElementById('root')).render( 7 | 8 | 9 | , 10 | ) 11 | -------------------------------------------------------------------------------- /src/services/expo.js: -------------------------------------------------------------------------------- 1 | import API from './api'; 2 | 3 | export const getExpos = () => API.get('/expos'); 4 | export const createExpo = (data) => API.post('/expos', data); 5 | export const updateExpo = (id, data) => API.put(`/expos/${id}`, data); 6 | export const deleteExpo = (id) => API.delete(`/expos/${id}`); 7 | -------------------------------------------------------------------------------- /src/services/attendee.js: -------------------------------------------------------------------------------- 1 | import API from './api'; 2 | 3 | export const getMyAttendeeProfile = () => API.get('/attendees/me'); 4 | export const registerForExpo = (expoId) => API.post('/attendees/register-expo', { expoId }); 5 | export const bookmarkSession = (sessionId) => API.put('/attendees/bookmark-session', { sessionId }); 6 | -------------------------------------------------------------------------------- /src/services/booth.js: -------------------------------------------------------------------------------- 1 | import API from './api'; 2 | 3 | export const getBooths = (expoId) => API.get(`/booths/${expoId}`); 4 | export const createBooth = (data) => API.post('/booths', data); 5 | export const updateBooth = (id, data) => API.put(`/booths/${id}`, data); 6 | export const deleteBooth = (id) => API.delete(`/booths/${id}`); 7 | -------------------------------------------------------------------------------- /src/services/schedule.js: -------------------------------------------------------------------------------- 1 | import API from './api'; 2 | 3 | export const getSchedules = (expoId) => API.get(`/schedules/${expoId}`); 4 | export const createSchedule = (data) => API.post('/schedules', data); 5 | export const updateSchedule = (id, data) => API.put(`/schedules/${id}`, data); 6 | export const deleteSchedule = (id) => API.delete(`/schedules/${id}`); 7 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | export default { 3 | content: [ 4 | "./index.html", 5 | "./src/**/*.{js,ts,jsx,tsx}", 6 | "./node_modules/flowbite/**/*.js" 7 | ], 8 | darkMode: 'class', 9 | theme: { 10 | extend: {}, 11 | }, 12 | plugins: [ 13 | require('flowbite/plugin') 14 | ], 15 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/pages/shared/MessagesPage.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const MessagesPage = () => { 4 | return ( 5 |
6 |

7 | Messages 8 |

9 |

10 | View and manage your messages and communications. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default MessagesPage; -------------------------------------------------------------------------------- /src/pages/shared/ProfilePage.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const ProfilePage = () => { 4 | return ( 5 |
6 |

7 | Profile 8 |

9 |

10 | Manage your profile information and account settings. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default ProfilePage; -------------------------------------------------------------------------------- /src/pages/organizer/CreateExpo.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const CreateExpo = () => { 4 | return ( 5 |
6 |

7 | Create New Expo - TEST PAGE 8 |

9 |

10 | This page is working! The routing and layout are functional. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default CreateExpo; -------------------------------------------------------------------------------- /src/pages/attendee/MyRegistrations.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const MyRegistrations = () => { 4 | return ( 5 |
6 |

7 | My Registrations 8 |

9 |

10 | View and manage your event registrations. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default MyRegistrations; -------------------------------------------------------------------------------- /src/pages/attendee/AttendeeProfile.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const AttendeeProfile = () => { 4 | return ( 5 |
6 |

7 | Attendee Profile 8 |

9 |

10 | Manage your attendee profile and preferences. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default AttendeeProfile; -------------------------------------------------------------------------------- /src/pages/exhibitor/BoothDetails.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const BoothDetails = () => { 4 | return ( 5 |
6 |

7 | Booth Details 8 |

9 |

10 | View and manage your booth information and setup details. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default BoothDetails; -------------------------------------------------------------------------------- /src/pages/organizer/ManageExpos.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const ManageExpos = () => { 4 | return ( 5 |
6 |

7 | Manage Expos 8 |

9 |

10 | View and manage your existing exhibitions and trade shows. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default ManageExpos; -------------------------------------------------------------------------------- /src/pages/attendee/NetworkingPage.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const NetworkingPage = () => { 4 | return ( 5 |
6 |

7 | Networking 8 |

9 |

10 | Connect and network with other attendees and exhibitors. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default NetworkingPage; -------------------------------------------------------------------------------- /src/pages/attendee/SessionSchedule.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const SessionSchedule = () => { 4 | return ( 5 |
6 |

7 | Session Schedule 8 |

9 |

10 | View and manage your session schedule and bookings. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default SessionSchedule; -------------------------------------------------------------------------------- /src/pages/shared/NotificationsPage.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const NotificationsPage = () => { 4 | return ( 5 |
6 |

7 | Notifications 8 |

9 |

10 | View and manage your notifications and alerts. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default NotificationsPage; -------------------------------------------------------------------------------- /src/pages/admin/ExpoManagement.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const ExpoManagement = () => { 4 | return ( 5 |
6 |

7 | Expo Management 8 |

9 |

10 | Manage all exhibitions and trade shows from this admin panel. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default ExpoManagement; -------------------------------------------------------------------------------- /src/pages/admin/UserManagement.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const UserManagement = () => { 4 | return ( 5 |
6 |

7 | User Management 8 |

9 |

10 | Manage all users, roles, and permissions from this admin panel. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default UserManagement; -------------------------------------------------------------------------------- /src/pages/shared/FeedbackPage.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const FeedbackPage = () => { 4 | return ( 5 |
6 |

7 | Feedback 8 |

9 |

10 | Provide feedback about your experience and suggestions for improvement. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default FeedbackPage; -------------------------------------------------------------------------------- /src/pages/attendee/ExhibitorDirectory.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const ExhibitorDirectory = () => { 4 | return ( 5 |
6 |

7 | Exhibitor Directory 8 |

9 |

10 | Browse and search for exhibitors at the event. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default ExhibitorDirectory; -------------------------------------------------------------------------------- /src/pages/organizer/AttendeeManagement.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const AttendeeManagement = () => { 4 | return ( 5 |
6 |

7 | Attendee Management 8 |

9 |

10 | Manage event attendees, registrations, and check-ins. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default AttendeeManagement; -------------------------------------------------------------------------------- /src/pages/organizer/BoothManagement.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const BoothManagement = () => { 4 | return ( 5 |
6 |

7 | Booth Management 8 |

9 |

10 | Manage booth allocations, floor plans, and exhibitor assignments. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default BoothManagement; -------------------------------------------------------------------------------- /src/pages/admin/AnalyticsPage.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const AnalyticsPage = () => { 4 | return ( 5 |
6 |

7 | Analytics & Reporting 8 |

9 |

10 | View comprehensive analytics and reports for all events and activities. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default AnalyticsPage; -------------------------------------------------------------------------------- /src/pages/organizer/ScheduleManagement.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const ScheduleManagement = () => { 4 | return ( 5 |
6 |

7 | Schedule Management 8 |

9 |

10 | Manage event schedules, sessions, and speaker assignments. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default ScheduleManagement; -------------------------------------------------------------------------------- /src/pages/exhibitor/ExhibitorApplications.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const ExhibitorApplications = () => { 4 | return ( 5 |
6 |

7 | My Applications 8 |

9 |

10 | View and manage your exhibitor applications for various events. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default ExhibitorApplications; -------------------------------------------------------------------------------- /src/pages/organizer/ExhibitorApplications.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const ExhibitorApplications = () => { 4 | return ( 5 |
6 |

7 | Exhibitor Applications 8 |

9 |

10 | Review and manage exhibitor applications for your events. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default ExhibitorApplications; -------------------------------------------------------------------------------- /src/services/exhibitor.js: -------------------------------------------------------------------------------- 1 | import API from './api'; 2 | 3 | export const registerExhibitor = (data) => API.post('/exhibitors/register', data); 4 | export const getMyExhibitorProfile = () => API.get('/exhibitors/me'); 5 | export const updateMyExhibitorProfile = (data) => API.put('/exhibitors/me', data); 6 | export const getAllExhibitors = () => API.get('/exhibitors'); 7 | export const approveExhibitor = (id) => API.put(`/exhibitors/${id}/approve`); 8 | export const rejectExhibitor = (id) => API.put(`/exhibitors/${id}/reject`); 9 | -------------------------------------------------------------------------------- /src/pages/exhibitor/ExhibitorAnalytics.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const ExhibitorAnalytics = () => { 4 | return ( 5 |
6 |

7 | Exhibitor Analytics 8 |

9 |

10 | View analytics and insights for your booth performance and visitor engagement. 11 |

12 |
13 | ); 14 | }; 15 | 16 | export default ExhibitorAnalytics; -------------------------------------------------------------------------------- /src/pages/exhibitor/ExhibitorDashboard.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Link } from 'react-router-dom' 3 | 4 | const ExhibitorDashboard = () => ( 5 |
6 |

Exhibitor Portal

7 | 13 |
14 | ) 15 | 16 | export default ExhibitorDashboard 17 | -------------------------------------------------------------------------------- /src/pages/attendee/AttendeeDashboard.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { Link } from 'react-router-dom' 3 | 4 | const AttendeeDashboard = () => ( 5 |
6 |

Attendee Portal

7 | 13 |
14 | ) 15 | 16 | export default AttendeeDashboard 17 | -------------------------------------------------------------------------------- /src/components/auth/ProtectedRoute.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Navigate, useLocation } from 'react-router-dom'; 3 | import { useAuth } from '../../context/AuthContext'; 4 | import LoadingSpinner from '../common/LoadingSpinner'; 5 | 6 | const ProtectedRoute = ({ children }) => { 7 | const { isAuthenticated, isLoading } = useAuth(); 8 | const location = useLocation(); 9 | 10 | if (isLoading) { 11 | return ; 12 | } 13 | 14 | if (!isAuthenticated) { 15 | // Redirect to login page with return url 16 | return ; 17 | } 18 | 19 | return children; 20 | }; 21 | 22 | export default ProtectedRoute; -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | #root { 2 | width: 100%; 3 | min-height: 100vh; 4 | margin: 0; 5 | padding: 0; 6 | } 7 | 8 | .logo { 9 | height: 6em; 10 | padding: 1.5em; 11 | will-change: filter; 12 | transition: filter 300ms; 13 | } 14 | .logo:hover { 15 | filter: drop-shadow(0 0 2em #646cffaa); 16 | } 17 | .logo.react:hover { 18 | filter: drop-shadow(0 0 2em #61dafbaa); 19 | } 20 | 21 | @keyframes logo-spin { 22 | from { 23 | transform: rotate(0deg); 24 | } 25 | to { 26 | transform: rotate(360deg); 27 | } 28 | } 29 | 30 | @media (prefers-reduced-motion: no-preference) { 31 | a:nth-of-type(2) .logo { 32 | animation: logo-spin infinite 20s linear; 33 | } 34 | } 35 | 36 | .card { 37 | padding: 2em; 38 | } 39 | 40 | .read-the-docs { 41 | color: #888; 42 | } 43 | 44 | /* Custom styles for the app */ 45 | .App { 46 | width: 100%; 47 | min-height: 100vh; 48 | } 49 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # React + Vite 2 | 3 | This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. 4 | 5 | Currently, two official plugins are available: 6 | 7 | - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh 8 | - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh 9 | 10 | ## Expanding the ESLint configuration 11 | 12 | If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project. 13 | -------------------------------------------------------------------------------- /src/components/common/LoadingSpinner.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Spinner } from 'flowbite-react'; 3 | 4 | const LoadingSpinner = ({ 5 | size = 'xl', 6 | color = 'blue', 7 | text = 'Loading...', 8 | fullScreen = true 9 | }) => { 10 | const containerClasses = fullScreen 11 | ? 'fixed inset-0 flex items-center justify-center bg-white dark:bg-gray-900 z-50' 12 | : 'flex items-center justify-center p-4'; 13 | 14 | return ( 15 |
16 |
17 | 22 | {text && ( 23 |

24 | {text} 25 |

26 | )} 27 |
28 |
29 | ); 30 | }; 31 | 32 | export default LoadingSpinner; -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | import js from '@eslint/js' 2 | import globals from 'globals' 3 | import reactHooks from 'eslint-plugin-react-hooks' 4 | import reactRefresh from 'eslint-plugin-react-refresh' 5 | 6 | export default [ 7 | { ignores: ['dist'] }, 8 | { 9 | files: ['**/*.{js,jsx}'], 10 | languageOptions: { 11 | ecmaVersion: 2020, 12 | globals: globals.browser, 13 | parserOptions: { 14 | ecmaVersion: 'latest', 15 | ecmaFeatures: { jsx: true }, 16 | sourceType: 'module', 17 | }, 18 | }, 19 | plugins: { 20 | 'react-hooks': reactHooks, 21 | 'react-refresh': reactRefresh, 22 | }, 23 | rules: { 24 | ...js.configs.recommended.rules, 25 | ...reactHooks.configs.recommended.rules, 26 | 'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }], 27 | 'react-refresh/only-export-components': [ 28 | 'warn', 29 | { allowConstantExport: true }, 30 | ], 31 | }, 32 | }, 33 | ] 34 | -------------------------------------------------------------------------------- /src/pages/Welcome.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import AuthenticatedLayout from '../layouts/AuthenticatedLayout' 3 | import { Link } from 'react-router-dom' 4 | 5 | const Welcome = () => { 6 | return ( 7 | 8 |
9 |

Welcome to EventSphere Management

10 |

Select your portal:

11 |
12 | Admin/Organizer Portal 13 | Exhibitor Portal 14 | Attendee Portal 15 |
16 |
17 |
18 | ) 19 | } 20 | 21 | export default Welcome -------------------------------------------------------------------------------- /src/pages/attendee/Schedule.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from 'react' 2 | import { getSchedules } from '../../services/schedule' 3 | 4 | const AttendeeSchedule = () => { 5 | const [expoId, setExpoId] = useState('') 6 | const [schedules, setSchedules] = useState([]) 7 | 8 | const fetchSchedules = async () => { 9 | if (expoId) { 10 | const res = await getSchedules(expoId) 11 | setSchedules(res.data) 12 | } 13 | } 14 | 15 | useEffect(() => { 16 | fetchSchedules() 17 | // eslint-disable-next-line 18 | }, [expoId]) 19 | 20 | return ( 21 |
22 |

Event Schedule

23 | setExpoId(e.target.value)} 27 | /> 28 | 29 |
    30 | {schedules.map(s => ( 31 |
  • 32 | {s.title} - {s.timeSlot} - {s.topic} - {s.location} 33 |
  • 34 | ))} 35 |
36 |
37 | ) 38 | } 39 | 40 | export default AttendeeSchedule 41 | -------------------------------------------------------------------------------- /src/pages/attendee/ExhibitorSearch.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from 'react'; 2 | import { getAllExhibitors } from '../../services/exhibitor'; 3 | 4 | const ExhibitorSearch = () => { 5 | const [exhibitors, setExhibitors] = useState([]); 6 | const [query, setQuery] = useState(''); 7 | 8 | useEffect(() => { 9 | getAllExhibitors().then(res => setExhibitors(res.data)); 10 | }, []); 11 | 12 | const filtered = exhibitors.filter(e => 13 | e.companyName?.toLowerCase().includes(query.toLowerCase()) || 14 | e.products?.join(',').toLowerCase().includes(query.toLowerCase()) 15 | ); 16 | 17 | return ( 18 |
19 |

Exhibitor Search

20 | setQuery(e.target.value)} /> 21 |
    22 | {filtered.map(ex => ( 23 |
  • 24 | {ex.companyName} - {ex.products?.join(', ')} 25 |
    {ex.description}
    26 |
    Contact: {ex.contactInfo}
    27 |
  • 28 | ))} 29 |
30 |
31 | ); 32 | }; 33 | 34 | export default ExhibitorSearch; 35 | -------------------------------------------------------------------------------- /src/pages/shared/DashboardHome.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useAuth } from '../../context/AuthContext'; 3 | import AdminDashboard from '../admin/AdminDashboard'; 4 | import OrganizerDashboard from '../organizer/OrganizerDashboard'; 5 | import ExhibitorDashboard from '../exhibitor/ExhibitorDashboard'; 6 | import AttendeeDashboard from '../attendee/AttendeeDashboard'; 7 | 8 | const DashboardHome = () => { 9 | const { isAdmin, isOrganizer, isExhibitor, isAttendee } = useAuth(); 10 | 11 | if (isAdmin()) { 12 | return ; 13 | } 14 | 15 | if (isOrganizer()) { 16 | return ; 17 | } 18 | 19 | if (isExhibitor()) { 20 | return ; 21 | } 22 | 23 | if (isAttendee()) { 24 | return ; 25 | } 26 | 27 | // Fallback for users without proper roles 28 | return ( 29 |
30 |

31 | Dashboard 32 |

33 |

34 | Welcome to EventSphere! Please contact support if you're seeing this message. 35 |

36 |
37 | ); 38 | }; 39 | 40 | export default DashboardHome; -------------------------------------------------------------------------------- /src/pages/attendee/EventList.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from 'react' 2 | import { getExpos } from '../../services/expo' 3 | import { registerForExpo } from '../../services/attendee' 4 | 5 | const EventList = () => { 6 | const [expos, setExpos] = useState([]) 7 | const [registered, setRegistered] = useState([]) 8 | const [loading, setLoading] = useState(true) 9 | 10 | useEffect(() => { 11 | getExpos().then(res => { 12 | setExpos(res.data) 13 | setLoading(false) 14 | }) 15 | }, []) 16 | 17 | const handleRegister = async (expoId) => { 18 | await registerForExpo(expoId) 19 | setRegistered([...registered, expoId]) 20 | } 21 | 22 | if (loading) return
Loading...
23 | 24 | return ( 25 |
26 |

Available Events

27 |
    28 | {expos.map(expo => ( 29 |
  • 30 | {expo.title} - {expo.date?.slice(0,10)} 31 | 34 |
  • 35 | ))} 36 |
37 |
38 | ) 39 | } 40 | 41 | export default EventList 42 | -------------------------------------------------------------------------------- /src/pages/auth/ForgotPassword.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react' 2 | import GuestLayout from '../../layouts/GuestLayout' 3 | import { forgotPassword } from '../../services/api' 4 | 5 | const ForgotPassword = () => { 6 | const [email, setEmail] = useState('') 7 | const [success, setSuccess] = useState('') 8 | const [error, setError] = useState('') 9 | 10 | const handleSubmit = async (e) => { 11 | e.preventDefault() 12 | setSuccess('') 13 | setError('') 14 | try { 15 | await forgotPassword({ email }) 16 | setSuccess('Password reset email sent!') 17 | } catch { 18 | setError('Failed to send reset email') 19 | } 20 | } 21 | 22 | return ( 23 | 24 |
25 |

Forgot Password

26 |
27 | setEmail(e.target.value)} required /> 28 | 29 |
30 | {success &&
{success}
} 31 | {error &&
{error}
} 32 |
33 |
34 | ) 35 | } 36 | 37 | export default ForgotPassword 38 | -------------------------------------------------------------------------------- /src/components/auth/RoleBasedRoute.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Navigate } from 'react-router-dom'; 3 | import { useAuth } from '../../context/AuthContext'; 4 | import { Alert } from 'flowbite-react'; 5 | import { HiExclamation } from 'react-icons/hi'; 6 | 7 | const RoleBasedRoute = ({ children, allowedRoles = [] }) => { 8 | const { user, hasAnyRole } = useAuth(); 9 | 10 | if (!user) { 11 | return ; 12 | } 13 | 14 | if (allowedRoles.length > 0 && !hasAnyRole(allowedRoles)) { 15 | return ( 16 |
17 |
18 | 19 | Access Denied! 20 |
21 | You don't have permission to access this page. 22 | Required roles: {allowedRoles.join(', ')} 23 |
24 |
25 | 31 |
32 |
33 |
34 |
35 | ); 36 | } 37 | 38 | return children; 39 | }; 40 | 41 | export default RoleBasedRoute; -------------------------------------------------------------------------------- /public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/pages/auth/ResetPassword.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react' 2 | import GuestLayout from '../../layouts/GuestLayout' 3 | import { resetPassword } from '../../services/api' 4 | import { useParams, useNavigate } from 'react-router-dom' 5 | 6 | const ResetPassword = () => { 7 | const { token } = useParams() 8 | const [password, setPassword] = useState('') 9 | const [success, setSuccess] = useState('') 10 | const [error, setError] = useState('') 11 | const navigate = useNavigate() 12 | 13 | const handleSubmit = async (e) => { 14 | e.preventDefault() 15 | setSuccess('') 16 | setError('') 17 | try { 18 | await resetPassword(token, { password }) 19 | setSuccess('Password reset successful!') 20 | setTimeout(() => navigate('/login'), 1500) 21 | } catch { 22 | setError('Failed to reset password') 23 | } 24 | } 25 | 26 | return ( 27 | 28 |
29 |

Reset Password

30 |
31 | setPassword(e.target.value)} required /> 32 | 33 |
34 | {success &&
{success}
} 35 | {error &&
{error}
} 36 |
37 |
38 | ) 39 | } 40 | 41 | export default ResetPassword 42 | -------------------------------------------------------------------------------- /src/pages/Feedback.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react' 2 | import API from '../services/api' 3 | 4 | const Feedback = () => { 5 | const [message, setMessage] = useState('') 6 | const [type, setType] = useState('suggestion') 7 | const [success, setSuccess] = useState('') 8 | const [error, setError] = useState('') 9 | 10 | const handleSubmit = async (e) => { 11 | e.preventDefault() 12 | setSuccess('') 13 | setError('') 14 | try { 15 | await API.post('/feedback', { message, type }) 16 | setSuccess('Feedback submitted!') 17 | setMessage('') 18 | } catch { 19 | setError('Failed to submit feedback') 20 | } 21 | } 22 | 23 | return ( 24 |
25 |

Feedback & Support

26 |
27 | 32 |