A comprehensive full-stack complaint management system built with Spring Boot backend, React frontend, and MongoDB database, featuring OAuth2 integration and Discord Bot notifications.
- 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)
- Student Login: Simple email + Student ID authentication
- Pre-fills complaint forms with student information
- Persistent login state via localStorage
- Redirects to personalized dashboard
- Admin Login: Username/password authentication (default:
admin/admin123) - Role-based access control
- Comparison table showing Student vs Admin capabilities
- Dedicated admin navigation menu
- 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
- 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
- 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
- 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
- Public page to track complaint by ID
- No authentication required
- Quick status lookup
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ 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
| 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 |
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
- 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)
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.htmlcd frontend-react
npm install
npm startcd notification-service
mvn clean install
mvn spring-boot:runcd discord-bot
mvn clean install
java -jar target/discord-bot-1.0.jarPOST /api/complaints- Submit a complaintGET /api/complaints- Get all complaints (Admin)GET /api/complaints/:id- Get complaint by IDPUT /api/complaints/:id/status- Update complaint status
POST /api/notify- Send notification to Discord
{
studentName: String,
category: String,
description: String,
status: String, // "Pending", "In Progress", "Resolved"
createdAt: Date,
updatedAt: Date
}- ✅ Student complaint submission
- ✅ Real-time complaint tracking
- ✅ Admin dashboard for complaint management
- ✅ Automated Discord notifications
- ✅ Status update tracking
- ✅ Clean and responsive UI
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
- Student - Submit and track complaints
- Admin - View and manage all complaints
This project is for academic purposes.
Created for academic submission and learning purposes.