A secure school complaint management system
Dikkat is a full-stack web application designed to streamline the submission, tracking, and review of school-related complaints. The platform provides a secure and authenticated workflow for students to submit complaints and view their own records, while enabling administrators to access and review all submissions centrally.
Access is restricted through institutional email validation to ensure that only authorized users can use the system.
- Email-based authentication using Clerk
- Access restricted to approved institutional email domains
- Automatic sign-out and redirection for unauthorized users
- Pre-filled student information including name and admission number
- Structured complaint form with class and section selection
- Client-side validation to prevent incomplete submissions
-
Student view
- Displays only complaints submitted by the logged-in student
- Chronologically ordered with formatted timestamps
-
Administrative view
- Displays all submitted complaints
- Reverse-ordered for latest-first inspection
- REST-style endpoints implemented using the Next.js App Router
- MongoDB persistence using Mongoose
- Stateless request handling for data fetch and submission
- Next.js (App Router)
- React
- Tailwind CSS
- DaisyUI
- Next.js API routes
- MongoDB Atlas
- Mongoose
- Clerk
- Vercel
app/
├── api/
│ └── complaints/ # Complaint GET and POST endpoints
├── lib/
│ ├── db.js # MongoDB connection logic
│ └── model/
│ └── complaint.js # Complaint schema
├── submit/ # Complaint submission page
├── log/ # Student complaint logs
├── logs/ # Administrative complaint logs
├── validation/ # Email domain validation
├── sign-in/ # Clerk sign-in
├── sign-up/ # Clerk sign-up
├── about/ # About page
├── layout.js # Root layout and providers
└── page.js # Landing pageComplaint {
admno: String, // Admission number
email: String, // User email
name: String, // Student name
stdClass: String, // Class
section: String, // Section
comp: String, // Complaint content
date: Date // Auto-generated timestamp
}-
User signs in or signs up
-
Email domain validation is performed
- Valid domain results in redirection to the complaint submission page
- Invalid domain results in forced sign-out
-
Complaint is submitted and stored in the database
-
Complaint logs are displayed based on user access level
Create a .env.local file with the following entries:
password=YOUR_MONGODB_PASSWORD
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=YOUR_CLERK_KEY
CLERK_SECRET_KEY=YOUR_CLERK_SECRETnpm install
npm run devThe application will be available at:
http://localhost:3000