A comprehensive stakeholder feedback and case management system built with modern web technologies.
- Framework: Next.js 15 with App Router
- UI Library: shadcn/ui + Tailwind CSS
- Language: TypeScript
- Database: PostgreSQL with Prisma ORM
- Authentication: NextAuth.js v5 (Auth.js)
- Form Validation: Zod
- Styling: Tailwind CSS
- Multi-channel Feedback Collection - Web forms, email, social media integration
- Automated Case Management - Smart routing, escalation, and SLA tracking
- Role-based Access Control - Admin, Agent, Supervisor, and Viewer roles
- Real-time Analytics - Dashboards with drill-down capabilities
- Survey Tools - Post-resolution satisfaction measurement
- Integration Ready - API-first architecture for ERP and external systems
- Automated case creation and workflow routing
- Smart ticket tagging and categorization
- Progress tracking for stakeholders
- Comprehensive audit trails
- Exportable reports (PDF, Excel)
- Root cause analysis tools
src/
βββ app/ # Next.js 15 App Router
β βββ (auth)/ # Authentication routes
β β βββ login/
β β βββ register/
β βββ (dashboard)/ # Protected dashboard routes
β β βββ cases/
β β βββ analytics/
β β βββ settings/
β β βββ users/
β βββ api/ # API routes
β β βββ auth/
β β βββ cases/
β β βββ surveys/
β βββ globals.css
βββ components/
β βββ ui/ # shadcn/ui components
β βββ forms/ # Form components
β β βββ feedback-form.tsx
β β βββ case-form.tsx
β β βββ survey-form.tsx
β βββ dashboard/ # Dashboard components
β β βββ case-list.tsx
β β βββ analytics-charts.tsx
β β βββ user-management.tsx
β βββ layout/ # Layout components
βββ lib/
β βββ auth.ts # NextAuth configuration
β βββ db.ts # Prisma client
β βββ validations/ # Zod schemas
β β βββ case.ts
β β βββ user.ts
β β βββ survey.ts
β βββ utils.ts # Utility functions
βββ prisma/
β βββ schema.prisma # Database schema
β βββ migrations/ # Database migrations
βββ types/ # TypeScript type definitions
β βββ auth.ts
β βββ case.ts
β βββ survey.ts
βββ hooks/ # Custom React hooks
βββ use-cases.ts
βββ use-analytics.ts
- Node.js 18+
- PostgreSQL database
- npm or yarn package manager
-
Clone the repository
git clone <repository-url> cd bol-crm-system
-
Install dependencies
npm install
-
Environment Setup Create a
.env.localfile:# Database DATABASE_URL="postgresql://username:password@localhost:5432/bol_crm" # NextAuth NEXTAUTH_SECRET="your-secret-key" NEXTAUTH_URL="http://localhost:3000" # Email Configuration EMAIL_SERVER_HOST="smtp.gmail.com" EMAIL_SERVER_PORT=587 EMAIL_SERVER_USER="[email protected]" EMAIL_SERVER_PASSWORD="your-app-password" EMAIL_FROM="[email protected]"
-
Database Setup
# Generate Prisma client npx prisma generate # Run migrations npx prisma db push # Seed database (optional) npx prisma db seed
-
Start Development Server
npm run dev
The initial release focuses on core functionality:
- β Basic Authentication - Admin and Agent roles
- β Simple Case Management - Create, view, update cases
- β Web Form Submission - Public feedback form
- β Basic Dashboard - Case list with simple statistics
- β Email Notifications - Alerts for new cases
| Role | Permissions |
|---|---|
| Admin | Full system access, user management, system configuration |
| Supervisor | Case oversight, team management, advanced reporting |
| Agent | Case handling, customer communication, basic reporting |
| Viewer | Read-only access to cases and reports |
// Core entities
- User (authentication & roles)
- Case (feedback/complaint records)
- Category (case classification)
- Comment (case updates/communication)
- Survey (satisfaction measurement)
- Notification (system alerts)POST /api/auth/signin- User loginPOST /api/auth/signout- User logout
GET /api/cases- List cases (with filtering)POST /api/cases- Create new caseGET /api/cases/[id]- Get case detailsPUT /api/cases/[id]- Update caseDELETE /api/cases/[id]- Delete case
GET /api/analytics/dashboard- Dashboard metricsGET /api/analytics/reports- Generate reports
- Environment variables configured
- Database migrations applied
- SSL certificates installed
- Email service configured
- Monitoring tools setup
- Vercel - Seamless Next.js deployment
- Railway - Database hosting
- Supabase - Alternative database + auth solution
# Run tests
npm run test
# Run tests with coverage
npm run test:coverage
# Run E2E tests
npm run test:e2e- Advanced analytics and reporting
- Social media integration
- Mobile app support
- Automated workflows
- AI-powered categorization
- Multi-tenant support
- Advanced integrations (ERP, CRM)
- Custom survey builders
- API marketplace
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue in the repository
- Contact the development team
- Check the documentation wiki
Built with β€οΈ for BOL stakeholder management