plugins/apps-js/README.md
A comprehensive Node.js server application for AI-powered email management and presentation generation with voice command integration.
git clone https://github.com/yourusername/omisend.git
cd omisend
npm install
.env file in the root directory:# Server Configuration
PORT=3000
NODE_ENV=development
# Database
SUPABASE_URL=your_supabase_url_here
SUPABASE_KEY=your_supabase_anon_key_here
# Redis (Upstash)
UPSTASH_REDIS_HOST=your_redis_host
UPSTASH_REDIS_PASSWORD=your_redis_password
UPSTASH_REDIS_PORT=your_redis_port
# AI Services
OPENAI_API_KEY=your_openai_api_key_here
SLIDESGPT_API_KEY=your_slidesgpt_api_key_here
# Google OAuth (for email features)
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
GOOGLE_REDIRECT_URI=your_redirect_uri
# Security
JWT_SECRET=your_jwt_secret_here
npm run setup-supabase
src/
āāā config/
ā āāā constants.js # Application configuration
āāā controllers/
ā āāā webhookController.js # Webhook request handling
āāā middleware/ # Custom middleware functions
āāā models/
ā āāā intentDetection.js # Voice command pattern matching
ā āāā aiEmailFetcher.js # AI-powered email retrieval
ā āāā aiEmailSender.js # AI-powered email composition
ā āāā enhancedEmailSearch.js # Advanced email search
ā āāā Email.js # Email data model
ā āāā User.js # User data model
āāā routes/
ā āāā auth.js # Authentication endpoints
ā āāā email.js # Email management API
ā āāā deck.js # Presentation generation API
āāā services/
ā āāā authService.js # Authentication services
āāā utils/
āāā dbUtils.js # Database utilities
āāā redisUtils.js # Redis cache management
āāā emailUtils.js # Email processing utilities
āāā deckUtils.js # Presentation utilities
āāā googleAuth.js # Google OAuth integration
āāā supabaseUtils.js # Supabase database utilities
āāā contactUtils.js # Contact management
āāā nameUtils.js # Name resolution utilities
āāā omiUtils.js # Core Omi utilities
āāā mailUtils.js # Mail processing
āāā errorHandler.js # Error handling utilities
public/
āāā index.html # Main web interface
āāā deck.html # Presentation interface
āāā success.html # Success page
āāā style.css # Styling
tests/ # Test suites
server.js # Main application entry point
GET /api/auth/oauth/callback - Google OAuth callbackPOST /api/auth/login - User authenticationGET /api/auth/profile - Get user profilePOST /api/email/send - Send email via voice commandGET /api/email/search - Search emails with AIGET /api/email/fetch - Fetch emails with contextGET /api/email/contacts - Get contact listGET /api/email/summary/:threadId - Get email thread summaryPOST /api/deck/webhook - Process voice commands for presentationsGET /api/deck/status/:presentation_id - Check generation statusGET /api/deck/viewer/:presentation_id - View presentation progressGET /api/deck/history/:session_id - Get presentation historyPOST /webhook - Main webhook endpoint for voice processingGET /health - Health check endpointDevelopment mode:
npm run dev
Production mode:
npm start
Email Commands:
Presentation Commands:
http://localhost:3000http://localhost:3000/decknpm test
# Initialize Supabase tables
npm run setup-supabase
# Test database connection
node tests/test_database.js
The application includes built-in performance monitoring that logs:
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the ISC License - see the LICENSE file for details.
For detailed setup instructions for the presentation system, see PRESENTATION_SETUP.md.
For issues and questions, please open an issue on GitHub.