PLaNV
MySQL, Django, Typescript, TailwindCSS
PLaNV - Project Library and Novelty Validator
Table of Contents
- Description
- Features
- Tech Stack
- ER Diagram & Schema
- Quick Start Guide
- Authentication & User Roles
- Django Admin Panel Guide
- Development Setup
- SQL-Powered Features
- Project Structure
- 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
Relational 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
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000/api/
- Django Admin: http://localhost:8000/admin/
- User Management: http://localhost:3000/admin/users
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
- Django Admin Panel: http://localhost:8000/admin/
- User Management Page: http://localhost:3000/admin/users
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:
- Go to Authentication → Users
- Click Add User
- Enter username and password → Save
- Fill in email, first name, last name
- Add to group (Faculty or Students)
- Check "Staff status" for admin access
- Save
Via Frontend User Management:
- Go to http://localhost:3000/admin/users (login as admin)
- Click "Create User" button
- Fill in form and create
- Assign to group in Django admin panel
Demonstration Guide (For Evaluation)
Show Multiple User Roles:
- Login as admin → Show full access
- Login as faculty1 → Show guide management capabilities
- 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
Create virtual environment:
cd backend python -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activateInstall dependencies:
pip install -r requirements.txtConfigure database (edit
backend/settings.pyif needed):DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'PLANV', 'USER': 'root', 'PASSWORD': 'your_password', 'HOST': 'localhost', 'PORT': '3306', } }Apply migrations:
python manage.py migrateCreate superuser:
python create_superuser.py # Or manually: python manage.py createsuperuserCreate staff users (optional):
python create_staff_users.pyRun development server:
python manage.py runserver 0.0.0.0:8000
Frontend Setup
Install dependencies:
cd frontend npm installCreate
.env.local:NEXT_PUBLIC_API_URL=http://localhost:8000/apiRun 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 filterp_domain(VARCHAR) - Domain filterp_year(INT) - Year filterp_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 titlep_abstract(TEXT) - Project abstractp_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 titlep_abstract(TEXT) - Project abstractp_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
Show User Roles:
- Go to http://localhost:3000/admin/users
- Show color-coded badges (Purple/Green/Cyan)
- Login as different users, show different menu options
Show Django Admin:
- Go to http://localhost:8000/admin/
- Navigate through 14 model sections
- Show inline editing (contacts, papers, team members)
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()
- Go to Statistics page → Shows
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