Skip to content

A full-stack web application designed to streamline student leave management. Students can apply for leaves, and teachers or admins can efficiently review, approve, or reject these requests.

Notifications You must be signed in to change notification settings

tejaswinirao11/CampusLeave

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

🏫 Student Leave Management System

A full-stack web app where students can apply for leave, and teachers/admins can view, accept or reject requests. Built using the MERN stack with a modern, clean UI powered by TailwindCSS + Vite + TypeScript.


🚀 Features

  • 👤 Role-based Auth (Student & Teacher)
  • 📝 Leave Application by Students
  • 📋 Admin Panel for Teachers to View & Manage Requests
  • ✅ Accept / ❌ Reject Leave Requests
  • 🔐 JWT-based Protected Routes
  • 💻 Fully Responsive & Clean UI

🧰 Tech Stack

Technology Badge Purpose
React React UI development
TypeScript TypeScript Static typing for scalability
Tailwind CSS Tailwind Utility-first styling
Framer Motion Framer Motion Smooth animations and transitions
React Router React Router Client-side routing
Node.js Node.js Backend runtime
Express.js Express Backend routing and logic
MongoDB MongoDB NoSQL Database
JWT JWT Secure authentication
Vite Vite Lightning fast frontend bundler


🛠️ Installation & Setup

📦 Clone the Repository

git clone https://github.com/Hari-hara7/CampusLeave.git

📦 Backend Setup

cd backend
npm install
# Create a .env file and add the following:
# MONGO_URI=your_mongodb_connection_string
# JWT_SECRET=your_jwt_secret_key
# PORT=5000
npm run dev

🚀 Leave Management System

💻 Frontend Setup

cd frontend/app
npm install
npm run dev

🛠️ Project Setup

🔐 Environment Variables

Create a .env file inside the backend folder with the following values:

MONGO_URI=your_mongo_connection_string
JWT_SECRET=your_jwt_secret_key
PORT=5000

📡 API Endpoints

🔐 Auth

Method Endpoint Description
POST /api/auth/register Register as Student or Teacher
POST /api/auth/login Login and receive JWT token

📄 Leaves

Method Endpoint Description
POST /api/leaves/apply Apply for leave (Student only)
GET /api/leaves/mystatus Get student's own leave status
GET /api/leaves Get all leave requests (Teacher only)
PATCH /api/leaves/:id/status Accept or Reject leave request (Teacher)

About

A full-stack web application designed to streamline student leave management. Students can apply for leaves, and teachers or admins can efficiently review, approve, or reject these requests.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 74.8%
  • JavaScript 21.6%
  • CSS 2.3%
  • HTML 1.3%