Gromo is a comprehensive insurance claim processing platform that leverages AI technologies for voice recognition, document OCR, and claims management. The platform helps streamline the insurance claims process through intelligent automation and data extraction.
- Voice Processing: Transcribe and analyze voice recordings for claim information extraction
- Document OCR: Extract structured data from insurance documents using optical character recognition
- Claims Management: End-to-end management of insurance claims with status tracking
- Authentication: Secure user authentication and authorization
- API Documentation: Comprehensive API documentation with Swagger/OpenAPI
- Backend: Node.js, Express, TypeScript
- Frontend: React, Material-UI, TypeScript
- Database: MongoDB
- Caching: Redis
- AI Services: Google Cloud Speech-to-Text, Google Cloud Vision
- Authentication: JWT, bcrypt
- Documentation: Swagger/OpenAPI
- Node.js (v18+)
- MongoDB (v6.0+)
- Redis (v7.0+)
- Google Cloud Platform account (for production use of Speech-to-Text and Vision APIs)
-
Clone the repository
git clone https://github.com/yourusername/gromo.git cd gromo -
Install dependencies
# Install backend dependencies npm install # Install frontend dependencies cd client npm install cd ..
-
Copy environment configuration
# Copy the example .env file cp .env.example .env # Open and edit the .env file with your configuration # For development, you can keep MOCK_GOOGLE_SERVICES=true
-
Configure your environment variables in .env
- Database connections
- Google Cloud credentials
- JWT secrets
- API keys
-
Start development server
npm run seed npm run build:full && npm start -
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:3000/api/v1/*
- API Docs: http://localhost:3000/api-docs
- Health Check: http://localhost:3000/health
# Start all services with Docker Compose
docker-compose up -d
# View logs
docker-compose logs -f gromo-app
# In a separate terminal, run the database seeder
docker-compose exec api npm run seed
# Stop services
docker-compose downThe project includes comprehensive testing at multiple levels:
# Run all unit tests
npm run test:unit
# Run with coverage
npm run test:coverage
# Watch mode for development
npm run test:watch# Run integration tests
npm run test:integration
# Test specific API endpoints
npm run test:integration -- --testNamePattern="Voice API"# Run E2E tests with Cypress
npm run test:e2e
# Open Cypress interactive mode
npm run test:e2e:open# Run load tests with Artillery
npm run test:load
# Custom load test configuration
artillery run tests/load/config.yml# Run security audit
npm run security:audit
# Lint code for security issues
npm run lint# Development
npm run dev # Start development server with hot reload
npm run build # Build for production
npm start # Start production server
# Build and start both frontend and backend
npm run build:full && npm start
# Testing
npm run test # Run all tests
npm run test:unit # Unit tests only
npm run test:integration # Integration tests only
npm run test:e2e # End-to-end tests
npm run test:load # Load testing
npm run test:all # Run complete test suite
# Code Quality
npm run lint # Run ESLint
npm run lint:fix # Fix linting issues
npm run security:audit # Security vulnerability scan
# Utilities
npm run clean # Clean build artifacts
npm run watch # Watch mode compilation├── src/
│ ├── api/ # API route handlers
│ │ ├── voice.ts # Voice processing endpoints
│ │ ├── ocr.ts # OCR processing endpoints
│ │ ├── claims.ts # Claims management
│ │ └── escalation.ts # Escalation workflows
│ ├── middleware/ # Express middleware
│ │ ├── authMiddleware.ts # Authentication & authorization
│ │ ├── securityMiddleware.ts # Security headers & validation
│ │ ├── errorHandler.ts # Error handling
│ │ └── notFound.ts # 404 handler
│ ├── services/ # Business logic services
│ │ ├── voiceService.ts # Google Speech-to-Text integration
│ │ ├── ocrService.ts # Google Vision API integration
│ │ ├── fraudDetectionService.ts # AI fraud detection
│ │ ├── escalationService.ts # Automated escalation
│ │ └── notificationService.ts # Twilio notifications
│ ├── models/ # MongoDB data models
│ │ ├── User.ts # User management
│ │ └── Claim.ts # Insurance claims
│ ├── workers/ # Background job processors
│ │ ├── escalationWorker.ts # Escalation queue worker
│ │ ├── notificationWorker.ts # Notification sender
│ │ └── workerManager.ts # Worker coordination
│ ├── config/ # Configuration management
│ │ ├── config.ts # Environment configuration
│ │ └── database.ts # Database connection
│ ├── utils/ # Utility functions
│ │ └── logger.ts # Structured logging
│ └── app.ts # Express application setup
├── tests/
│ ├── unit/ # Unit tests
│ ├── integration/ # Integration tests
│ ├── e2e/ # End-to-end tests
│ ├── load/ # Load testing configuration
│ └── setup.ts # Test configuration
├── monitoring/ # Monitoring and alerting
│ ├── prometheus.yml # Metrics collection
│ └── alert_rules.yml # Alert definitions
├── .github/workflows/ # CI/CD pipelines
├── docs/ # Documentation
├── docker-compose.yml # Development environment
├── Dockerfile # Container configuration
└── package.json # Dependencies and scripts
- Authentication: JWT-based with refresh tokens
- Authorization: Role-based access control (Admin, Agent, Customer Service, Customer)
- Rate Limiting: Multiple tiers based on endpoint sensitivity
- Input Validation: Comprehensive sanitization and validation
- File Upload Security: Format validation, size limits, virus scanning
- CORS: Configurable cross-origin resource sharing
- Security Headers: Helmet.js for comprehensive security headers
- API Key Authentication: For service-to-service communication
- Multi-language Support: 10+ Indian languages
- Real-time Transcription: Google Speech-to-Text integration
- Entity Extraction: Automatic extraction of claim numbers, policy numbers, dates, locations
- Confidence Scoring: Quality assessment of transcriptions
- Document Types: Claims forms, medical bills, police reports, repair estimates
- Fallback Mechanisms: 3-tier processing for maximum accuracy
- Data Extraction: Structured data extraction from unstructured documents
- Validation: Cross-document consistency checking
- Pattern Analysis: ML-based suspicious pattern detection
- Risk Scoring: Multi-factor risk assessment
- Blacklist Checking: Vehicle and phone number validation
- Document Verification: Cross-reference validation
- Application Metrics: Response times, error rates, throughput
- System Metrics: CPU, memory, disk usage
- Database Metrics: Connection pools, query performance
- Custom Metrics: Business KPIs and fraud detection rates
- Performance Alerts: High response times, error rates
- Infrastructure Alerts: Resource exhaustion, service failures
- Business Alerts: Fraud detection triggers, escalation timeouts
- Security Alerts: Authentication failures, rate limit breaches
- Operational Dashboard: Real-time system health
- Business Dashboard: Claims processing metrics
- Security Dashboard: Threat detection and response
# Start with Docker Compose
docker-compose up -d
# Access services:
# - Application: http://localhost:3000
# - MongoDB: localhost:27017
# - Redis: localhost:6379
# - Grafana: http://localhost:3001
# - Prometheus: http://localhost:9090# Build production image
docker build -t gromo:latest .
# Run with production configuration
docker run -d \
--name gromo-app \
-p 3000:3000 \
-e NODE_ENV=production \
-e MONGODB_URI=mongodb://mongodb:27017/gromo \
gromo:latest# Apply Kubernetes manifests
kubectl apply -f k8s/
# Check deployment status
kubectl get pods -l app=gromo
# View logs
kubectl logs -f deployment/gromo-appThe project includes a comprehensive GitHub Actions pipeline:
- Code Quality: Linting, type checking, security scanning
- Testing: Unit, integration, and E2E tests
- Security: Dependency auditing, SAST scanning
- Performance: Load testing and performance regression detection
- Build: Docker image creation and registry push
- Deploy: Automated deployment to staging and production
POST /api/auth/login- User authenticationPOST /api/auth/register- User registrationPOST /api/auth/refresh- Token refresh
POST /api/voice/transcribe- Transcribe audio filesGET /api/voice/languages- Get supported languagesPOST /api/voice/validate- Validate audio format
POST /api/ocr/extract- Extract text from imagesPOST /api/ocr/batch- Batch process multiple imagesGET /api/ocr/formats- Get supported image formats
GET /api/claims- List claims (paginated)POST /api/claims- Create new claimGET /api/claims/:id- Get claim detailsPUT /api/claims/:id- Update claimDELETE /api/claims/:id- Delete claim (admin only)
GET /api/admin/health- System health checkGET /api/admin/metrics- Performance metricsGET /api/admin/users- User management
- 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
- Follow TypeScript best practices
- Write comprehensive tests for new features
- Update documentation for API changes
- Follow the existing code style and patterns
- Ensure security considerations are addressed
This project is licensed under the ISC License - see the LICENSE file for details.
For support and questions:
- Documentation: Check the
docs/directory - Issues: Open a GitHub issue
- Security: Report security issues privately
- Google Cloud Platform for AI services
- MongoDB for database solutions
- Redis for caching infrastructure
- The open-source community for excellent tools and libraries
ISC