Skip to content

dataontap/DeviceInsights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

401 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

IMEI Device Checker & Network Monitoring Platform

A comprehensive AI-powered platform for IMEI device compatibility analysis, network coverage monitoring, and user feedback collection with multilingual support and voice synthesis.

Version License Node TypeScript

Last Updated: November 11, 2025


πŸ“‹ Table of Contents


🎯 Overview

This full-stack platform provides comprehensive IMEI device analysis and network monitoring capabilities, designed for mobile carriers, MVNOs, device compatibility services, and network infrastructure monitoring. Built with modern technologies and AI-powered insights, it offers real-time device identification, network compatibility analysis, and user satisfaction tracking.

Key Use Cases

  • MVNO Operations: Device compatibility verification for customer onboarding
  • Network Carriers: Coverage analysis and quality monitoring across regions
  • Device Retailers: Pre-sale compatibility checks for customer assurance
  • Technical Support: Automated device identification and troubleshooting
  • Market Research: User satisfaction tracking via NPS surveys
  • API Integration: RESTful APIs for third-party service integration

✨ Features

πŸ€– AI-Powered Device Analysis

  • Google Gemini Integration: Advanced AI identification using TAC (Type Allocation Code) analysis
  • Intelligent Fallback System: Comprehensive device database for offline operation
  • Network Compatibility: Complete 4G/5G/VoLTE/Wi-Fi Calling capability analysis
  • Multi-Carrier Support: AT&T, Verizon, T-Mobile, Rogers, Bell, Telus, and more
  • Real-time Analysis: Sub-second IMEI lookup with detailed specifications

πŸ—ΊοΈ Network Coverage Analysis

  • Provider Comparison: Side-by-side coverage analysis for multiple carriers
  • AI-Powered Insights: Gemini-driven coverage quality assessment
  • Downdetector Integration: Real-time outage and issue detection
  • Google Maps Integration: Visual coverage maps with interactive markers
  • Location-Based Analysis: Automatic carrier detection based on GPS coordinates
  • Issue Reporting: User-submitted network problems with AI pattern recognition

πŸŽ™οΈ Multilingual Voice Support (30+ Languages)

  • ElevenLabs Integration: High-quality AI voice synthesis
  • Voice Styles: Standard, harmonizing, singing, and rock ballad modes
  • USSD Instructions: Voice-guided help for finding IMEI (*#06#) in any language
  • Supported Languages: English, Spanish, French, German, Italian, Portuguese, Dutch, Russian, Polish, Turkish, Chinese (Mandarin & Cantonese), Japanese, Korean, Hindi, Thai, Vietnamese, Indonesian, Arabic, Hebrew, Swedish, Norwegian, Danish, Finnish, Greek, Czech, Hungarian, Romanian, Bulgarian, Croatian, Slovak

πŸ“Š User Feedback & Analytics

  • NPS (Net Promoter Score) System: Non-intrusive feedback collection after searches
  • Admin Dashboard: Comprehensive metrics including:
    • Real-time NPS score calculation
    • Promoter/Passive/Detractor breakdown
    • Recent feedback with sentiment analysis
    • User satisfaction trends
  • Search Analytics: Device popularity, success rates, geographic distribution
  • Rate Limit Monitoring: Track API usage and enforce limits by tier

πŸ“§ User Engagement

  • Monthly Email Insights: Automated connectivity reports for registered users
  • Magic Link Authentication: Secure email-based admin access via Resend
  • Real-time Notifications: Firebase Cloud Messaging for alerts
  • Admin Access Tracking: Complete audit trail of authentication attempts

πŸ” Security & Performance

  • API Key Management: Secure key generation and validation
  • Enhanced Rate Limiting: Tiered limits (100/500/1000 requests per hour)
  • PostgreSQL Database: Robust data persistence with Drizzle ORM
  • Session Management: Secure admin sessions with PostgreSQL storage
  • Input Validation: Zod schemas for all API endpoints
  • CORS Configuration: Production-ready cross-origin controls

πŸš€ Developer-Friendly APIs

  • RESTful Architecture: Clean, documented endpoints
  • OpenAPI Compatible: Easy integration with any language/framework
  • JSON Responses: Structured data perfect for LLM/AI processing
  • Export Capabilities: CSV and JSON data export with example data for unauthenticated users
  • Versioned APIs: /api/v1 for stable production use
  • MCP Server Ready: Optimized for Model Context Protocol integration
  • Demo-Friendly: Download example exports without authentication for testing

πŸ†• Recent Developments

Version 2.0 (January 2025)

NPS Feedback System

  • βœ… Non-intrusive Widget: Appears 3 seconds after successful IMEI search
  • βœ… Smart Positioning: Bottom-right desktop, bottom-center mobile
  • βœ… 0-10 Rating Scale: Standard NPS methodology with optional text feedback
  • βœ… Admin Dashboard: Real-time NPS metrics with distribution charts
  • βœ… Database Schema: Complete nps_responses table with timestamps
  • βœ… API Endpoints: /api/nps/submit and /api/admin/nps/*

Enhanced Authentication

  • βœ… Resend Magic Links: Email-based admin authentication from rbm@dotmobile.app
  • βœ… Access Request Tracking: All login attempts recorded with metadata
  • βœ… Firebase Bypass: Backend-only approach avoids domain whitelist issues
  • βœ… Session Metadata: IP, user agent, location, and timestamp tracking

Voice & Internationalization

  • βœ… ElevenLabs Integration: Template-based caching for cost optimization
  • βœ… 30+ Language Support: Complete voice synthesis across all languages
  • βœ… Harmonizing Modes: Multi-voice singing for USSD instructions
  • βœ… Voice Agent API: Endpoints for language/voice selection

Coverage Maps Enhancement

  • βœ… Provider Selection: Choose specific carrier or auto-detect by location
  • βœ… Issue Analyzer: AI-powered network problem classification
  • βœ… Pattern Recognition: Identify widespread vs. isolated issues
  • βœ… Mobile/Broadband Split: Separate analysis for service types

Data Export Enhancement

  • βœ… Optional Authentication: Export works with or without API key
  • βœ… Example Data: Download sample exports for testing and demonstration
  • βœ… Clear Indicators: Example files clearly marked with instructions
  • βœ… User-Friendly: No authentication errors for casual users exploring features
  • βœ… Smart Detection: Frontend automatically detects and labels example data

πŸš€ Quick Start

Prerequisites

Installation

# Clone the repository (replace with your GitHub repository URL after pushing)
git clone https://github.com/YOUR_USERNAME/imei-device-checker.git
cd imei-device-checker

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env
# Edit .env with your API keys and database URL

# Initialize database
npm run db:push

# Start development server
npm run dev

The application will be available at http://localhost:5000


πŸ”§ Environment Setup

Required Environment Variables

Create a .env file in the root directory:

# === DATABASE ===
DATABASE_URL="postgresql://username:password@localhost:5432/app_dev"

# === AI SERVICES ===
# Google Gemini API for device identification
GEMINI_API_KEY="your_gemini_api_key"

# === FIREBASE (Authentication & Messaging) ===
VITE_FIREBASE_API_KEY="your_firebase_api_key"
VITE_FIREBASE_PROJECT_ID="your_project_id"
VITE_FIREBASE_APP_ID="your_app_id"
FIREBASE_SERVICE_ACCOUNT_JSON='{"type":"service_account",...}'

# === MAPS & LOCATION ===
GORSE_GOOGLE_API_KEY="your_google_maps_api_key"
GOOGLE_MAPS_API_KEY="your_google_maps_api_key"

# === EMAIL SERVICES ===
# Resend for magic link authentication
RESEND_API_KEY="your_resend_api_key"

# SendGrid for monthly insights (optional)
SENDGRID_API_KEY="your_sendgrid_api_key"

# === VOICE SYNTHESIS (Optional) ===
ELEVENLABS_API_KEY="your_elevenlabs_api_key"

# === APPLICATION CONFIG ===
NODE_ENV="development"
PORT="5000"
SESSION_SECRET="your_secure_random_string_here"
ADMIN_EMAIL="rbm@dotmobile.app"

Getting API Keys

1. Google Gemini API

  1. Visit Google AI Studio
  2. Create new project or select existing
  3. Generate API key
  4. Add to .env as GEMINI_API_KEY

2. Firebase

  1. Go to Firebase Console
  2. Create project
  3. Enable Authentication (Email/Password + Google)
  4. Enable Cloud Messaging (FCM)
  5. Download service account key (JSON)
  6. Add credentials to .env

3. Google Maps API

  1. Visit Google Cloud Console
  2. Enable Maps Static API and Maps JavaScript API
  3. Create API key
  4. Restrict key to your domain
  5. Add to .env

4. Resend (Magic Link Email)

  1. Sign up at Resend
  2. Verify domain or use test domain
  3. Create API key
  4. Add to .env as RESEND_API_KEY

5. ElevenLabs (Voice Synthesis - Optional)

  1. Sign up at ElevenLabs
  2. Generate API key from settings
  3. Add to .env as ELEVENLABS_API_KEY
  4. Note: Limited free tier, monitor usage

Database Setup

Local PostgreSQL

# Start PostgreSQL
# macOS (Homebrew)
brew services start postgresql

# Ubuntu/Debian
sudo systemctl start postgresql

# Windows: Use Services or PostgreSQL installer

# Create database
psql -U postgres
CREATE DATABASE app_dev;
CREATE USER app_user WITH PASSWORD 'your_secure_password';
GRANT ALL PRIVILEGES ON DATABASE app_dev TO app_user;
\q

# Update DATABASE_URL in .env
DATABASE_URL="postgresql://app_user:your_secure_password@localhost:5432/app_dev"

# Run migrations
npm run db:push

Cloud PostgreSQL (Neon)

# 1. Sign up at https://neon.tech/
# 2. Create new project
# 3. Copy connection string
# 4. Add to .env:
DATABASE_URL="postgresql://user:password@ep-xxx.neon.tech/app_prod?sslmode=require"

# 5. Run migrations
npm run db:push

πŸ“‘ API Documentation

Device Analysis

Check IMEI Compatibility

POST /api/v1/check
Authorization: Bearer your_api_key
Content-Type: application/json

{
  "imei": "123456789012345",
  "location": "New York, NY",
  "network": "AT&T",
  "accept_policy": true
}

Response:

{
  "searchId": 12345,
  "success": true,
  "device": {
    "make": "Apple",
    "model": "iPhone 14 Pro",
    "year": 2022,
    "modelNumber": "A2892"
  },
  "networkCompatibility": {
    "fourG": true,
    "fiveG": true,
    "volte": true,
    "wifiCalling": "supported"
  },
  "tacAnalysis": "TAC 01326600 identifies this as Apple iPhone 14 Pro (US model)",
  "location": "New York, NY",
  "coordinates": { "lat": 40.7128, "lng": -74.0060 }
}

Coverage Analysis

Analyze Network Coverage

POST /api/coverage/analyze
Content-Type: application/json

{
  "lat": 40.7128,
  "lng": -74.0060,
  "address": "New York, NY",
  "provider": "auto"
}

Response:

{
  "location": {
    "lat": 40.7128,
    "lng": -74.0060,
    "address": "New York, NY"
  },
  "mobile_providers": {
    "Verizon": {
      "coverage_score": 92,
      "reliability_rating": 4.5,
      "recent_issues": 3,
      "recommendation": "excellent"
    },
    "AT&T": {
      "coverage_score": 88,
      "reliability_rating": 4.2,
      "recent_issues": 5,
      "recommendation": "good"
    }
  },
  "broadband_providers": { ... }
}

NPS Feedback

Submit User Feedback

POST /api/nps/submit
Content-Type: application/json

{
  "searchId": 12345,
  "rating": 9,
  "feedback": "Great tool, very accurate results!"
}

Get NPS Statistics (Admin)

GET /api/admin/nps/stats
Authorization: Bearer admin_session_token

Response:

{
  "totalResponses": 1247,
  "npsScore": 56,
  "promoters": 687,
  "passives": 412,
  "detractors": 148,
  "promoterPercentage": 55.1,
  "passivePercentage": 33.0,
  "detractorPercentage": 11.9
}

Voice API

Get USSD Voice Instructions

POST /api/voice/ussd-help
Content-Type: application/json

{
  "language": "es",
  "voiceCount": 4,
  "location": {
    "city": "Madrid",
    "country": "Spain"
  }
}

User Management

Register for Email Insights

POST /api/users/register
Content-Type: application/json

{
  "email": "user@example.com",
  "firstName": "John",
  "lastName": "Doe",
  "emailPreferences": {
    "monthlyInsights": true,
    "interruptionAlerts": true,
    "speedAlerts": false
  }
}

Analytics & Export

Get Platform Statistics

GET /api/v1/stats
Authorization: Bearer your_api_key

Export Search Data

With API Key (Real Data):

GET /api/v1/export?format=csv
Authorization: Bearer your_api_key

Without API Key (Example Data):

GET /api/v1/export?format=json
# No authentication required - returns anonymized example data

Response (Example Data):

{
  "isExampleData": true,
  "notice": "This is example data. Sign up for a free API key to export your real search data.",
  "searches": [
    {
      "id": 1,
      "imei": "123456789012345",
      "device": {
        "make": "Apple",
        "model": "iPhone 15 Pro",
        "year": "2023"
      },
      "location": "New York, USA",
      "searchedAt": "2025-01-23T12:00:00Z"
    }
  ],
  "apiKeyName": "Example Data",
  "totalCount": 5
}

Features:

  • βœ… Both CSV and JSON formats supported
  • βœ… Example data clearly marked with isExampleData flag
  • βœ… CSV files include header comments with instructions
  • βœ… Example files use _example suffix in filename
  • βœ… Real data requires valid API key authentication

Rate Limits

Tier Limit Use Case
Standard 100 req/hour Individual developers, testing
MCP Server 500 req/hour Automated AI services
Premium 1000 req/hour Production applications

Rate Limit Headers:

RateLimit-Limit: 500
RateLimit-Remaining: 487
RateLimit-Reset: 1640995200
RateLimit-Policy: 500;w=3600

πŸ“ Project Structure

imei-device-checker/
β”œβ”€β”€ client/                     # Frontend React application
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   └── firebase-messaging-sw.js  # Service worker for push notifications
β”‚   └── src/
β”‚       β”œβ”€β”€ components/
β”‚       β”‚   β”œβ”€β”€ ui/            # Shadcn/ui components
β”‚       β”‚   β”œβ”€β”€ imei-checker.tsx        # Main IMEI input form
β”‚       β”‚   β”œβ”€β”€ device-results.tsx      # Results display
β”‚       β”‚   β”œβ”€β”€ nps-feedback.tsx        # NPS feedback widget
β”‚       β”‚   β”œβ”€β”€ nps-metrics.tsx         # Admin NPS dashboard
β”‚       β”‚   β”œβ”€β”€ admin-dashboard.tsx     # Analytics dashboard
β”‚       β”‚   β”œβ”€β”€ admin-login.tsx         # Magic link auth
β”‚       β”‚   β”œβ”€β”€ coverage-maps.tsx       # Network coverage
β”‚       β”‚   β”œβ”€β”€ voice-helper.tsx        # Voice instructions
β”‚       β”‚   └── ...
β”‚       β”œβ”€β”€ pages/
β”‚       β”‚   β”œβ”€β”€ home.tsx       # Landing page
β”‚       β”‚   β”œβ”€β”€ admin.tsx      # Admin portal
β”‚       β”‚   β”œβ”€β”€ coverage-maps.tsx  # Coverage analysis page
β”‚       β”‚   └── analytics.tsx  # Public analytics
β”‚       β”œβ”€β”€ lib/
β”‚       β”‚   β”œβ”€β”€ queryClient.ts # TanStack Query setup
β”‚       β”‚   β”œβ”€β”€ firebase.ts    # Firebase client
β”‚       β”‚   └── utils.ts       # Utilities
β”‚       └── App.tsx
β”‚
β”œβ”€β”€ server/                     # Backend Express application
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ gemini.ts          # AI device analysis
β”‚   β”‚   β”œβ”€β”€ elevenlabs.ts      # Voice synthesis
β”‚   β”‚   β”œβ”€β”€ coverage-analyzer.ts   # Network coverage AI
β”‚   β”‚   β”œβ”€β”€ issue-analyzer.ts  # Problem classification
β”‚   β”‚   β”œβ”€β”€ email-insights.ts  # Monthly email reports
β”‚   β”‚   β”œβ”€β”€ resend.ts          # Magic link emails
β”‚   β”‚   └── firebase-admin.ts  # Push notifications
β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   └── enhanced-rate-limit.ts  # Tiered rate limiting
β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   └── pdf-generator.ts   # Policy PDF generation
β”‚   β”œβ”€β”€ storage.ts             # Database operations (Drizzle)
β”‚   β”œβ”€β”€ routes.ts              # API route handlers
β”‚   β”œβ”€β”€ db.ts                  # Database connection
β”‚   β”œβ”€β”€ vite.ts                # Frontend serving
β”‚   └── index.ts               # Server entry point
β”‚
β”œβ”€β”€ shared/
β”‚   └── schema.ts              # Database schema (Drizzle ORM)
β”‚
β”œβ”€β”€ migrations/                # Database migrations
β”œβ”€β”€ docs/                      # Additional documentation
β”‚   β”œβ”€β”€ CONTRIBUTING.md
β”‚   β”œβ”€β”€ SECURITY_ANALYSIS.md
β”‚   └── ...
β”‚
β”œβ”€β”€ package.json
β”œβ”€β”€ drizzle.config.ts          # Database config
β”œβ”€β”€ vite.config.ts             # Frontend build config
β”œβ”€β”€ tailwind.config.ts         # Styling config
β”œβ”€β”€ tsconfig.json              # TypeScript config
β”œβ”€β”€ .env                       # Environment variables
β”œβ”€β”€ .gitignore
└── README.md

πŸ’» Development Guide

Running the Application

# Development mode (hot reload)
npm run dev

# Production build
npm run build
npm start

# Database operations
npm run db:push          # Apply schema changes
npm run db:studio        # Open Drizzle Studio GUI
npm run db:generate      # Generate migrations

Database Schema Management

The application uses Drizzle ORM with push-based schema updates:

# 1. Edit schema in shared/schema.ts
# 2. Push changes to database
npm run db:push

# 3. For breaking changes, use force push (careful!)
npm run db:push --force

Main Tables:

  • imei_searches - IMEI analysis records
  • users - Registered users for email insights
  • api_keys - API authentication
  • blacklisted_imeis - Blocked devices
  • nps_responses - User feedback (NEW)
  • admin_access_requests - Auth audit trail (NEW)

Adding New Features

  1. Update Database Schema

    // shared/schema.ts
    export const newFeature = pgTable('new_feature', {
      id: serial('id').primaryKey(),
      name: text('name').notNull(),
      createdAt: timestamp('created_at').defaultNow()
    });
  2. Update Storage Interface

    // server/storage.ts
    interface IStorage {
      // Add new methods
      createFeature(data: NewFeature): Promise<Feature>;
      getFeatures(): Promise<Feature[]>;
    }
  3. Add API Route

    // server/routes.ts
    app.post('/api/features', async (req, res) => {
      const data = await storage.createFeature(req.body);
      res.json(data);
    });
  4. Create Frontend Component

    // client/src/components/feature.tsx
    export default function Feature() {
      const { data } = useQuery({ queryKey: ['/api/features'] });
      return <div>{/* Component JSX */}</div>;
    }

Testing API Endpoints

# Test IMEI analysis
curl -X POST http://localhost:5000/api/check \
  -H "Content-Type: application/json" \
  -d '{"imei":"123456789012345","network":"AT&T","accept_policy":true}'

# Test NPS submission
curl -X POST http://localhost:5000/api/nps/submit \
  -H "Content-Type: application/json" \
  -d '{"searchId":1,"rating":9,"feedback":"Excellent!"}'

# Test coverage analysis
curl -X POST http://localhost:5000/api/coverage/analyze \
  -H "Content-Type: application/json" \
  -d '{"lat":40.7128,"lng":-74.0060,"provider":"auto"}'

Code Style

  • TypeScript: Strict mode enabled
  • Prettier: Auto-formatting on save
  • ESLint: Follow configured rules
  • Naming: camelCase for variables, PascalCase for components
  • Git Commits: Conventional commits format

πŸš€ Deployment

Production Environment Variables

NODE_ENV="production"
DATABASE_URL="postgresql://user:pass@production-db.com:5432/prod"
SESSION_SECRET="<generate-strong-random-string>"

# Update all API keys with production credentials
GEMINI_API_KEY="prod_key_..."
RESEND_API_KEY="prod_key_..."
# ... etc

Build & Deploy

# 1. Install dependencies
npm ci

# 2. Build application
npm run build

# 3. Run database migrations
npm run db:push

# 4. Start production server
npm start

Deployment Platforms

Replit (Recommended)

  • βœ… Automatic deployment on push
  • βœ… Built-in PostgreSQL database
  • βœ… Environment variable management
  • βœ… Domain configuration included
  • βœ… One-click publishing

Vercel

vercel deploy --prod

Heroku

git push heroku main
heroku run npm run db:push

Docker

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY . .
RUN npm run build
CMD ["npm", "start"]

Health Checks

GET /api/health

Response:

{
  "status": "healthy",
  "database": "connected",
  "timestamp": "2025-01-30T12:00:00Z"
}

πŸ“– Additional Documentation


🀝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Quick Contribution Steps

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

Development Workflow

  • Use conventional commits
  • Add tests for new features
  • Update documentation
  • Ensure all checks pass

πŸ“ License

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


πŸ™ Acknowledgments

  • Google Gemini - AI-powered device identification
  • ElevenLabs - High-quality voice synthesis
  • Resend - Reliable email delivery
  • Firebase - Real-time notifications
  • Neon - Serverless PostgreSQL
  • Shadcn/ui - Beautiful UI components
  • Drizzle ORM - Type-safe database operations

πŸ“ž Support

  • Email: rbm@dotmobile.app
  • Documentation: See docs/ folder for additional guides
  • Issues: Report issues via GitHub Issues after repository is published

πŸ—ΊοΈ Roadmap

Q1 2025

  • NPS feedback system
  • Enhanced admin authentication
  • Multilingual voice support
  • Real-time WebSocket updates
  • Advanced analytics dashboard

Q2 2025

  • Mobile app (React Native)
  • Advanced reporting
  • Custom branding options
  • Enterprise tier

Future

  • GraphQL API
  • Real-time collaboration
  • Predictive analytics
  • IoT device support

Made with ❀️ by Data On Tap Inc.

Last updated: January 2025

About

Just a device multi network connectivity insights API service tool based on any phone serial number anywhere in the world.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages