A comprehensive web application that combines PC building assistance with an intelligent appointment scheduling system. Built with React, Node.js, MongoDB, and featuring role-based access control for admins and regular users.
- AI-Powered PC Building Assistant: Intelligent chatbot to help users build custom PCs
- Appointment Scheduling System: Advanced calendar-based booking with real-time availability
- Role-Based Access Control: Separate interfaces for admins and regular users
- Real-Time Notifications: Success/error feedback system
- Responsive Design: Modern UI that works on all devices
- Dashboard Management: View and manage all appointments
- User Management: View user details and manage profiles
- Appointment Control: Confirm, cancel, and track appointment status
- Search & Filter: Advanced search by appointment ID, user name, and service type
- Calendar Overview: Full calendar view of all appointments
- Personal Dashboard: View own appointments and profile
- Appointment Booking: Easy-to-use calendar interface
- Profile Management: Update personal information and reset password
- ChatBot Access: Direct access to AI PC building assistant
- Appointment History: View past and upcoming appointments
- JWT Authentication: Secure token-based authentication
- MongoDB Database: Scalable NoSQL database
- RESTful API: Clean API architecture
- Real-Time Updates: Live calendar updates and notifications
- Past Date Protection: Prevents booking on past dates
- Conflict Prevention: Blocks double-booking of time slots
- React 18.2.0: Modern UI framework
- React Router DOM: Client-side routing
- FullCalendar: Advanced calendar component
- Axios: HTTP client for API calls
- JWT Decode: Token management
- JS Cookie: Cookie management
- Node.js: Server runtime
- Express.js: Web framework
- MongoDB: Database
- Mongoose: ODM for MongoDB
- bcryptjs: Password hashing
- jsonwebtoken: JWT authentication
- CORS: Cross-origin resource sharing
- Socket.io: Real-time communication
- Nodemon: Development server with auto-restart
- ESLint: Code quality and consistency
Before running this project, make sure you have the following installed:
- Node.js (v16 or higher)
- npm (v8 or higher)
- MongoDB (v5 or higher)
- Git (for cloning the repository)
git clone <repository-url>
cd AI-Powered-PC-Builder-and-Appointment-Schedulernpm installcd client
npm install
cd ..cd server
npm install
cd ..Root .env file:
# Create .env file in root directory
touch .envServer .env file:
# Create .env file in server directory
cd server
touch .env
cd ..Root .env:
# Add any root-level environment variables hereServer .env:
# MongoDB Connection String
MONGODB_CONNECTION_STRING_DEV=mongodb://localhost:27017/pc_builder_db
# JWT Secret (generate a strong secret)
JWT_SECRET=your_jwt_secret_here
# Server Port (optional, defaults to 5000)
PORT=5000
# CORS Origin (for development)
CORS_ORIGIN=http://localhost:3000# Start MongoDB service
mongod
# Or if using MongoDB as a service
sudo systemctl start mongodThe application will automatically create the database when it first connects. Make sure MongoDB is running before starting the application.
Terminal 1 - Start Backend Server:
cd server
npm run devTerminal 2 - Start Frontend Client:
cd client
npm startBuild the Frontend:
cd client
npm run build
cd ..Start Production Server:
cd server
npm start- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
AI-Powered-PC-Builder-and-Appointment-Scheduler/
βββ client/ # React frontend
β βββ public/ # Static files
β βββ src/
β β βββ modules/ # Feature modules
β β β βββ appointment/ # Appointment management
β β β βββ auth/ # Authentication
β β β βββ chatbot/ # AI chatbot
β β β βββ user/ # User management
β β βββ shared/ # Shared components & services
β β β βββ components/ # Reusable components
β β β βββ services/ # API services
β β β βββ config/ # Configuration
β β β βββ styles/ # Shared styles
β β βββ routes/ # Routing
β βββ package.json
βββ server/ # Node.js backend
β βββ controllers/ # Business logic
β βββ middleware/ # Custom middleware
β βββ models/ # Database models
β βββ routes/ # API routes
β βββ app.js # Express app setup
β βββ server.js # Server entry point
β βββ package.json
βββ python_services/ # Python services
βββ shared/ # Shared utilities
βββ README.md
-
Admin: Full access to all features
- Manage all appointments
- View all user details
- Confirm/cancel appointments
- Access admin dashboard
-
Regular User: Limited access
- Book personal appointments
- View own appointments
- Manage personal profile
- Access chatbot
The application creates default users on first run. You can modify these in the database or create new users through the registration system.
- Registration/Login: Create an account or log in
- Dashboard: View your appointments and profile
- Book Appointment: Use the calendar to select available time slots
- ChatBot: Get AI assistance for PC building
- Profile Management: Update your information and reset password
- Admin Dashboard: Access the admin panel
- Appointment Management: View and manage all appointments
- User Management: View user details and profiles
- Calendar Overview: See all appointments in calendar view
- Search & Filter: Find specific appointments or users
POST /api/v1/auth/register- User registrationPOST /api/v1/auth/login- User loginPOST /api/v1/auth/logout- User logout
GET /api/v1/appointments- Get all appointmentsPOST /api/v1/appointments- Create appointmentPUT /api/v1/appointments/:id- Update appointmentDELETE /api/v1/appointments/:id- Cancel appointmentGET /api/v1/appointments/confirmed- Get confirmed appointments
GET /api/v1/user/profile- Get user profilePUT /api/v1/user/profile/:id- Update user profileGET /api/v1/user/appointments/:email- Get user appointments
-
MongoDB Connection Failed
- Ensure MongoDB is running
- Check connection string in
.envfile - Verify MongoDB port (default: 27017)
-
Port Already in Use
- Change port in
.envfile - Kill existing processes using the port
- Use different ports for client and server
- Change port in
-
Module Not Found Errors
- Run
npm installin all directories - Clear node_modules and reinstall
- Check package.json for missing dependencies
- Run
-
CORS Errors
- Verify CORS_ORIGIN in server
.env - Ensure frontend URL matches CORS configuration
- Verify CORS_ORIGIN in server
- Use
npm run devfor development with auto-restart - Check browser console for frontend errors
- Monitor server logs for backend issues
- Use MongoDB Compass for database inspection