Skip to content

iicnitdgp/IICNITDGP_Website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

226 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ IIC NIT Durgapur - Innovation and Incubation Cell

React Node.js MongoDB License

A comprehensive web application for the Innovation and Incubation Cell of National Institute of Technology, Durgapur. This platform serves as the central hub for innovation activities, events, team management, and student engagement within the institution.

πŸ“‹ Table of Contents

🌟 Features

🎯 Core Features

  • Modern User Interface - React 19 with responsive design
  • Authentication System - JWT-based secure authentication
  • Role-Based Access Control - Admin, User, and Guest roles
  • Event Management - Create, manage, and showcase events
  • Team Management - Display team members with dynamic data
  • Innovation Hub - Submit and manage innovation ideas
  • Image Gallery - Azure Blob Storage integration
  • Newsletter System - Email subscription and management
  • Search Functionality - Global search across all content
  • Mobile Responsive - Optimized for all device sizes

πŸ”’ Security Features

  • JWT Token Authentication
  • Password Hashing (bcrypt)
  • Protected Routes
  • CORS Configuration
  • Environment Variable Security
  • Input Validation

🎨 UI/UX Features

  • Modern Glass-morphism Design
  • Smooth Animations (Framer Motion)
  • Loading Skeletons
  • Toast Notifications
  • Modal System
  • Responsive Grid Layouts
  • Dark/Light Theme Support

πŸ› οΈ Technology Stack

Frontend

Technology Version Purpose
React 19.0.0 Core Framework
Vite 6.2.0 Build Tool
React Router 7.3.0 Navigation
Redux Toolkit 2.8.2 State Management
SCSS Latest Styling
Framer Motion 12.5.0 Animations
Material-UI 6.4.7 Component Library
React Hook Form 7.56.3 Form Management

Backend

Technology Version Purpose
Node.js Latest Runtime Environment
Express.js 5.1.0 Web Framework
MongoDB 8.14.2 Database
Mongoose 8.14.2 ODM
JWT 9.0.2 Authentication
bcryptjs 3.0.2 Password Hashing

Cloud Services

  • Azure Blob Storage - Image/File Storage
  • MongoDB Atlas - Database Hosting (Optional)
  • Vercel - Frontend Deployment
  • Render/Railway - Backend Deployment

πŸ“ Project Structure

IICNITDGP/
β”œβ”€β”€ πŸ“ client/                    # Frontend React Application
β”‚   β”œβ”€β”€ πŸ“ public/               # Static Assets
β”‚   β”‚   β”œβ”€β”€ πŸ“ assets/           # Images, Icons
β”‚   β”‚   └── πŸ“ data/             # JSON Data Files
β”‚   β”œβ”€β”€ πŸ“ src/
β”‚   β”‚   β”œβ”€β”€ πŸ“ components/       # Reusable Components
β”‚   β”‚   β”œβ”€β”€ πŸ“ pages/           # Page Components
β”‚   β”‚   β”œβ”€β”€ πŸ“ layouts/         # Layout Components
β”‚   β”‚   β”œβ”€β”€ πŸ“ services/        # API Services
β”‚   β”‚   β”œβ”€β”€ πŸ“ store/           # Redux Store
β”‚   β”‚   β”œβ”€β”€ πŸ“ routes/          # Route Configuration
β”‚   β”‚   └── πŸ“ config/          # Configuration Files
β”‚   β”œβ”€β”€ package.json
β”‚   └── vite.config.js
β”œβ”€β”€ πŸ“ server/                   # Backend Node.js Application
β”‚   β”œβ”€β”€ πŸ“ Controller/          # Route Controllers
β”‚   β”œβ”€β”€ πŸ“ model/               # MongoDB Models
β”‚   β”œβ”€β”€ πŸ“ Routes/              # API Routes
β”‚   β”œβ”€β”€ πŸ“ middleware/          # Custom Middleware
β”‚   β”œβ”€β”€ πŸ“ config/              # Database Configuration
β”‚   β”œβ”€β”€ πŸ“ utils/               # Utility Functions
β”‚   β”œβ”€β”€ package.json
β”‚   └── index.js                # Server Entry Point
β”œβ”€β”€ πŸ“„ README.md
β”œβ”€β”€ πŸ“„ ENVIRONMENT_SETUP.md      # Environment Configuration
β”œβ”€β”€ πŸ“„ AUTH_README.md            # Authentication Guide
└── πŸ“„ AZURE_SETUP.md            # Azure Configuration

⚑ Quick Start

Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn
  • MongoDB (Local or Atlas)
  • Git

1. Clone Repository

git clone https://github.com/sandipto729/IICNITDGP.git
cd IICNITDGP

2. Install Dependencies

# Install backend dependencies
cd server
npm install

# Install frontend dependencies
cd ../client
npm install

3. Environment Setup

# Server environment
cd server
cp .env.example .env
# Edit .env with your configuration

# Client environment
cd ../client
cp .env.example .env
# Edit .env with your configuration

4. Start Development Servers

# Terminal 1 - Backend Server
cd server
npm run dev

# Terminal 2 - Frontend Development Server
cd client
npm run dev

5. Access Application

πŸ”§ Installation

Detailed Installation Steps

1. System Requirements

# Check Node.js version
node --version  # Should be v18+

# Check npm version
npm --version   # Should be v8+

# Check Git
git --version

2. Database Setup

Option A: Local MongoDB

# Install MongoDB locally
# Start MongoDB service
mongod --dbpath /path/to/your/data

Option B: MongoDB Atlas

# Create account at https://cloud.mongodb.com
# Create cluster and get connection string
# Update MONGO_URI in .env file

3. Azure Blob Storage Setup (Optional)

# Create Azure Storage Account
# Get connection string and container name
# Update Azure configuration in .env

πŸ“§ Environment Configuration

Server Environment Variables (.env)

# Database
MONGO_URI=mongodb://localhost:27017/iic-nitdgp

# JWT Configuration
JWT_ACCESS_SECRET=your-super-secret-access-token-key
JWT_REFRESH_SECRET=your-super-secret-refresh-token-key
JWT_ACCESS_EXPIRES_IN=15m
JWT_REFRESH_EXPIRES_IN=7d

# Server Configuration
PORT=8000
NODE_ENV=development
FRONTEND_URL=http://localhost:5173

# Azure Blob Storage (Optional)
AZURE_STORAGE_CONNECTION_STRING=your-azure-connection-string
AZURE_CONTAINER_NAME=your-container-name

Client Environment Variables (.env)

# API Configuration
VITE_API_BASE_URL=http://localhost:8000/api

# Azure Configuration (Optional)
VITE_AZURE_STORAGE_ACCOUNT=your-storage-account
VITE_AZURE_CONTAINER=your-container-name

πŸ” Authentication System

User Roles

  • Admin: Full system access, user management, content management
  • User: Profile management, event participation, innovation submissions
  • Guest: Public content viewing

Authentication Flow

  1. Registration: Email verification and profile creation
  2. Login: JWT token generation
  3. Protected Routes: Token validation middleware
  4. Refresh Tokens: Automatic token renewal
  5. Logout: Token invalidation

API Endpoints

POST /api/auth/register     # User Registration
POST /api/auth/login        # User Login
POST /api/auth/refresh      # Token Refresh
POST /api/auth/logout       # User Logout
GET  /api/auth/profile      # Get User Profile
PUT  /api/auth/profile      # Update Profile

πŸ‘₯ User Management

User Model Schema

{
  name: String,
  email: String (unique),
  password: String (hashed),
  role: Enum ['admin', 'user'],
  designation: String,
  type: String,
  extra: {
    linkedin: String,
    github: String
  },
  isActive: Boolean,
  createdAt: Date,
  updatedAt: Date
}

Admin Features

  • User Management: View, edit, activate/deactivate users
  • Content Management: Manage events, innovations, gallery
  • Analytics: User statistics and engagement metrics
  • System Settings: Configuration and maintenance

🎨 Features Overview

🎭 Event Management

  • Event Creation: Rich text editor, image upload, scheduling
  • Event Categories: Workshops, seminars, competitions
  • Registration System: User registration with form validation
  • Event Display: Upcoming and past events with filtering
  • Modal System: Detailed event view with responsive design

πŸ’‘ Innovation Hub

  • Idea Submission: Submit innovative project ideas
  • Admin Review: Admin panel for reviewing submissions
  • Status Tracking: Track submission status and feedback
  • Gallery Integration: Showcase successful innovations

πŸ–ΌοΈ Gallery System

  • Azure Integration: Cloud-based image storage
  • Upload Management: Admin-controlled image uploads
  • Responsive Grid: Masonry layout with lightbox viewing
  • Image Optimization: Automatic compression and resizing

πŸ“§ Newsletter System

  • Subscription Management: Email collection and validation
  • Admin Dashboard: Subscriber management
  • Email Templates: Customizable newsletter templates

πŸ” Search Functionality

  • Global Search: Search across events, innovations, team members
  • Filter Options: Date, category, status filtering
  • Real-time Results: Instant search with debouncing

πŸ“± API Documentation

Authentication Endpoints

# Register new user
POST /api/auth/register
Content-Type: application/json
{
  "name": "John Doe",
  "email": "john@example.com",
  "password": "securePassword123"
}

# Login user
POST /api/auth/login
Content-Type: application/json
{
  "email": "john@example.com",
  "password": "securePassword123"
}

Event Endpoints

# Get all events
GET /api/events

# Get single event
GET /api/events/:id

# Create event (Admin only)
POST /api/events
Authorization: Bearer <token>

# Update event (Admin only)
PUT /api/events/:id
Authorization: Bearer <token>

# Delete event (Admin only)
DELETE /api/events/:id
Authorization: Bearer <token>

User Management Endpoints

# Get all users (Admin only)
GET /api/users
Authorization: Bearer <admin-token>

# Update user role (Admin only)
PUT /api/users/:id/role
Authorization: Bearer <admin-token>

# Activate/Deactivate user (Admin only)
PUT /api/users/:id/status
Authorization: Bearer <admin-token>

πŸš€ Deployment

Frontend Deployment (Vercel)

# Build for production
npm run build

# Deploy to Vercel
npx vercel --prod

# Environment Variables in Vercel
VITE_API_BASE_URL=https://your-backend-domain.com/api

Backend Deployment (Railway/Render)

# Deployment Configuration
PORT=8000
NODE_ENV=production
MONGO_URI=mongodb+srv://...
FRONTEND_URL=https://your-frontend-domain.com

# Build Script
npm start

Database Deployment

# MongoDB Atlas Setup
1. Create cluster
2. Configure network access
3. Create database user
4. Update connection string

🀝 Contributing

Development Workflow

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open Pull Request

Coding Standards

  • ESLint configuration for code quality
  • Prettier for code formatting
  • Conventional Commits for commit messages
  • Component-based architecture
  • SCSS Modules for styling

Testing

# Run frontend tests
cd client
npm run test

# Run backend tests
cd server
npm run test

# Run E2E tests
npm run test:e2e

πŸ“„ License

This project is licensed under the MIT License. See the LICENSE file for details.

πŸ™ Acknowledgments

  • NIT Durgapur - For providing the platform and support
  • Innovation and Incubation Cell - For the vision and requirements
  • Open Source Community - For the amazing tools and libraries
  • Contributors - For their valuable contributions

πŸ“ž Support

For support and queries:


Made with ❀️ by the IIC NIT Durgapur Team

NIT Durgapur β€’ GitHub Repository β€’ Live Demo

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6