Thanks to visit codestin.com
Credit goes to github.com

Skip to content

26-Digital/frs-framework

Β 
Β 

Repository files navigation

BOL Customer Relationship Management System

A comprehensive stakeholder feedback and case management system built with modern web technologies.

πŸš€ Tech Stack

  • 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

πŸ“‹ Features

Core Functionality

  • 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

Key Capabilities

  • 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

πŸ—οΈ Project Structure

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

πŸ”§ Installation & Setup

Prerequisites

  • Node.js 18+
  • PostgreSQL database
  • npm or yarn package manager

Getting Started

  1. Clone the repository

    git clone <repository-url>
    cd bol-crm-system
  2. Install dependencies

    npm install
  3. Environment Setup Create a .env.local file:

    # 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]"
  4. Database Setup

    # Generate Prisma client
    npx prisma generate
    
    # Run migrations
    npx prisma db push
    
    # Seed database (optional)
    npx prisma db seed
  5. Start Development Server

    npm run dev

🎯 MVP Phase 1 Features

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

πŸ” User Roles & Permissions

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

πŸ“Š Key Database Models

// Core entities
- User (authentication & roles)
- Case (feedback/complaint records)
- Category (case classification)
- Comment (case updates/communication)
- Survey (satisfaction measurement)
- Notification (system alerts)

πŸ”Œ API Endpoints

Authentication

  • POST /api/auth/signin - User login
  • POST /api/auth/signout - User logout

Cases

  • GET /api/cases - List cases (with filtering)
  • POST /api/cases - Create new case
  • GET /api/cases/[id] - Get case details
  • PUT /api/cases/[id] - Update case
  • DELETE /api/cases/[id] - Delete case

Analytics

  • GET /api/analytics/dashboard - Dashboard metrics
  • GET /api/analytics/reports - Generate reports

πŸš€ Deployment

Production Checklist

  • Environment variables configured
  • Database migrations applied
  • SSL certificates installed
  • Email service configured
  • Monitoring tools setup

Recommended Platforms

  • Vercel - Seamless Next.js deployment
  • Railway - Database hosting
  • Supabase - Alternative database + auth solution

πŸ§ͺ Testing

# Run tests
npm run test

# Run tests with coverage
npm run test:coverage

# Run E2E tests
npm run test:e2e

πŸ“ˆ Future Enhancements

Phase 2 Features

  • Advanced analytics and reporting
  • Social media integration
  • Mobile app support
  • Automated workflows
  • AI-powered categorization

Phase 3 Features

  • Multi-tenant support
  • Advanced integrations (ERP, CRM)
  • Custom survey builders
  • API marketplace

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

For support and questions:

  • Create an issue in the repository
  • Contact the development team
  • Check the documentation wiki

Built with ❀️ for BOL stakeholder management

About

hackthon

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.7%
  • CSS 1.2%
  • JavaScript 0.1%