Skip to content

shshahank/InternCred

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

InternCred - Internship Credit Management System

A full-stack web application for managing student internship credits with automated approval workflows.

๐Ÿš€ Features

Student Features

  • Register and login
  • Add internship applications
  • Track internship status (Pending/Approved/Rejected)
  • View total credits earned
  • Manage profile

Admin Features

  • Review and approve/reject internship applications
  • View all student records
  • Manually adjust student credits with audit trail
  • Generate reports (students with low credits, top organizations)
  • Export data to CSV/PDF
  • Dashboard with statistics

๐Ÿ› ๏ธ Tech Stack

Backend

  • Node.js & Express.js
  • MongoDB & Mongoose
  • JWT Authentication
  • Nodemailer (Email notifications)
  • Express Validator
  • CSV & PDF export

Frontend

  • React.js
  • React Router
  • Tailwind CSS
  • Axios
  • React Hot Toast
  • Lucide React Icons

๐Ÿ“‹ Prerequisites

  • Node.js (v14 or higher)
  • MongoDB (local or cloud instance)
  • npm or yarn

๐Ÿ”ง Installation & Setup

1. Clone the repository

cd InternCred

2. Backend Setup

cd Backend

# Install dependencies
npm install

# Create .env file
cp .env.example .env

# Edit .env and add your configuration:
# - MongoDB connection string
# - JWT secret
# - SMTP credentials for email
# - Other environment variables

# Start the backend server
npm run dev

Backend will run on http://localhost:5000

3. Frontend Setup

cd Frontend

# Install dependencies
npm install

# Start the development server
npm run dev

Frontend will run on http://localhost:5173

๐Ÿ—„๏ธ Database Setup

Create Initial Data

You need to create at least one department and one admin user in MongoDB:

// Department
{
  deptID: "DEPT001",
  name: "Computer Science"
}

// Contact for Admin
{
  number: "1234567890",
  email: "admin@university.edu"
}

// Admin (password will be hashed automatically)
{
  adminID: "ADMIN001",
  name: "Admin Name",
  password: "admin123", // Will be hashed
  department: ObjectId("department_id"),
  contact: ObjectId("contact_id")
}

๐Ÿ“ง Email Configuration

For email notifications (rejection/approval), configure SMTP in .env:

SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASS=your_app_password

Note: For Gmail, you need to use an App Password, not your regular password.

๐Ÿ”‘ Environment Variables

Backend (.env)

MONGO_URI=mongodb://localhost:27017/interncred
PORT=5000
JWT_SECRET=your_jwt_secret_key_here
MAX_CREDITS=20

SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASS=your_email_password

FRONTEND_URL=http://localhost:5173

Frontend (.env)

VITE_API_URL=http://localhost:5000/api

๐Ÿ“ฑ Usage

Student Workflow

  1. Register with roll number, registration number, and other details
  2. Login with roll number or registration number
  3. Add internship (can create new organization or select existing)
  4. Wait for admin approval
  5. Check dashboard for credits and status updates

Admin Workflow

  1. Login with admin ID
  2. View pending internship requests
  3. Approve or reject with reason
  4. View all students and their records
  5. Manually adjust credits if needed
  6. Generate and export reports

๐Ÿงฎ Credit Calculation

  • Credits are awarded based on internship duration
  • Formula: (months / 6) ร— maxCredits
  • Maximum credits: 20 (configurable)
  • Only approved internships count toward total credits
  • 6 months of internship = full credits

๐Ÿ”’ Security Features

  • JWT-based authentication
  • Password hashing with bcrypt
  • Role-based access control (Student/Admin)
  • Input validation
  • XSS protection

๐Ÿ“Š API Endpoints

Authentication

  • POST /api/auth/student/register - Register student
  • POST /api/auth/student/login - Student login
  • POST /api/auth/admin/login - Admin login
  • GET /api/auth/profile - Get user profile

Internships

  • POST /api/internships - Create internship
  • GET /api/internships/my-internships - Get student's internships
  • GET /api/internships/pending - Get pending internships (Admin)
  • PUT /api/internships/:id - Update internship

Admin

  • POST /api/admin/internships/:id/approve - Approve internship
  • POST /api/admin/internships/:id/reject - Reject internship
  • GET /api/admin/students - Get all students
  • POST /api/admin/students/:id/adjust-credits - Adjust credits

Reports

  • GET /api/reports/students-lacking?min=3 - Students below threshold
  • GET /api/reports/top-organizations - Top organizations
  • GET /api/reports/dashboard-stats - Dashboard statistics

Export

  • GET /api/export/students.csv - Export students as CSV
  • GET /api/export/internships.csv - Export internships as CSV
  • GET /api/export/student/:id.pdf - Export student report as PDF

๐ŸŽจ UI Components

  • Cards, Badges, Tables
  • Forms with validation
  • Modal dialogs
  • Loading states
  • Toast notifications
  • Responsive design

๐Ÿ› Troubleshooting

MongoDB Connection Error

  • Ensure MongoDB is running
  • Check connection string in .env

CORS Error

  • Verify FRONTEND_URL in backend .env
  • Check API_URL in frontend .env

Email Not Sending

  • Verify SMTP credentials
  • For Gmail, use App Password
  • Check firewall/antivirus settings

๐Ÿ“ License

MIT

๐Ÿ‘จโ€๐Ÿ’ป Developer

Om Gholap


Note: This is a development setup. For production, use environment-specific configurations, enable HTTPS, and implement additional security measures.

About

Internship Credit Management System

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 98.9%
  • Other 1.1%