A comprehensive academic portal for students to access semester-wise study materials, manage events, and interact with the university system.
- Semester-wise Materials: Access notes, assignments, and resources for semesters 1-6
- Collective Materials Page: Browse all study materials organized by semester and subject
- Google Drive Integration: Automatic access to Drive folders upon signup
- Event Management: View upcoming college events and activities
- User Dashboard: Personalized dashboard with quick access to all resources
- Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
- User Management: Promote/demote users, activate/deactivate accounts
- Event Management: Create, edit, and manage college events
- Google Drive Management: Link Drive folders to semesters/subjects with dropdown selections
- Study Materials Upload: Upload and organize semester-wise study materials (server-based)
- Analytics Dashboard: View system statistics and recent activity logs
- Audit Logging: Track all administrative actions for security
- Automatic Access Granting: New users automatically get Drive folder permissions
- Frontend: HTML5, CSS3, JavaScript (ES6+)
- Backend: PHP 7.4+
- Database: MySQL 5.7+
- Server: XAMPP (Apache + MySQL)
- Cloud Integration: Google Drive API (via Service Account)
- Dependencies: Google API PHP Client (via Composer)
- XAMPP (or similar LAMP/WAMP stack)
- PHP 7.4 or higher
- MySQL 5.7 or higher
- Composer (for Google API dependencies)
- Google Cloud account (for Drive integration)
- Modern web browser (Chrome, Firefox, Safari, Edge)
```bash git clone cd brainbin-portal ```
```bash composer install ```
- Start XAMPP and ensure Apache and MySQL are running
- Open phpMyAdmin (http://localhost/phpmyadmin)
- Execute the SQL scripts in order: ``` scripts/01_create_database.sql scripts/02_seed_data.sql scripts/04_create_materials_table.sql scripts/05_create_drive_resources_table.sql ```
- Generate password hash: ```bash php hash_password.php ```
- Copy the generated hash
- Update
scripts/03_add_admin_user.sqlwith the hash - Execute the script in phpMyAdmin
Edit db_connect.php with your database credentials:
```php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "brainbin_data";
```
Follow the detailed guide in GOOGLE_DRIVE_SETUP.md to:
- Create Google Cloud project
- Enable Drive API
- Create service account
- Configure credentials
- Share Drive folders with service account
Quick Setup:
- Place service account JSON in
credentials/service-account.json - Set
GOOGLE_DRIVE_ENABLED = trueingoogle_drive_config.php - Share your Drive folders with the service account email
- Move the project folder to XAMPP's
htdocsdirectory - Access the portal at:
http://localhost/brainbin-portal/
- Username: 24DCS088
- Email: 24dcs088@charusat.edu.in
- Password: swayam088
- Username: admin
- Email: admin@brainbin.com
- Password: admin123
``` brainbin-portal/ βββ index.html # Landing page βββ login.html # Login page βββ signup.html # Registration page βββ dashboard.php # Student dashboard βββ materials.php # Collective materials page (NEW) βββ admin_dashboard.php # Admin dashboard βββ admin_manage_drive.php # Drive resources management (NEW) βββ manage_events.php # Event management βββ login.php # Login handler βββ singup.php # Registration handler (with Drive integration) βββ admin_actions.php # Admin operations handler βββ admin_drive_actions.php # Drive management handler (NEW) βββ get_drive_materials.php # API for fetching Drive resources (NEW) βββ google_drive_config.php # Google Drive API configuration (NEW) βββ db_connect.php # Database connection βββ logout.php # Logout handler βββ composer.json # PHP dependencies (NEW) βββ GOOGLE_DRIVE_SETUP.md # Drive setup guide (NEW) βββ credentials/ β βββ service-account.json # Google service account key (gitignored) βββ scripts/ β βββ 01_create_database.sql β βββ 02_seed_data.sql β βββ 03_add_admin_user.sql β βββ 04_create_materials_table.sql β βββ 05_create_drive_resources_table.sql (NEW) βββ first.html - sixth.html # Semester pages βββ *.css # Stylesheets βββ *.js # JavaScript files ```
How It Works:
- Admin adds Drive folder links via "Manage Drive" page
- Admin selects semester, subject, material type from dropdowns
- System stores folder IDs in database
- When new user signs up, system automatically grants them access to all folders
- Students see organized materials on "All Study Materials" page
Benefits:
- No manual sharing of folders with each student
- Centralized material management
- Automatic access provisioning
- Organized by semester and subject
- No storage limitations (uses Google Drive)
- Browse all semesters in one place
- Filter by specific semester
- Materials organized by subject
- Direct links to Google Drive folders
- Clean, card-based interface
- Secure password hashing using PHP's
password_hash() - Session management with timeout (30 minutes)
- Remember me functionality (7 days)
- Audit logging for all login attempts
- Automatic Drive access on signup
- Quick access to semester materials
- New "All Study Materials" card for collective page
- Upcoming events display
- FAQ section
- Responsive navigation
- Statistics Cards: Total users, admins, events
- Quick Actions: Fast access to common tasks including Drive management
- Drive Management: Add/remove Drive folder links with dropdown selections
- User Management:
- Search and filter users
- Promote/demote users
- Activate/deactivate accounts
- Delete users
- Study Materials Management: Upload semester-wise materials (server-based option)
- Analytics: Recent activity logs and user growth trends
- Event Management: Full CRUD operations for events
- SQL injection prevention using prepared statements
- XSS protection with
htmlspecialchars() - CSRF protection (session-based)
- Password strength requirements
- Audit logging for administrative actions
- Session timeout and management
- Service account credentials secured (gitignored)
- Drive API scopes limited to necessary permissions
The portal is fully responsive and optimized for:
- Desktop (1920px and above)
- Laptop (1024px - 1919px)
- Tablet (768px - 1023px)
- Mobile (320px - 767px)
Problem: Users not getting Drive access
- Check
drive_permissionstable for error messages - Verify service account email is shared with folders
- Check PHP error logs
Problem: "Service account file not found"
- Ensure
credentials/service-account.jsonexists - Verify path in
google_drive_config.php
Problem: API rate limits
- Google Drive API has 10,000 requests/day limit (free tier)
- Consider domain-wide sharing for large user bases
See GOOGLE_DRIVE_SETUP.md for detailed troubleshooting.
- Google Drive integration with automatic access
- Collective materials page
- Admin Drive management interface
- Real-time notifications system
- Advanced analytics with charts
- Email verification for new users
- Password reset functionality
- Discussion forums for each semester
- Assignment submission system
- Grade management system
- Batch permission granting for existing users
Project: Web Development Frameworks (ITUE203)
Institution: CHARUSAT - Faculty of Technology and Engineering
Semester: 3, 2025-26 (Odd)
Practical Coverage: 1-15 (Integrated)
This is an academic project. For suggestions or improvements:
- Contact the admin through the portal
- Submit feedback via the Contact Us page
This project is created for academic purposes as part of the Web Development Frameworks course at CHARUSAT University.
Swayam Patel
Student ID: 24DCS088
Email: 24dcs088@charusat.edu.in
For technical support or queries:
- Use the "Contact Us" page in the portal
- Email: admin@brainbin.com
- Visit the admin dashboard for system status
- Check
GOOGLE_DRIVE_SETUP.mdfor Drive integration help
Note: This portal supports both server-based file uploads and Google Drive integration. The Drive integration approach is recommended for larger deployments with many students and materials.