PLaNV

MySQL, Django, Typescript, TailwindCSS

PLaNV - Project Library and Novelty Validator


Table of Contents

  1. Description
  2. Features
  3. Tech Stack
  4. ER Diagram & Schema
  5. Quick Start Guide
  6. Authentication & User Roles
  7. Django Admin Panel Guide
  8. Development Setup
  9. SQL-Powered Features
  10. Project Structure
  11. Documentation

Description

Project Library and Novelty Validator is a centralized platform that stores and manages past student projects, including mini projects and capstone projects, allowing students to explore them for reference. The system integrates a novelty validation feature, where new project ideas are checked against the previous abstracts and descriptions using similarity detection algorithms. A novelty score is generated to highlight overlaps with existing work, helping students refine their proposals and ensuring originality.

Key Benefits

  • Centralized Repository: All past projects in one searchable database
  • Novelty Validation: AI-powered similarity detection prevents duplicate work
  • Reference Access: Students can explore past projects for inspiration
  • Streamlined Approval: Automated validation speeds up project review process
  • Innovation Encouragement: Helps students refine ideas to be more original

Features

Core Features

  • Project Management: Mini Projects and Capstone Projects with full lifecycle support
  • Department & Subject Organization: Structured academic hierarchy
  • Guide Management: Faculty profiles, contacts, and research papers
  • Team Collaboration: Multi-member project teams with role management
  • Rich Metadata: Comprehensive project details, abstracts, and documentation

Advanced Features

  • SQL-Powered Logic: All business logic in SQL (Functions, Procedures, Triggers)
  • Novelty Validation: Two-tier similarity checking system
    • Find Similar Projects: Research tool with adjustable thresholds
    • Validate Project Novelty: Official approval/rejection system
  • Advanced Search: Keyword-based search across titles and abstracts
  • Statistics Dashboard: Real-time project analytics and counts
  • Project Reference Browsing: Explore past projects by domain, year, department

Security & Administration

  • Authentication System: Token-based auth with role-based access control
  • User Management: Admin dashboard with color-coded role badges
  • Role-Based Permissions: Superuser, Faculty, and Students groups
  • Django Admin Panel: Comprehensive CRUD interface for all entities

Tech Stack

Layer Technology Version
Frontend Next.js 13.5.6
TypeScript Latest
React 18
TailwindCSS 3.3.5
Backend Django 4.2.7
Django REST Framework Latest
Token Authentication Built-in
Database MySQL 8.0+
SQL Functions 2
Stored Procedures 3
Triggers 2

ER Diagram & Schema

ER Diagram

ER Diagram

Relational Schema

Schema

Quick Start Guide

Prerequisites

  • Python 3.8+
  • Node.js 14+
  • MySQL 8.0+
  • npm or yarn
  • Git

Setup

# 1. Clone the repository
git clone <repository-url>
cd PLaNV

# 2. Backend Setup
cd backend
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -r requirements.txt
python manage.py migrate
python create_superuser.py  # Creates admin account
python manage.py runserver 0.0.0.0:8000

# 3. Frontend Setup (new terminal)
cd frontend
npm install
npm run dev

# 4. SQL Setup (new terminal)
cd PLaNV
./install_sql.sh  # Installs all SQL functions, procedures, triggers

Access Points


Authentication & User Roles

Role Permissions

Superuser (Administrator)

  • Full administrative access to all features
  • Can manage users and groups
  • Can add, edit, delete any data
  • Can access Django admin panel
  • Can manage system settings
  • Can delete departments

Faculty

  • Full CRUD access to Guide information
  • Can manage guide contacts and papers
  • View all projects (read-only)
  • View departments (read-only)
  • Access Django admin panel
  • Cannot delete departments
  • Cannot manage other users

Students

  • View all projects
  • Add new projects
  • Edit own projects
  • Add team members to projects
  • Cannot delete projects
  • Cannot edit other users' projects
  • Cannot manage guides

Django Admin Panel Guide

Access Information

Admin Panel Features

1. Projects Management

  • Project Details - Main project info with inline team member editing
  • Capstone Projects - Final year projects linked to guides
  • Mini Projects - Course projects linked to subjects
  • Team Members - Student team information
  • Project Similarity - Cached similarity scores

2. Academic Structure

  • Departments - University departments (CSE, ECE, etc.)
  • Subjects - Course subjects
  • Department-Subject Mapping - Subject assignments

3. Faculty & Guides

  • Guides - Faculty profiles with inline contacts and papers
  • Guide Contacts - Phone/email (inline editing)
  • Papers - Research publications (inline editing)

4. Users & Permissions

  • Django Users - Authentication users (staff/admin)
  • Groups - Role-based groups (Faculty, Students)
  • Permissions - Fine-grained access control

5. Content & Documentation

  • Links - External project links and papers
  • Blogs - Project blog entries
  • Posts - Project social media posts

Key Admin Features

Inline Editing - Edit related objects (contacts, papers, team members) within parent form Search & Filters - All list views have search and filter capabilities Collapsible Fieldsets - Better form organization Custom Display Columns - Team size, project count, paper count, etc. Role-Based Access - Permissions enforced at code level Color-Coded Badges - Visual role display in user management

Creating New Users

Via Django Admin Panel:

  1. Go to Authentication → Users
  2. Click Add User
  3. Enter username and password → Save
  4. Fill in email, first name, last name
  5. Add to group (Faculty or Students)
  6. Check "Staff status" for admin access
  7. Save

Via Frontend User Management:

  1. Go to http://localhost:3000/admin/users (login as admin)
  2. Click "Create User" button
  3. Fill in form and create
  4. Assign to group in Django admin panel

Demonstration Guide (For Evaluation)

Show Multiple User Roles:

  1. Login as admin → Show full access
  2. Login as faculty1 → Show guide management capabilities
  3. Login as student1 → Show limited project access

Demonstrate Permissions:

  • Faculty can add/edit guides
  • Faculty cannot delete departments
  • Students can add projects
  • Students cannot delete projects

Show GUI-Based CRUD:

  • Create: Add project with inline team members
  • Read: List view with search and filters
  • Update: Edit project with inline forms
  • Delete: Delete with confirmation (admin only)

Development Setup

Backend Setup

  1. Create virtual environment:

    cd backend
    python -m venv .venv
    source .venv/bin/activate  # Windows: .venv\Scripts\activate
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Configure database (edit backend/settings.py if needed):

    DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.mysql',
            'NAME': 'PLANV',
            'USER': 'root',
            'PASSWORD': 'your_password',
            'HOST': 'localhost',
            'PORT': '3306',
        }
    }
    
  4. Apply migrations:

    python manage.py migrate
    
  5. Create superuser:

    python create_superuser.py
    # Or manually: python manage.py createsuperuser
    
  6. Create staff users (optional):

    python create_staff_users.py
    
  7. Run development server:

    python manage.py runserver 0.0.0.0:8000
    

Frontend Setup

  1. Install dependencies:

    cd frontend
    npm install
    
  2. Create .env.local:

    NEXT_PUBLIC_API_URL=http://localhost:8000/api
    
  3. Run development server:

    npm run dev
    

SQL Setup

Install all SQL components:

./install_sql.sh

This installs:

  • 2 Functions: get_submission_count(), search_projects_by_keyword()
  • 3 Procedures: find_similar_projects(), validate_project_novelty(), add_new_project()
  • 2 Triggers: update_project_timestamp, prevent_duplicate_titles

Verify installation:

mysql -u root -p PLANV

-- Check functions
SHOW FUNCTION STATUS WHERE Db = 'PLANV';

-- Check procedures
SHOW PROCEDURE STATUS WHERE Db = 'PLANV';

-- Check triggers
SHOW TRIGGERS FROM PLANV;

SQL-Powered Features

All core business logic is implemented in SQL for optimal performance.

Functions

1. get_submission_count()

Counts projects with optional filters.

Parameters:

  • p_dept_id (INT) - Department filter
  • p_domain (VARCHAR) - Domain filter
  • p_year (INT) - Year filter
  • p_type (ENUM) - 'mini', 'capstone', or NULL for all

Usage:

-- All projects
SELECT get_submission_count(NULL, NULL, NULL, NULL);

-- AI projects in 2024
SELECT get_submission_count(NULL, 'AI', 2024, NULL);

-- Mini projects in CSE
SELECT get_submission_count(1, NULL, NULL, 'mini');

API Endpoint: GET /api/sql/submission-count/

2. search_projects_by_keyword()

Searches projects by keyword in title and abstract.

Parameters:

  • p_keyword (VARCHAR) - Search term

Returns: JSON string with matching projects

Usage:

SET @results = '';
CALL search_projects_by_keyword('machine learning', @results);
SELECT @results;

API Endpoint: POST /api/sql/search-keyword/

Procedures

1. find_similar_projects()

Research tool for finding similar projects.

Purpose: Exploration and discovery with adjustable threshold

Parameters:

  • p_title (VARCHAR) - Project title
  • p_abstract (TEXT) - Project abstract
  • p_min_similarity (DECIMAL) - Minimum similarity threshold (0.0-1.0)

Returns: JSON array of similar projects above threshold

Usage:

SET @similar = '';
CALL find_similar_projects(
    'Machine Learning Project',
    'AI-based classification system',
    0.3,
    @similar
);
SELECT @similar;

Frontend Page: /find-similar-projects

2. validate_project_novelty()

Official validation for project submissions.

Purpose: Approval/rejection decision with fixed rules

Parameters:

  • p_title (VARCHAR) - Project title
  • p_abstract (TEXT) - Project abstract
  • p_domain (VARCHAR) - Project domain

Returns: JSON with validation status, score, and message

Validation Tiers:

  • < 30%: APPROVED - Highly Novel
  • 30-50%: APPROVED - Moderately Novel
  • 50-70%: REVIEW REQUIRED
  • ≥ 70%: REJECTED - Too Similar

Usage:

SET @result = '';
CALL validate_project_novelty(
    'New ML Project',
    'Novel approach to classification',
    'AI',
    @result
);
SELECT @result;

Frontend Page: /validate-project-novelty

3. add_new_project()

Creates new project with automatic validation.

Parameters: Full project details including title, abstract, domain, year, etc.

Returns: Success/error message

Frontend Page: /projects/add-sql

Triggers

1. update_project_timestamp

Automatically updates last_modified timestamp on project updates.

Type: BEFORE UPDATE Table: projects_projectdetails

2. prevent_duplicate_titles

Prevents insertion of projects with duplicate titles.

Type: BEFORE INSERT Table: projects_projectdetails


Project Structure

PLaNV/
├── README.md                          # This comprehensive guide
├── SQL_DOCUMENTATION.md               # Complete SQL reference
├── ADMIN_PANEL_GUIDE.md               # Admin panel guide (now merged here)
├── QUICK_REFERENCE.md                 # Quick start guide (now merged here)
├── install_sql.sh                     # SQL installation script
├── create_staff_users.py              # Create demo users script
├── update_user_groups.py              # Update user groups script
│
├── backend/
│   ├── manage.py
│   ├── requirements.txt
│   ├── create_superuser.py
│   ├── create_staff_users.py
│   ├── backend/
│   │   ├── settings.py                # Django configuration
│   │   ├── urls.py                    # Main URL routing
│   │   └── middleware.py              # Custom middleware
│   └── projects/
│       ├── models.py                  # Django ORM models
│       ├── serializers.py             # REST serializers
│       ├── views.py                   # Main REST views
│       ├── sql_functions_views.py     # SQL-powered API views
│       ├── auth_views.py              # Authentication views
│       ├── admin.py                   # Django admin configuration
│       ├── urls.py                    # App URL routing
│       └── migrations/                # Database migrations
│
├── frontend/
│   ├── package.json
│   ├── tsconfig.json
│   ├── tailwind.config.js
│   └── src/
│       ├── components/
│       │   ├── Layout.tsx             # Main layout with navigation
│       │   └── ProjectList.tsx
│       ├── contexts/
│       │   └── AuthContext.tsx        # Auth state management
│       ├── lib/
│       │   └── api.ts                 # API client
│       ├── pages/
│       │   ├── _app.tsx               # App wrapper
│       │   ├── index.tsx              # Dashboard
│       │   ├── login.tsx              # Login page
│       │   ├── signup.tsx             # User registration
│       │   ├── change-password.tsx    # Password change
│       │   ├── statistics.tsx         # SQL-powered stats
│       │   ├── project-search.tsx     # SQL-powered search
│       │   ├── find-similar-projects.tsx    # Research tool
│       │   ├── validate-project-novelty.tsx # Approval tool
│       │   ├── admin/
│       │   │   └── users.tsx          # User management
│       │   └── projects/
│       │       ├── index.tsx          # All projects
│       │       ├── [id].tsx           # Project details
│       │       ├── new.tsx            # Add project (REST)
│       │       └── add-sql.tsx        # Add project (SQL)
│       ├── styles/
│       │   └── globals.css
│       └── types/
│           └── index.ts               # TypeScript types
│
└── sql/
    ├── functions_django.sql           # 2 SQL functions
    ├── procedures_django.sql          # 3 SQL procedures
    └── triggers_django.sql            # 2 SQL triggers

Documentation

  • README.md (this file) - Complete project documentation
  • SQL_DOCUMENTATION.md - Detailed SQL reference
  • ADMIN_PANEL_GUIDE.md - Merged into this README
  • QUICK_REFERENCE.md - Merged into this README

Architecture

┌────────────────────────────────────┐
│  Frontend (Next.js + TypeScript)   │
│  - React components                │
│  - Tailwind CSS styling            │
│  - Token authentication            │
│  - Color-coded role badges         │
└────────────────┬───────────────────┘
                 │ HTTP/JSON + Auth Token
                 ▼
┌────────────────────────────────────┐
│  Backend (Django + REST Framework) │
│  - Token authentication            │
│  - SQL procedure calls             │
│  - Minimal business logic          │
│  - Role-based permissions          │
└────────────────┬───────────────────┘
                 │ SQL Calls + Transactions
                 ▼
┌────────────────────────────────────┐
│  Database (MySQL - PLANV)          │
│  - 2 Functions (calculations)      │
│  - 3 Procedures (business logic)   │
│  - 2 Triggers (data integrity)     │
│  - 14 Tables (data storage)        │
│  - ALL core logic implemented here │
└────────────────────────────────────┘

Quick Demo Script

  1. Show User Roles:

  2. Show Django Admin:

  3. Show SQL Features:

    • Go to Statistics page → Shows get_submission_count()
    • Go to Project Search → Shows search_projects_by_keyword()
    • Go to Find Similar → Shows find_similar_projects()
    • Go to Validate Novelty → Shows validate_project_novelty()
  4. Show CRUD Operations:

    • Add project with inline team members
    • Search/filter project list
    • Edit project with inline forms
    • Try to delete as student (denied), then as admin (success)

Setup Scripts Reference

Create Superuser:

cd backend
python create_superuser.py

Create Staff Users & Groups:

cd backend
python create_staff_users.py

Update User Groups (if needed):

cd backend
python update_user_groups.py

Install SQL Components:

./install_sql.sh