Skip to content

adarsh747/CampusVerify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎓 CampusVerify

CampusVerify is a secure, role-based document verification and digital admit card generation portal designed for educational institutions. It streamlines the chaotic process of collecting student documents, verifying them, and issuing digitally signed admit cards by bridging the gap between Students, Batch Advisors, and College Administrators.

🚀 Live Demo

(Add your live deployment link here once hosted)


🛠 Tech Stack

Frontend (Client)

  • Framework: React.js (built with Vite)
  • Routing: React Router DOM
  • State Management: React Context API (AuthContext)
  • Styling: Custom CSS with a premium Dark Mode theme and CSS variables.
  • Icons & UI: lucide-react for iconography, react-hot-toast for notifications.

Backend (Server)

  • Runtime: Node.js
  • Framework: Express.js
  • Database: MongoDB (via Mongoose)
  • Authentication: JSON Web Tokens (JWT) & bcrypt for password hashing.
  • File Handling: multer (for memory storage during transit).
  • Cloud Storage: Supabase Storage Bucket (for highly secure, scalable file hosting).
  • PDF Processing: pdf-lib for reading, scaling, and manipulating PDF byte arrays.

⚙️ Core Engineering Features

1. Smart Roll-Number Auto-Assignment (assignAdvisor.js)

Instead of manual student-to-advisor mapping, the system uses a range-based algorithmic approach.

  • When a student registers, the backend queries the AdvisorMapping MongoDB collection using $lte (less than or equal) and $gte (greater than or equal) operators.
  • It instantly matches the student's unique Roll Number to the exact batch block (e.g., Roll 100–200) managed by a specific advisor, ensuring zero administrative overhead.

2. Automated PDF Signature Engine (pdfService.js)

Admit cards are digitally generated without manual editing.

  • When an advisor approves a student's blank admit card, the backend uses axios to download both the PDF and the Advisor's saved signature (PNG/JPG) as array buffers directly from Supabase.
  • Using pdf-lib, the engine dynamically calculates the aspect ratio of the signature, scales it proportionally to fit within a strict 150x60 unit bounding box, and stamps it precisely onto the bottom right corner of the document.
  • The finalized buffer is pushed back to the cloud as a verified, secure document.

👥 Role-Based Access & Flows

CampusVerify utilizes strict Role-Based Access Control (RBAC) via custom middleware, routing users to their respective dashboards based on their JWT token payload.

👨‍🎓 Students

  • Document Center: A dedicated hub to upload mandatory core documents (Aadhar, Marksheet, ID Card) and optional documents (Income/Caste Certificates).
  • Real-time Tracking: Students can see if their documents are Pending, Verified, or Rejected (with specific remarks from the advisor on what needs fixing).
  • Profile Overview: A dedicated page displaying their registration progress and the contact details of their automatically assigned advisor.
  • Digital Retrieval: Once all core documents pass verification, students upload a blank admit card and can securely download the finalized, digitally signed version.

👨‍🏫 Advisors

  • Signature Setup: Advisors can upload a transparent PNG/JPG of their signature, which is securely saved in the cloud.
  • Master Roster: A comprehensive table of all students assigned to their specific roll-number batch.
  • Review Pipeline: Advisors can view uploaded PDFs/Images directly in the browser. They can approve documents with one click or reject them by providing a mandatory feedback remark.

🛡️ Administrators

  • Central Analytics: A high-level overview of system health—tracking total students, fully verified profiles, pending reviews, and active staff.
  • Student Directory: A master view of all registered students, their assigned advisors, and their current verification status.
  • Staff Management: Admins can onboard new Advisors, generate their temporary passwords, and assign them specific Roll Number ranges, ensuring automated load-balancing of the student body.

📁 Project Structure

CampusVerify/
├── Backend/
│   ├── config/             # DB and Supabase configurations
│   ├── controllers/        # Core business logic (Auth, Admin, Advisor, Documents)
│   ├── middleware/         # JWT Auth, Role-checking, Multer uploaders
│   ├── models/             # Mongoose Schemas (User, Document, AdvisorMapping)
│   ├── routes/             # Express API route definitions
│   └── utils/              # Helper functions (pdfService.js, assignAdvisor.js)
│
└── Frontend/
    ├── public/             # Static assets, SVG illustrations
    └── src/
        ├── components/     # Reusable UI (Navbar, ProtectedRoutes)
        ├── context/        # React Context (AuthContext)
        ├── pages/          # Role-based Dashboards, Profile, & Auth views
        ├── services/       # Axios API interceptors
        └── App.css         # Global Dark Mode design system

💻 Local Development Setup

Prerequisites

Node.js (v16+)
MongoDB URI
Supabase Account (URL & Anon Key)

Installation

  1. Clone the repository:
git clone [https://github.com/yourusername/CampusVerify.git](https://github.com/yourusername/CampusVerify.git)
  1. Setup Backend:
cd Backend
npm install

Create a .env file in the Backend directory:


PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key
SUPABASE_URL=your_supabase_project_url
SUPABASE_ANON_KEY=your_supabase_anon_key

Start the server: npm run dev

  1. Setup Frontend:
cd ../Frontend
npm install

Start the Vite development server: npm run dev Designed & Developed for efficient, paperless educational administration.

Screenshots

Screenshot 2026-03-22 012346 Screenshot 2026-03-22 012425 Screenshot 2026-03-22 012535

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors