This project is a web-based smart campus solution designed for educational institutions, offering a range of modules to enhance campus life and administrative tasks.
Pondara Akhil Behara
B.Tech 3rd Year Student
Artificial Intelligence & Data Science Branch
Chaitanya Engineering College, Kommadi
The Smart Campus Bot is a comprehensive, secure multi-page web application that transforms campus services through an immersive Jarvis-inspired interface. Built entirely with vanilla HTML, CSS, and JavaScript, featuring enterprise-grade security, comprehensive testing, and modular architecture.
- Attendance tracking: Manage and track student attendance with CSV, PDF, and image file processing
- Book management system: AI-powered text summarization, expansion, and text-to-speech features
- Chatbot interface: Intelligent chatbot with expandable knowledge base and admin training interface
- Code explanation tools: Multi-language code analysis with syntax highlighting and execution simulation
- Lost and found system: Report and search for lost/found items with image upload support
- Quiz/exam management: Interactive quiz system with external API integration and custom question management
- File storage management: Personal cloud storage with IndexedDB-based file storage
- Study group coordination: Group creation, management, and real-time collaboration features
- HTML5: Semantic markup and modern web standards
- CSS3: Advanced styling with custom properties and animations
- Vanilla JavaScript (ES6+): Modern JavaScript without frameworks
- Web APIs: Speech, IndexedDB, Crypto, File, Canvas
- Node.js: JavaScript runtime environment
- Express.js: Web application framework
- MongoDB Atlas: Cloud database service
- JWT: JSON Web Tokens for authentication
- Bcrypt: Password hashing
- PBKDF2: Industry-standard password hashing
- AES-GCM: Symmetric encryption for sensitive data
- Web Crypto API: Browser-native cryptographic operations
- CORS Protection: Cross-origin resource sharing protection
- localStorage: User preferences and session data
- sessionStorage: Temporary application state
- IndexedDB: Large file storage and complex data
- MongoDB Atlas: Cloud database for user management
thinkring-project/
├── smart-campus-bot/ # Frontend application
│ ├── css/ # Stylesheets
│ │ ├── global.css # Global styles and variables
│ │ ├── animations.css # Animation definitions
│ │ ├── login.css # Login page styles
│ │ ├── dashboard.css # Dashboard styles
│ │ ├── admin.css # Admin panel styles
│ │ └── responsive.css # Responsive design rules
│ ├── js/ # Core JavaScript
│ │ ├── utils.js # Utility functions
│ │ ├── crypto-utils.js # Security and encryption
│ │ ├── data.js # Data management (legacy localStorage)
│ │ ├── data-service.js # Data service (MongoDB API)
│ │ ├── global.js # Global functionality
│ │ ├── login.js # Login handling
│ │ ├── dashboard.js # Dashboard logic
│ │ ├── admin.js # Admin panel logic
│ │ ├── module-loader.js # Dynamic module loading
│ │ ├── test-framework.js # Testing framework
│ │ └── modules/ # Modular components
│ │ ├── voice-commands.js
│ │ ├── session-management.js
│ │ ├── notification-system.js
│ │ └── form-validation.js
│ ├── modules/ # Feature modules
│ │ ├── attendance/ # Attendance tracking system
│ │ ├── book/ # AI-powered book tools
│ │ ├── chatbot/ # Intelligent chatbot
│ │ ├── code-explainer/# Code analysis tools
│ │ ├── lost-found/ # Lost and found system
│ │ ├── quiz/ # Interactive quiz system
│ │ ├── storage/ # Personal cloud storage
│ │ └── study-groups/ # Study group coordination
│ ├── tests/ # Test suites
│ │ ├── utils.test.js
│ │ ├── crypto-utils.test.js
│ │ └── data.test.js
│ ├── index.html # Login page
│ ├── dashboard.html # Student dashboard
│ ├── admin.html # Admin panel
│ ├── test-runner.html # Test execution interface
│ └── ... # Other frontend files
├── backend/ # Backend API (Node.js + MongoDB)
│ ├── config/ # Database configuration
│ ├── models/ # Data models
│ ├── controllers/ # Request handlers
│ ├── routes/ # API routes
│ ├── middleware/ # Authentication middleware
│ ├── package.json # Node.js dependencies
│ ├── server.js # Main server file
│ └── README.md # Backend documentation
└── README.md # This file
This project now includes MongoDB integration through a backend API. For detailed instructions on setting up and using the MongoDB integration, please see MONGODB_INTEGRATION.md.
- Centralized user management: All user data stored in MongoDB Atlas
- Persistent data storage: Data persists across sessions and devices
- Improved security: Proper authentication with JWT tokens
- Better scalability: Cloud-based database solution
- Role-based access control: Different permissions for students and admins
On first run, the backend will automatically create these default users:
-
Student User
- Username:
student
- Password:
password123
- Role:
student
- Username:
-
Admin User
- Username:
KAB
- Password:
7013432177@akhil
- Role:
admin
- Username:
-
Test User
- Username:
testuser
- Password:
password
- Role:
student
- Status:
suspended
- Username:
-
Navigate to the frontend directory:
cd smart-campus-bot
-
Start a local web server:
# Using Python python -m http.server 8000 # Using Node.js (if http-server is installed) npx http-server # Using PHP php -S localhost:8000
-
Open your browser to
http://localhost:8000
-
Navigate to the backend directory:
cd backend
-
Install dependencies:
npm install
-
Start the server:
npm start
-
For development with auto-restart:
npm run dev
The backend API provides the following endpoints:
POST /api/auth/login
- User loginPOST /api/auth/change-password
- Change user password
GET /api/users
- Get all users (admin only)POST /api/users
- Create new user (admin only)
GET /api/health
- Server health status
- Password Hashing: All passwords are securely hashed using bcrypt
- JWT Authentication: Secure token-based authentication
- Role-Based Access: Different permissions for students and admins
- Input Validation: All inputs are validated and sanitized
- CORS Protection: Cross-origin resource sharing protection
- API Key Encryption: AES-GCM encryption for sensitive data
- Enterprise-Grade Password Hashing: PBKDF2 with Web Crypto API
- Secure Session Management: Automatic timeout and activity monitoring
-
Open Test Runner
- Navigate to
test-runner.html
in your browser - Or visit
http://localhost:8000/test-runner.html
- Navigate to
-
Execute Tests
- Click "Run All Tests" for comprehensive testing
- Use individual test buttons for specific modules
- View detailed results and coverage reports
- Security Functions: 95% coverage
- Utility Functions: 90% coverage
- Data Management: 88% coverage
- Form Validation: 92% coverage
- Host the static files on any web server
- Ensure proper CORS configuration if using backend API
- Deploy to any Node.js hosting platform (Render, Heroku, Vercel, etc.)
- Set environment variables in the hosting platform
- Ensure MongoDB Atlas is accessible from the hosting platform
This project is licensed under the MIT License.