Skip to content

julianthant/sonexa-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎀 Sonexa AI - Voice Transcription SaaS Platform

License: MIT Spring Boot Java React Docker

Intelligent voice transcription platform with AI-powered processing, team collaboration, and advanced email verification


πŸš€ Quick Start

# 1. Clone the repository
git clone https://github.com/julianthant/sonexa-ai.git
cd sonexa-ai

# 2. Set up development environment
./dev.bat

# 3. Access the application
Frontend: http://localhost:3000
Backend: http://localhost:8080

πŸ“‹ Table of Contents


🎯 Overview

Sonexa AI is a comprehensive voice transcription SaaS platform that allows users to send voice messages via email and receive accurate transcriptions through advanced AI processing. The platform now features team collaboration, organization management, enhanced email verification, and a productivity-focused dashboard.

πŸ“Š Current Development Status (Updated: July 2025)

Backend Core: 🟒 100% Complete Frontend Architecture: 🟒 100% Complete Server-Side Rendering: 🟒 100% Complete Component Organization: 🟒 100% Complete Security Updates: 🟒 100% Complete

  • βœ… Spring Boot 3.3.13 application structure
  • βœ… JWT Authentication & Security
  • βœ… User management with role-based access
  • βœ… Email voice processing framework
  • βœ… Database entities & repositories
  • βœ… Next.js 14.2.30 with App Router
  • βœ… Server-side rendering optimization
  • βœ… Component architecture cleanup
  • βœ… Security vulnerability fixes
  • 🟑 AI integration (in progress)
  • 🟑 Stripe payment processing (in progress)

Development Workflow: 🟒 100% Complete

  • βœ… Professional Git branching strategy (GitFlow)
  • βœ… 8 organized feature branches for parallel development
  • βœ… Manual Git workflow with AI-assisted documentation
  • βœ… Comprehensive .gitignore configuration
  • βœ… Documentation maintenance process (manual updates)

Security & Configuration: 🟒 100% Complete

  • βœ… Environment files properly excluded from version control
  • βœ… VS Code workspace configuration
  • βœ… Docker development environment
  • βœ… Security vulnerabilities patched (Azure Identity updated)
  • βœ… Package structure corrections applied

🎯 Latest Updates (July 2025 - Just Completed)

πŸš€ Major Backend Refactoring & Fixes

  • βœ… Package Structure Correction: Fixed main application package from com.sonexa to com.sonexa.backend
  • βœ… Security Updates: Updated Azure Identity dependency from 1.10.1 to 1.13.0 (fixed security vulnerability)
  • βœ… Service Layer Reconstruction: Completely rebuilt SettingsService with proper method signatures
  • βœ… Controller Integration: Fixed all controller-service dependencies and method calls
  • βœ… Duplicate File Cleanup: Removed all *_new.java duplicate files
  • βœ… Import Optimization: Cleaned up unused imports across all backend files

🎨 Frontend Architecture Optimization

  • βœ… Server-Side Rendering: Converted pages to server-side rendering for better performance
  • βœ… Component Separation: Clear separation between server and client components
  • βœ… Next.js Best Practices: Implemented proper Next.js 14+ patterns
  • βœ… Performance Optimization: Reduced client-side JavaScript bundle size

🧹 Component Library Cleanup

  • βœ… Removed 15+ Unused Component Directories: Eliminated redundant and unused components
    • analytics/, csv-upload/, dashboard/, email-verification/, excel-upload/
    • home/, voice-archive/, voice-upload/, collaboration/, subscription/
    • settings/, organizations/, company/, upload/, voice/
  • βœ… Retained Essential Components: Kept only actively used components
    • activities/, auth/, chat/, help/, layout/, ui/, verification/
  • βœ… Clean Build Process: Verified successful builds after cleanup

οΏ½ Development Achievements (July 2025 Session)

🎯 Performance & Architecture

  • βœ… Zero Compilation Errors: Backend compiles cleanly without warnings
  • βœ… Frontend Build Success: All pages render correctly with SSR
  • βœ… Package Structure: Professional Java package organization
  • βœ… Dependency Management: Updated all security-critical dependencies

πŸ“ˆ Code Quality Improvements

  • βœ… Service Layer Reconstruction: Complete rebuild of SettingsService
  • βœ… Method Signature Alignment: Fixed all controller-service integration issues
  • βœ… Import Optimization: Cleaned up unused imports across codebase
  • βœ… Type Safety: Enhanced TypeScript usage in frontend components

🧹 Codebase Optimization

  • βœ… Component Count: Reduced from 30+ to 15 essential components (-50%)
  • βœ… File Organization: Removed all duplicate *_new.java files
  • βœ… Build Performance: Faster compilation due to reduced component tree
  • βœ… Maintenance: Cleaner structure for future development

πŸ”’ Security & Compliance

  • βœ… Vulnerability Fixes: Azure Identity security update applied
  • βœ… Authentication: JWT implementation verified and tested
  • βœ… Package Security: All dependencies updated to latest stable versions

οΏ½πŸŽͺ Live Demo

  • Demo URL: https://demo.sonexa.ai (Coming Soon)
  • Admin Dashboard: https://admin.sonexa.ai (Coming Soon)

πŸ”‘ Key Differentiators

  • Email-based ingestion: Send voice messages to custom email addresses
  • Tiered AI processing: Different AI models based on subscription level
  • Complete audit trail: Every message tracked, nothing deleted
  • Smart duplicate detection: Audio fingerprinting prevents spam
  • Cost-optimized: Uses free GitHub Student Pack resources efficiently

✨ Features

🎡 Voice Processing

  • βœ… Email-based voice message ingestion
  • βœ… Multi-format audio support (MP3, WAV, M4A, OGG)
  • βœ… Azure Blob Storage integration
  • βœ… Audio quality validation
  • βœ… Duplicate detection via audio fingerprinting
  • βœ… Real-time processing notifications
  • βœ… Team collaboration voice messages

πŸ€– AI & Intelligence

  • βœ… Multi-tier AI processing
    • Free: Basic local analysis
    • Premium: Azure Speech + OpenAI GPT-4
    • Enterprise: Custom AI pipelines
  • βœ… Intelligent spam detection
  • βœ… Content safety filtering
  • βœ… Confidence scoring
  • βœ… Language detection
  • ❌ Sentiment analysis
  • ❌ Speaker identification

🏒 Organization Management

  • βœ… Create and manage organizations
  • βœ… Team invite system with unique codes
  • βœ… Role-based permissions (OWNER, ADMIN, MEMBER)
  • βœ… Organization discovery and joining
  • βœ… Member management and removal

οΏ½ Enhanced Email Security

  • βœ… 6-digit verification codes for new senders
  • βœ… Activities-based verification workflow
  • βœ… Modal verification interface
  • βœ… Automatic email processing for verified domains
  • βœ… Security activity tracking

οΏ½πŸ’³ Subscription & Billing

  • 🟑 Stripe payment integration
  • βœ… Multiple subscription tiers
    • πŸ†“ Free: 5 messages/month
    • πŸ’Ό Basic: 100 messages/month ($19.99)
    • ⭐ Premium: 1000 messages/month ($79.99)
    • 🏒 Enterprise: Unlimited ($299.99)
  • βœ… Usage tracking and limits
  • βœ… Cost optimization
  • ❌ Invoice generation
  • ❌ Usage analytics dashboard

πŸ›‘οΈ Security & Compliance

  • βœ… JWT-based authentication
  • βœ… Role-based access control (RBAC)
  • βœ… Rate limiting and DDoS protection

πŸ†• New Features

πŸ“Š Productivity Dashboard

  • Actions Panel: Streamlined action buttons (renamed from "Quick Actions")
  • Productivity Center: Replaced recent activities with:
    • Today's Summary with transcription metrics
    • System Health monitoring
    • Storage usage overview
    • Quick statistics cards

🏒 Organization System

  • Create Organizations: Users can create and manage organizations
  • Team Invites: Generate unique invite codes for team members
  • Role Management: Three-tier permission system (Owner, Admin, Member)
  • Organization Discovery: Browse and join existing organizations

πŸ”’ Advanced Email Verification

  • 6-Digit Verification: New senders receive verification codes
  • Activities Integration: Verification requests appear in activities feed
  • Modal Interface: Centered verification modal for code entry
  • Automated Processing: Verified domains bypass future verification

πŸ‘₯ Team Collaboration

  • Teams-First View: Organization list as primary interface
  • Voice Message Sharing: Team-based voice message collaboration
  • Organization Navigation: Easy switching between teams
  • Collaborative Workspace: Shared voice message processing

βš™οΈ Settings Improvements

  • Streamlined Interface: Removed redundant email verification tab
  • Voice Configuration: Dedicated voice processing settings
  • Organization Settings: Team and invite management
  • Security Settings: Enhanced verification controls

🏒 Organization Management

🎯 Overview

The organization system enables teams to collaborate on voice message processing with role-based permissions and secure invite workflows.

✨ Key Features

Organization Creation

  • Create new organizations with custom names
  • Automatic owner role assignment
  • Unique organization identifiers
  • Immediate organization dashboard access

Team Invites

  • Generate unique 8-character invite codes
  • Share codes via email or direct links
  • Code expiration and security controls
  • Role assignment upon joining

Role-Based Permissions

OWNER
β”œβ”€β”€ Full organization management
β”œβ”€β”€ Member role changes
β”œβ”€β”€ Organization deletion
└── All admin/member permissions

ADMIN
β”œβ”€β”€ Invite new members
β”œβ”€β”€ Remove members (except owners)
β”œβ”€β”€ Manage organization settings
└── All member permissions

MEMBER
β”œβ”€β”€ View organization details
β”œβ”€β”€ Access shared voice messages
└── Participate in collaboration

Organization Discovery

  • Browse public organizations
  • Search by name or category
  • Join via invite codes
  • Organization member counts and activity

οΏ½ Technical Implementation

Backend Models

  • Organization.java: Core organization entity
  • OrganizationMember.java: Member relationships and roles
  • OrganizationRole.java: Permission enumeration

REST Endpoints

POST   /api/organizations              # Create organization
GET    /api/organizations              # List user organizations
GET    /api/organizations/{id}         # Get organization details
POST   /api/organizations/{id}/invite  # Generate invite code
POST   /api/organizations/join/{code}  # Join via invite code
DELETE /api/organizations/{id}/members/{userId} # Remove member

πŸ” Email Verification System

🎯 Overview

Enhanced email security system that requires verification for new senders before processing voice messages, integrated with the activities feed and modal interface.

✨ Key Features

6-Digit Verification Workflow

  • New email senders receive verification codes
  • Codes expire after configurable time period
  • Single-use verification for security
  • Automatic email processing post-verification

Activities Integration

  • Verification requests appear in activities feed
  • Clear visual indicators for pending verifications
  • Real-time activity updates
  • Historical verification tracking

Modal Verification Interface

  • Centered modal for code entry
  • Real-time validation feedback
  • Error handling and retry logic
  • Success confirmation and redirect

Security Features

  • Rate limiting on verification attempts
  • Suspicious activity detection
  • Automatic blacklisting for abuse
  • Comprehensive audit logging

πŸ”§ Technical Implementation

Backend Models

EmailVerification.java
β”œβ”€β”€ verificationCode: String (6 digits)
β”œβ”€β”€ senderEmail: String
β”œβ”€β”€ recipientUserId: UUID
β”œβ”€β”€ status: VerificationStatus
β”œβ”€β”€ expiresAt: LocalDateTime
└── createdAt: LocalDateTime

VerificationStatus.java
β”œβ”€β”€ PENDING
β”œβ”€β”€ VERIFIED
β”œβ”€β”€ EXPIRED
└── FAILED

REST Endpoints

POST   /api/email-verification/send     # Send verification code
POST   /api/email-verification/verify   # Verify code
GET    /api/email-verification/status   # Check verification status
DELETE /api/email-verification/{id}     # Cancel verification

Frontend Components

  • VerificationModal.tsx: Centered verification interface
  • ActivitiesClient.tsx: Activities feed with verification integration
  • Real-time status updates via state management

πŸ—οΈ Architecture

πŸ–₯️ System Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Email     │───▢│  Sonexa AI  │───▢│   Excel     β”‚
β”‚  Gateway    β”‚    β”‚  Platform   β”‚    β”‚  Export     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚                   β”‚                   β”‚
       β–Ό                   β–Ό                   β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Gmail     β”‚    β”‚  Azure AI   β”‚    β”‚ User Portal β”‚
β”‚ Integration β”‚    β”‚ Processing  β”‚    β”‚ Dashboard   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ”§ Technology Stack (Updated: July 2025)

Backend

  • Framework: Spring Boot 3.3.13 (updated from 3.2.0)
  • Language: Java 17 (optimized for compatibility)
  • Database: PostgreSQL 15 (production), H2 (development)
  • Authentication: JWT + Spring Security
  • API Documentation: OpenAPI 3.0 (Swagger)
  • Package Structure: Corrected to com.sonexa organization
  • Security: Azure Identity 1.13.0 (vulnerability fixed)

Frontend

  • Framework: React 18 + Next.js 14.2.30 (updated)
  • Language: TypeScript
  • Rendering: Server-Side Rendering (SSR) optimized
  • Styling: Tailwind CSS + ShadCN UI components
  • State Management: Zustand for authentication
  • Component Architecture: Clean server/client separation
  • Bundle Optimization: Reduced JavaScript payload

AI & Processing

  • Speech-to-Text: Azure Speech Services
  • Advanced AI: OpenAI GPT-4
  • Content Moderation: Azure Content Moderator
  • Storage: Azure Blob Storage

DevOps & Infrastructure

  • Containerization: Docker + Docker Compose
  • Build System: Maven (backend), npm (frontend)
  • Environment: H2 for development, PostgreSQL for production
  • Monitoring: Spring Boot Actuator
  • Logging: SLF4J + Logback

Payment & Billing

  • Payment Processing: Stripe (in progress)
  • Subscription Management: Custom implementation
  • Invoice Generation: Stripe Billing

πŸš€ Getting Started

πŸ“‹ Prerequisites

πŸ› οΈ Local Development Setup

  1. Clone and Setup

    git clone https://github.com/julianthant/sonexa-ai.git
    cd sonexa-ai
  2. Environment Configuration

    # Backend configuration
    cp backend/src/main/resources/application-dev.properties.template backend/src/main/resources/application-dev.properties
    
    # Frontend configuration
    cp frontend/.env.local.template frontend/.env.local
    
    # Edit with your configuration
    notepad backend/src/main/resources/application-dev.properties
    notepad frontend/.env.local
  3. Start Development Environment

    # Windows - starts both frontend and backend
    ./dev.bat
    
    # This starts:
    # - PostgreSQL database (port 5432)
    # - Spring Boot application (port 8080)
    # - Next.js frontend (port 3000)
    # - Redis for rate limiting (port 6379)
  4. Verify Installation

    # Backend health check
    curl http://localhost:8080/actuator/health
    
    # Frontend access
    http://localhost:3000
    
    # API documentation
    http://localhost:8080/swagger-ui.html

🎯 Development Scripts (Windows)

The project includes convenient batch scripts for development:

# Run backend only
backend.bat     # Starts Spring Boot application on port 8080

# Run frontend only
frontend.bat    # Starts Next.js development server on port 3000

# Docker development environment
docker-compose -f docker-compose.dev.yml up

Script Features:

  • Automatic dependency management
  • Environment variable loading
  • Live reload for development
  • Integrated error handling

πŸ”‘ Required Environment Variables

# Database
SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/sonexa_ai
SPRING_DATASOURCE_USERNAME=sonexa_user
SPRING_DATASOURCE_PASSWORD=your_password

# Azure Services (from GitHub Student Pack)
AZURE_SPEECH_SUBSCRIPTION_KEY=your_azure_speech_key
AZURE_SPEECH_REGION=your_region
AZURE_STORAGE_CONNECTION_STRING=your_azure_storage_connection

# Stripe (for payments)
STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret

# OpenAI (for advanced AI features)
OPENAI_API_KEY=sk-your_openai_api_key

# JWT Security
JWT_SECRET=your_jwt_secret_key_here
JWT_EXPIRATION=86400000

# Email Configuration
SPRING_MAIL_HOST=smtp.gmail.com
SPRING_MAIL_USERNAME=your_email@gmail.com
SPRING_MAIL_PASSWORD=your_app_password

πŸ“š API Documentation

πŸ” Authentication Endpoints

Method Endpoint Description
POST /api/auth/register Register new user
POST /api/auth/authenticate User login
GET /api/auth/profile Get user profile

🏒 Organization Endpoints

Method Endpoint Description
POST /api/organizations Create new organization
GET /api/organizations List user's organizations
GET /api/organizations/{id} Get organization details
PUT /api/organizations/{id} Update organization
DELETE /api/organizations/{id} Delete organization
POST /api/organizations/{id}/invite Generate invite code
POST /api/organizations/join/{code} Join organization via code
GET /api/organizations/{id}/members List organization members
DELETE /api/organizations/{id}/members/{userId} Remove member

πŸ” Email Verification Endpoints

Method Endpoint Description
POST /api/email-verification/send Send verification code
POST /api/email-verification/verify Verify 6-digit code
GET /api/email-verification/status Check verification status
DELETE /api/email-verification/{id} Cancel verification request

🎡 Voice Processing Endpoints

Method Endpoint Description
POST /api/voice/email-upload Process email voice message
GET /api/voice/user/{email} Get user's voice files
GET /api/voice/{id} Get specific voice file
DELETE /api/voice/{id} Delete voice file

πŸ’³ Subscription Endpoints

Method Endpoint Description
GET /api/subscription/tiers Get available subscription tiers
POST /api/subscription/create Create new subscription
GET /api/subscription/usage/{email} Get user's current usage
POST /api/stripe/webhook Stripe webhook handler

πŸ“Š Analytics Endpoints

Method Endpoint Description
GET /api/analytics/stats Get processing statistics
GET /api/analytics/costs Get cost breakdown
GET /api/analytics/rejections Get rejection reasons

πŸ“– Example API Usage

Register a new user:

curl -X POST http://localhost:8080/api/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "username": "johndoe",
    "email": "john@company.com",
    "password": "securePassword123"
  }'

Process email voice message:

curl -X POST http://localhost:8080/api/voice/email-upload \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_jwt_token" \
  -d '{
    "to": "john@voice.sonexa.ai",
    "from": "customer@company.com",
    "subject": "Voice message",
    "body": "Please transcribe this message",
    "attachments": [{
      "filename": "voice.mp3",
      "contentType": "audio/mpeg",
      "content": "base64_encoded_audio_data",
      "size": 2048576
    }]
  }'

πŸ—„οΈ Database Schema

πŸ“Š Core Entities

Users Table

CREATE TABLE users (
    id UUID PRIMARY KEY,
    username VARCHAR(50) UNIQUE NOT NULL,
    email VARCHAR(100) UNIQUE NOT NULL,
    password_hash VARCHAR(255) NOT NULL,
    custom_voice_email VARCHAR(100) UNIQUE,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

Voice Files Table

CREATE TABLE voice_files (
    id UUID PRIMARY KEY,
    original_filename VARCHAR(255) NOT NULL,
    content_type VARCHAR(100) NOT NULL,
    file_size BIGINT NOT NULL,
    azure_blob_url VARCHAR(500) NOT NULL,
    user_email VARCHAR(100) NOT NULL,
    sender_email VARCHAR(100),
    email_subject VARCHAR(255),
    email_body TEXT,
    upload_source VARCHAR(50) NOT NULL,
    transcription_status VARCHAR(50) NOT NULL,
    transcription_text TEXT,
    ai_confidence_score DECIMAL(3,2),
    ai_analysis_details TEXT,
    audio_fingerprint VARCHAR(64),
    user_subscription_tier VARCHAR(20),
    processing_cost DECIMAL(10,4),
    uploaded_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    processed_at TIMESTAMP,
    transcribed_at TIMESTAMP
);

User Subscriptions Table

CREATE TABLE user_subscriptions (
    id UUID PRIMARY KEY,
    user_email VARCHAR(100) NOT NULL,
    tier VARCHAR(20) NOT NULL,
    stripe_customer_id VARCHAR(100),
    stripe_subscription_id VARCHAR(100),
    status VARCHAR(20) NOT NULL,
    current_month_usage INTEGER DEFAULT 0,
    subscription_start_date TIMESTAMP,
    next_billing_date TIMESTAMP,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

Organizations Table

CREATE TABLE organizations (
    id UUID PRIMARY KEY,
    name VARCHAR(100) NOT NULL,
    description TEXT,
    invite_code VARCHAR(8) UNIQUE NOT NULL,
    created_by_user_id UUID NOT NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

Organization Members Table

CREATE TABLE organization_members (
    id UUID PRIMARY KEY,
    organization_id UUID NOT NULL,
    user_id UUID NOT NULL,
    role VARCHAR(20) NOT NULL,
    joined_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    UNIQUE(organization_id, user_id),
    FOREIGN KEY (organization_id) REFERENCES organizations(id) ON DELETE CASCADE
);

Email Verifications Table

CREATE TABLE email_verifications (
    id UUID PRIMARY KEY,
    verification_code VARCHAR(6) NOT NULL,
    sender_email VARCHAR(100) NOT NULL,
    recipient_user_id UUID NOT NULL,
    status VARCHAR(20) NOT NULL,
    expires_at TIMESTAMP NOT NULL,
    verified_at TIMESTAMP,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

πŸ” Key Indexes

-- Performance indexes
CREATE INDEX idx_voice_files_user_email ON voice_files(user_email);
CREATE INDEX idx_voice_files_status ON voice_files(transcription_status);
CREATE INDEX idx_voice_files_uploaded_at ON voice_files(uploaded_at);
CREATE INDEX idx_voice_files_fingerprint ON voice_files(audio_fingerprint);
CREATE INDEX idx_subscriptions_user_email ON user_subscriptions(user_email);
CREATE INDEX idx_organization_members_org_id ON organization_members(organization_id);
CREATE INDEX idx_organization_members_user_id ON organization_members(user_id);
CREATE INDEX idx_email_verifications_sender ON email_verifications(sender_email);
CREATE INDEX idx_email_verifications_status ON email_verifications(status);
CREATE INDEX idx_organizations_invite_code ON organizations(invite_code);

πŸ’Ž Subscription Tiers

Feature Free Basic Premium Enterprise
Monthly Messages 5 100 1,000 Unlimited
Price $0 $19.99 $79.99 $299.99
AI Processing Basic Local Azure Speech Multi-Model AI Custom Pipeline
Processing Speed Standard Standard Priority Queue Dedicated Resources
Audio Quality Standard Enhanced High Fidelity Studio Quality
Duplicate Detection File Hash Basic Fingerprint Semantic Analysis Advanced ML
Custom Email Domain ❌ ❌ βœ… βœ…
API Access ❌ ❌ ❌ βœ…
Business Intelligence ❌ ❌ βœ… βœ…
Support Community Email Priority Email Dedicated Manager
SLA None 99% 99.5% 99.9%

πŸ’° Cost Optimization Strategy

Free Tier (GitHub Student Pack)

  • Local audio analysis: $0
  • Azure Speech (5 hours/month): $0
  • Basic duplicate detection: $0
  • Total Cost: $0

Premium Tier Cost Analysis

  • Azure Speech Services: ~$0.008/message
  • OpenAI GPT-4: ~$0.02/message (20% of messages)
  • Advanced processing: ~$0.005/message
  • Average Cost: ~$0.015/message
  • Revenue: $79.99/1000 = $0.08/message
  • Profit Margin: 81%

πŸ€– AI Processing Pipeline

πŸ”„ Processing Flow

graph TD
    A[Email Received] --> B[Extract Audio]
    B --> C[Validate Format]
    C --> D[Upload to Azure Blob]
    D --> E[Generate Audio Fingerprint]
    E --> F[Check Duplicates]
    F --> G[Determine AI Tier]
    G --> H{Subscription Level}
    H -->|Free| I[Local Analysis]
    H -->|Basic| J[Azure Speech]
    H -->|Premium| K[Multi-Model AI]
    H -->|Enterprise| L[Custom Pipeline]
    I --> M[Make Decision]
    J --> M
    K --> M
    L --> M
    M --> N{Approve/Reject}
    N -->|Approve| O[Transcribe]
    N -->|Reject| P[Detailed Rejection]
    N -->|Uncertain| Q[Manual Review]
    O --> R[Add to Excel]
    P --> S[Notify User]
    Q --> T[Admin Dashboard]
Loading

🎯 AI Decision Matrix

Criteria Weight Free Tier Premium Tier
Speech Quality 30% Basic threshold Advanced analysis
Content Safety 25% Keyword filter AI content moderation
Duplicate Detection 20% File hash Semantic similarity
Spam Detection 15% Pattern matching ML classification
Language Detection 10% Basic rules Multi-language AI

πŸ“Š Confidence Scoring

// Example confidence calculation
double finalConfidence =
    (speechQuality * 0.3) +
    (contentSafety * 0.25) +
    (duplicateScore * 0.2) +
    (spamScore * 0.15) +
    (languageConfidence * 0.1);

if (finalConfidence > 0.8) {
    status = APPROVED;
} else if (finalConfidence < 0.3) {
    status = REJECTED;
} else {
    status = QUARANTINED_FOR_REVIEW;
}

πŸ”„ Development Workflow

🌳 Git Branching Strategy

We use GitFlow for professional development with manual Git operations:

main (production)
β”œβ”€β”€ develop (integration)
β”‚   β”œβ”€β”€ feature/stripe-integration          # Payment processing & billing
β”‚   β”œβ”€β”€ feature/ai-processing              # Azure AI + OpenAI integration
β”‚   β”œβ”€β”€ feature/subscription-management    # User subscriptions & tiers
β”‚   β”œβ”€β”€ feature/email-voice-enhancement    # Email processing improvements
β”‚   β”œβ”€β”€ feature/user-authentication        # Auth system enhancements
β”‚   β”œβ”€β”€ feature/frontend-dashboard         # React/Next.js user interface
β”‚   β”œβ”€β”€ feature/analytics-reporting        # Business intelligence
β”‚   β”œβ”€β”€ feature/security-hardening         # Production security
β”‚   └── feature/deployment-automation      # CI/CD & Docker optimization
β”œβ”€β”€ hotfix/critical-fixes
└── release/v1.0.0

🎯 Feature Branch Strategy

πŸ”₯ Phase 1: Core Business Logic (High Priority)

  • πŸ’³ feature/stripe-integration - Complete payment processing, webhooks, subscription billing
  • πŸ‘€ feature/subscription-management - User subscription tiers, usage tracking, plan management
  • πŸ€– feature/ai-processing - Azure Speech Services + OpenAI integration

⭐ Phase 2: User Experience & Enhancement (Medium Priority)

  • βœ‰οΈ feature/email-voice-enhancement - Gmail integration, attachment processing, notifications
  • πŸ” feature/user-authentication - Enhanced auth features, password reset, profile management
  • πŸ–₯️ feature/frontend-dashboard - React/Next.js user interface, admin panel

πŸ“Š Phase 3: Analytics & Production (Lower Priority)

  • πŸ“ˆ feature/analytics-reporting - Business intelligence, cost tracking, usage reports
  • πŸ›‘οΈ feature/security-hardening - Enterprise security, rate limiting, compliance
  • πŸš€ feature/deployment-automation - CI/CD pipelines, Docker optimization, monitoring

🎯 Current Active Branch: develop (integration & testing)

πŸš€ Manual Workflow

# Create new feature branch
git checkout develop
git pull origin develop
git checkout -b feature/your-feature-name

# Work on feature (commit as needed)
git add .
git commit -m "feat: add your feature"

# Merge when complete
git checkout develop
git pull origin develop
git merge feature/your-feature-name --no-ff
git push origin develop

# Clean up
git branch -d feature/your-feature-name

πŸ“ Commit Standards

We follow Conventional Commits:

feat(auth): add JWT refresh token mechanism
fix(email): resolve attachment timeout issue
docs(api): update endpoint documentation
test(voice): add integration tests for processing
chore(deps): update Spring Boot to 3.2.0

🚒 Deployment

🐳 Docker Deployment

Development:

docker-compose -f docker-compose.dev.yml up

Production:

docker-compose -f docker-compose.prod.yml up -d

☁️ Cloud Deployment

Azure Container Instances:

# Build and push
docker build -t sonexa-ai:latest .
docker tag sonexa-ai:latest youracr.azurecr.io/sonexa-ai:latest
docker push youracr.azurecr.io/sonexa-ai:latest

# Deploy
az container create \
  --resource-group sonexa-ai-rg \
  --name sonexa-ai-app \
  --image youracr.azurecr.io/sonexa-ai:latest \
  --dns-name-label sonexa-ai \
  --ports 8080

AWS ECS:

# Using AWS CLI
aws ecs create-service \
  --cluster sonexa-ai-cluster \
  --service-name sonexa-ai-service \
  --task-definition sonexa-ai:1 \
  --desired-count 2

πŸ“Š Monitoring & Health Checks

Health Endpoints:

  • Application: http://localhost:8080/actuator/health
  • Database: http://localhost:8080/actuator/health/db
  • Disk Space: http://localhost:8080/actuator/health/diskSpace

Metrics:

  • Prometheus: http://localhost:8080/actuator/prometheus
  • Application Metrics: http://localhost:8080/actuator/metrics

πŸ“ˆ Roadmap

🎯 Current Version (v1.0)

  • βœ… Core voice processing pipeline
  • βœ… Email integration
  • βœ… Basic AI analysis
  • βœ… User authentication
  • βœ… Subscription tiers
  • 🟑 Stripe integration

πŸš€ Next Release (v1.1)

  • ❌ Frontend React dashboard
  • ❌ Real-time processing notifications
  • ❌ Advanced AI with OpenAI
  • ❌ Business intelligence analytics
  • ❌ Mobile app for voice uploads

🌟 Future Versions (v2.0+)

  • ❌ Multi-language support
  • ❌ Speaker identification
  • ❌ Voice emotion analysis
  • ❌ Integration marketplace (Slack, Teams, etc.)
  • ❌ White-label solutions
  • ❌ Enterprise SSO integration

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

πŸš€ Quick Start for Contributors

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes following our coding standards
  4. Add tests for new functionality
  5. Run the test suite: mvn test
  6. Commit your changes: git commit -m 'feat: add amazing feature'
  7. Push to your fork: git push origin feature/amazing-feature
  8. Create a Pull Request

πŸ“‹ Development Guidelines

  • Code Style: Follow Google Java Style Guide
  • Testing: Minimum 80% test coverage required
  • Documentation: Update README.md for any new features
  • Security: All inputs must be validated and sanitized
  • Performance: Consider cost implications of AI usage

πŸ“„ License

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


πŸ‘₯ Team


πŸ“ž Support


πŸ† Acknowledgments

  • GitHub Student Pack for free Azure credits
  • OpenAI for advanced AI capabilities
  • Stripe for payment processing
  • Spring Boot for the robust framework
  • Azure for cloud infrastructure

Built with ❀️ for developers who love clean code and professional workflows

⭐ Star this repo | πŸ› Report Bug | πŸ’‘ Request Feature

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages