Skip to content

SACHIN-P45/Compilant_Management_System_Springboot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎓 Student Complaint & Resolution System - Spring Boot Edition

A comprehensive full-stack complaint management system built with Spring Boot backend, React frontend, and MongoDB database, featuring OAuth2 integration and Discord Bot notifications.

🌟 Enhanced Features (Latest Update)

New UI/UX Enhancements

1️⃣ Home/Landing Page

  • Modern hero section with gradient backgrounds
  • Feature showcase grid with 6 key features
  • Interactive "How It Works" timeline
  • Live statistics dashboard
  • Category cards for quick navigation
  • Dual CTA buttons (Student Login & Admin Login)

2️⃣ Student Authentication System

  • Student Login: Simple email + Student ID authentication
  • Pre-fills complaint forms with student information
  • Persistent login state via localStorage
  • Redirects to personalized dashboard

3️⃣ Admin Authentication & Role Separation

  • Admin Login: Username/password authentication (default: admin/admin123)
  • Role-based access control
  • Comparison table showing Student vs Admin capabilities
  • Dedicated admin navigation menu

4️⃣ Raise Complaint Page (Enhanced)

  • Pre-filled student information (name, email, ID)
  • Real-time character counter for description field
  • Category selection with icons
  • "What Happens Next" section explaining the process
  • Form validation with helpful error messages

5️⃣ My Complaints Dashboard

  • Filter tabs: All, Pending, In Progress, Resolved
  • Visual complaint cards with status badges
  • Stats overview (total complaints by status)
  • Quick actions: View details, raise new complaint
  • Empty state with helpful guidance

6️⃣ Enhanced Admin Dashboard

  • Authentication protection (admin-only access)
  • Comprehensive complaint table with student details
  • Inline status updates with "View Details" links
  • Responsive filters (status, category)
  • Real-time statistics

7️⃣ Complaint Detail Page with Timeline

  • Full complaint information display
  • Interactive timeline showing status progression
  • Status-based visual indicators
  • Sidebar with student info and quick actions
  • Breadcrumb navigation
  • Responsive two-column layout

8️⃣ Track Complaint Page

  • Public page to track complaint by ID
  • No authentication required
  • Quick status lookup

🏗️ System Architecture

Enterprise Architecture

┌─────────────────┐      ┌─────────────────┐      ┌─────────────────┐
│  React Frontend │─────▶│ Spring Boot API │─────▶│    MongoDB      │
│   (Port 3000)   │◀─────│  (Port 8080)    │◀─────│   Database      │
└─────────────────┘      └─────────────────┘      └─────────────────┘
                                │
                                │ REST API
                                ▼
                    ┌─────────────────────┐
                    │   Discord Bot       │
                    │  Notifications      │ 
                    │   (Optional)        │
                    └─────────────────────┘
                                │
                                │ HTTP
                                ▼
                    ┌─────────────────────┐
                    │  Discord Bot (JDA)  │
                    │   Spring Boot App   │
                    │    (Port 3000)      │
                    └─────────────────────┘
                                │
                                ▼
                         Discord Channel

Technology Stack

Component Technology Version
Frontend React + Vite 18.x
Backend API Node.js + Express 20.x
Database MongoDB + Mongoose 7.x
Notification Service Spring Boot 3.1.5
Discord Bot JDA (Java Discord API) 5.0.0
Java Runtime Java 17
Routing React Router 6.x

📂 Project Structure

complaint_management_system_new/
├── backend-springboot/          # 🚀 Spring Boot REST API
│   ├── src/main/java/com/complaints/
│   │   ├── ComplaintManagementSystemApplication.java
│   │   ├── config/             # Configuration classes
│   │   ├── controller/         # REST controllers
│   │   ├── dto/               # Data Transfer Objects
│   │   ├── entity/            # MongoDB entities
│   │   ├── repository/        # Data access layer
│   │   ├── security/          # JWT & OAuth security
│   │   └── service/           # Business logic
│   ├── src/main/resources/
│   │   └── application.properties
│   ├── pom.xml                # Maven dependencies
│   ├── mvnw.cmd              # Maven wrapper
│   └── start.bat             # Quick start script
│
├── frontend-react/              # React frontend
│   ├── src/
│   │   ├── components/
│   │   │   └── Navbar.jsx      # Auth-aware navigation
│   │   ├── pages/
│   │   │   ├── Home.jsx                 # ⭐ NEW Landing page
│   │   │   ├── StudentLogin.jsx         # ⭐ NEW Student auth
│   │   │   ├── AdminLogin.jsx           # ⭐ NEW Admin auth
│   │   │   ├── RaiseComplaint.jsx       # ⭐ NEW Enhanced form
│   │   │   ├── MyComplaints.jsx         # ⭐ NEW Student dashboard
│   │   │   ├── ComplaintDetail.jsx      # ⭐ NEW Detail view
│   │   │   ├── TrackComplaint.jsx       # ⭐ NEW Public tracking
│   │   │   ├── AdminDashboard.jsx       # ✨ Enhanced
│   │   │   ├── ComplaintForm.jsx        # Legacy
│   │   │   └── ComplaintStatus.jsx      # Legacy
│   │   ├── services/
│   │   │   └── api.js          # Axios API wrapper
│   │   ├── App.jsx             # ✨ Enhanced routing
│   │   ├── main.jsx
│   │   └── index.css           # ✨ 2x CSS (700+ lines)
│   ├── package.json
│   └── vite.config.js
│
├── notification-service/        # Spring Boot microservice
│   ├── src/main/java/
│   │   └── com/complaint/notification/
│   │       ├── NotificationServiceApplication.java
│   │       ├── controller/
│   │       │   └── NotificationController.java
│   │       ├── service/
│   │       │   └── DiscordNotificationService.java
│   │       ├── model/
│   │       └── config/
│   ├── src/main/resources/
│   │   └── application.properties
│   └── pom.xml
│
├── discord-bot/                 # Discord bot (JDA)
│   ├── src/main/java/
│   │   └── com/complaint/discordbot/
│   │       ├── DiscordBotApplication.java
│   │       ├── controller/
│   │       │   └── DiscordBotController.java
│   │       ├── service/
│   │       │   └── DiscordBotService.java (✅ Fixed)
│   │       └── model/
│   ├── src/main/resources/
│   │   └── application.properties
│   └── pom.xml
│
└── docs/                        # Documentation
    ├── README.md
    ├── ARCHITECTURE.md
    ├── DATABASE_SCHEMA.md
    ├── SETUP_GUIDE.md
    ├── API_DOCUMENTATION.md
    ├── DEPLOYMENT_GUIDE.md
    └── VIVA_QUESTIONS.md

🚀 Getting Started

Prerequisites

  • Node.js 18+ and npm (for React frontend)
  • MongoDB 6.0+
  • Java 17+ (for Spring Boot backend)
  • Maven 3.8+ (or use included Maven wrapper)
  • Discord Bot Token (for Discord integration)

1. Backend Setup (Spring Boot)

cd backend-springboot

# Quick start (recommended)
start.bat

# Or manual start
./mvnw.cmd spring-boot:run

# Server will start on http://localhost:8080
# Swagger UI: http://localhost:8080/api/swagger-ui.html

2. Frontend Setup (React)

cd frontend-react
npm install
npm start

3. Notification Service (Spring Boot)

cd notification-service
mvn clean install
mvn spring-boot:run

4. Discord Bot (JDA)

cd discord-bot
mvn clean install
java -jar target/discord-bot-1.0.jar

🌐 API Endpoints

Backend (Node.js) - Port 5000

  • POST /api/complaints - Submit a complaint
  • GET /api/complaints - Get all complaints (Admin)
  • GET /api/complaints/:id - Get complaint by ID
  • PUT /api/complaints/:id/status - Update complaint status

Notification Service (Spring Boot) - Port 8080

  • POST /api/notify - Send notification to Discord

📊 Database Schema

Complaint Collection (MongoDB)

{
  studentName: String,
  category: String,
  description: String,
  status: String,  // "Pending", "In Progress", "Resolved"
  createdAt: Date,
  updatedAt: Date
}

🎯 Features

  • ✅ Student complaint submission
  • ✅ Real-time complaint tracking
  • ✅ Admin dashboard for complaint management
  • ✅ Automated Discord notifications
  • ✅ Status update tracking
  • ✅ Clean and responsive UI

🔧 Configuration

Environment Variables

Backend (.env)

PORT=5000
MONGODB_URI=mongodb://localhost:27017/complaint_system
NOTIFICATION_SERVICE_URL=http://localhost:8080/api/notify

Spring Boot (application.properties)

server.port=8080
discord.bot.url=http://localhost:3000/send

Discord Bot (config.properties)

discord.token=YOUR_DISCORD_BOT_TOKEN
discord.channel.id=YOUR_CHANNEL_ID
server.port=3000

👥 User Roles

  1. Student - Submit and track complaints
  2. Admin - View and manage all complaints

📝 License

This project is for academic purposes.

👨‍💻 Author

Created for academic submission and learning purposes.

Releases

No releases published

Packages

 
 
 

Contributors