A modern, feature-rich platform for browsing and downloading Previous Year Question Papers (PYQs), syllabi, and academic resources for DSMNRU students.
π Table of Contents (Click to expand)
- π Features
- π Project Structure
- π Quick Start
- π‘ Data & Firebase
- π€ Student Upload System
- π¨βπΌ Admin Features
- π¨ Styling & Theme
- π Firestore Security Rules
- π± Progressive Web App (PWA)
- π SEO
- π οΈ Development Workflow
- π¨ Common Issues & Fixes
- π― Future Enhancements
- π‘ Tips for Best Results
- οΏ½ User Authentication - Secure sign-up and login with email/password and Google.
- π€ User Profiles - Manage your name, course, and phone number.
- π Browse PYQs - Search, filter, and download academic materials.
- Bookmarks - Save your favorite papers for quick access
- π Smart Search - Find papers by course, year, and semester
- π PDF Viewer - Preview papers inline
- π€ Share Documents - Easy sharing via social media & links
- π€ Upload Papers - Contribute your own question papers and notes
- οΈ Student Tools - A suite of utilities to help with academics:
- SGPA Calculator: Calculate semester GPA with subject-wise grades.
- Study Planner: Plan and track your study schedule.
- Attendance Tracker: Monitor attendance records.
- π Feedback System - Report broken links or request missing PYQs.
- π Progressive Web App (PWA) - Installable with offline access to cached content.
- π¬ Live Chat - Get real-time support.
- π Secure Admin Login - Role-based access control for the admin panel.
- β Add/Edit/Delete Content - Manage PYQs and Syllabus easily
- π₯ User Submissions - Review and approve student-uploaded content
- π Lazy Loading UI - Fast admin panel with on-demand data loading
- ποΈ Collapsible Sections - Organize with accordion interface
- π Pending Uploads - Queue system for student submissions
- πΊοΈ Sitemap Generation - Auto-generate sitemaps for SEO
Click to view folder structure
.
βββ index.html # Public homepage & student UI
βββ admin.html # Admin dashboard (Firebase auth required)
βββ script.js # Frontend logic (auth, data loading, search, tools, uploads)
βββ admin.js # Admin functions (auth, CRUD, lazy loading, submissions)
βββ styles.css # Dark theme styling
βββ sw.js # Service worker (offline support)
βββ manifest.json # PWA manifest
βββ offline.html # Offline fallback page
βββ robots.txt # SEO crawler configuration
βββ sitemap.xml # SEO sitemap
βββ cors.json # CORS configuration
βββ img/ # Images and assets
Open directly in browser (works out of box):
# Just open in browser
open index.html
# or admin.html for admin panelOr run a local static server:
Python:
python -m http.server 8000
# Visit: http://localhost:8000Node:
npx serve .
# Visit: http://localhost:3000pyqs: Stores Previous Year Question Papers.- Fields:
title,file(Server 1 URL),file2(Server 2 URL),course,semester,session,branch.
- Fields:
users: Stores registered user profiles.- Fields:
uid,email,name,course,phone,role,createdAt.
- Fields:
contributors: Manages the list of content contributors.- Fields:
name,avatar,role.
- Fields:
pendingUploads: A queue for student-submitted files awaiting admin review.- Fields:
title,downloadUrl,studentName,course,semester,fileName,uploadedAt,status.
- Fields:
feedback: Collects user feedback, including broken link reports and PYQ requests.- Fields:
type,title,details,status,createdAt.
- Fields:
dsmnruBookmarks: Saved paper URLs.dsmnruStudyPlanner: Study schedule tasks.dsmnruAttendance: Attendance records for subjects.dsmnruCgpaLast: Last CGPA calculation result.profileCompletionDismissed: Timestamp for dismissing the profile completion reminder.dashboardTheme,dashboardLayout: Admin dashboard UI preferences.
- Access Upload Form: Navigate to the "Help us grow the collection" section on the homepage.
- Fill Form:
- Your Name (required)
- Title (e.g., "Effective Technical Communication")
- Course, Semester
- Select Files: Choose a single PDF or multiple images (JPG, PNG).
- Submit: Images are automatically converted into a single, optimized PDF. The final PDF is uploaded to a temporary file-hosting service.
- Confirmation: A success message confirms the submission is sent for admin review.
- The final PDF (either uploaded directly or converted from images) is sent to gofile.io, a free and CORS-enabled file hosting service.
- The file's metadata and its
downloadUrlare saved to thependingUploadscollection in Firestore. - The admin reviews the submission in the dashboard's "Review Queue".
- The admin can download the file, verify its quality, and add it to the main
pyqscollection. - The student's name is credited for their contribution.
β
Zero Firebase Storage Cost: Avoids using Firebase Storage quotas.
β
Flexible Uploads: Supports both direct PDF and image-to-PDF conversion.
β
Quality Control: All submissions are reviewed by an admin before being published.
β
Student Crediting: The contributor's name is recorded with each submission.
β
Clean Workflow: A dedicated queue keeps submissions organized for the admin.
- Go to
admin.html. - Sign in with the designated admin email and password. Non-admin accounts are automatically logged out.
- The dashboard loads with live stats and collapsible management sections.
Add New PYQ:
- Use the "Quick Create" form to add a new PYQ.
- The title is auto-generated from course, semester, subject, and session fields to ensure consistency.
- Provide up to two server URLs for the file.
Bulk Import:
- Upload a CSV file to add or update records in the
pyqsorcontributorscollections. - If a row has an
id, the corresponding document is updated; otherwise, a new document is created.
Edit & Delete:
- Expand the "Content Library" to view all PYQs.
- Click "Edit" or "Delete" on any item to manage it.
Workflow:
- Expand the "Review Queue" section in the admin panel.
- New submissions appear with the student's name, file details, and a download link.
- Click "Download" to get the file.
- After verifying, manually add it to the library using the "Quick Create" form.
- Click "Delete" to remove the submission from the queue.
The project features a modern, glassmorphism-inspired dark theme.
CSS Variables defined in styles.css for easy customization:
--color-primary: The main accent color (teal).--color-background: The main page background.--color-surface: The background for cards and modals.--color-text: The primary text color.
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Helper: Check if user is admin
function isAdminByEmail() {
return request.auth != null && request.auth.token.email == "kush210431@gmail.com";
}
// Public collections are world-readable, admin-writable.
match /pyqs/{docId} {
allow read: if true;
allow write: if isAdminByEmail();
}
match /contributors/{docId} {
allow read: if true;
allow write: if isAdminByEmail();
}
// Users can read/write their own data. Admins have full access.
match /users/{userId} {
allow read, update: if request.auth.uid == userId || isAdminByEmail();
allow create: if request.auth.uid == userId;
allow delete: if isAdminByEmail();
}
// Anyone can submit to pendingUploads and feedback. Only admins can read/delete.
match /pendingUploads/{docId} {
allow read: if isAdminByEmail();
allow create: if request.resource.data.title is string
&& request.resource.data.studentName is string
&& request.resource.data.downloadUrl is string;
allow delete: if isAdminByEmail();
}
match /feedback/{docId} {
allow read, update: if isAdminByEmail();
allow create: if request.resource.data.type is string;
allow delete: if isAdminByEmail();
}
// Deny all other access
match /{document=**} {
allow read: if false;
allow write: if false;
}
}
}The site works offline with service worker support:
sw.js- Caches assets for offline accessmanifest.json- PWA metadataoffline.html- Fallback offline page
To install:
- On a supported browser (like Chrome on desktop or mobile), an "Install" button will appear in the address bar.
- Once installed, the app can be launched from the home screen or app drawer.
- Cached content remains available even when offline.
- Auto-generated
sitemap.xmlfrom admin panel - SEO metadata in
index.html(title, description, OG tags) - Structured data (JSON-LD) for rich search results
robots.txtfor search engine crawling
- Frontend: Update
index.htmlwith new UI - Logic: Add JavaScript to
script.js - Styling: Add CSS to
styles.css - Admin: If needed, update
admin.htmlandadmin.js - Test: Run local server and verify
- Data loads from Firestore at runtime
- Use
db.collection('collectionName').get()to fetch - Save with
add(),set(),delete()methods - Update UI after data changes
Solution: Ensure the Firebase config is correct in admin.html and the email is hardcoded as the admin email in admin.js.
Solution: Clear browser cache (Ctrl+Shift+Delete) and refresh
Solution: Check that Firestore rules allow create operations on the pendingUploads collection.
Solution: Service worker needs HTTPS in production (works on localhost)
Solution: Check CORS configuration and Firestore security rules for pendingUploads
- Create Firebase project
- Enable Firestore Database
- Copy config to
script.js,admin.js,admin.html - Create initial collections:
pyqs,users,contributors,pendingUploads,feedback. - Create an admin user account in Firebase Authentication.
- Apply security rules from above
- Deploy or run locally
Firebase Config Location:
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_AUTH_DOMAIN",
projectId: "YOUR_PROJECT_ID",
storageBucket: "YOUR_STORAGE_BUCKET",
messagingSenderId: "YOUR_SENDER_ID",
appId: "YOUR_APP_ID",
measurementId: "YOUR_MEASUREMENT_ID"
};This project is built for DSMNRU students and contributors.
The heroes who made this archive possible! See homepage "Contributors" section. Thank you to all students who have contributed PYQs and resources!
- π¬ Live Chat: Click the chat button on the site for instant support.
- π Feedback Forms: Use the "Report Broken Link" or "Request PYQ" modals on the site.
- Rating & reviews for papers
- Paper difficulty levels
- Discussion forums
- Mobile app (React Native)
- Multiple language support
- Analytics dashboard for admins
- Email notifications for new uploads
- Advanced filtering by exam type
- Solution uploads alongside questions
For Students:
- Use the SGPA calculator to track your academic performance.
- Bookmark important papers for quick access before exams.
- Use the study planner to organize your preparation schedule.
- Contribute high-quality notes and papers to help the community.
- Share useful resources with classmates using the share feature.
For Admins:
- Review submissions regularly to keep the platform up-to-date.
- Organize PDFs logically in your cloud storage before linking them.
- Use consistent naming conventions for files and titles.
- Clear the pending queue after processing uploads.
Built with β€οΈ for DSMNRU Students π