Skip to content

Repository files navigation

Personal Assistant System

A comprehensive, privacy-focused personal assistant that runs on your EC2 server with cross-platform mobile and desktop apps.

� Features

🏠 Core Functionality

  • Voice & Text Interaction: Natural conversation with voice input/output
  • Smart Task Management: Create, prioritize, and track tasks with AI suggestions
  • Email Assistant: Draft, improve, and send emails with templates
  • Intelligent Notes: Searchable notes with automatic categorization
  • Learning Engine: Continuously learns your preferences and patterns
  • Background Processing: 24/7 operation with smart sync

📱 Cross-Platform Apps

  • Mobile: React Native app for iOS and Android
  • Desktop: Electron app for Windows, macOS, and Linux
  • Web: Progressive Web App accessible from any browser
  • Shared Codebase: 95%+ code reuse across platforms

🔒 Privacy-First Design

  • Local Data: All personal data stays on your EC2 instance
  • Encrypted Communication: Secure API communication
  • No Data Leaks: External AI calls use anonymized data only
  • Full Control: You own and control all your data

📊 Advanced Analytics

  • Performance Monitoring: Real-time system and app metrics
  • User Analytics: Task completion rates, productivity insights
  • System Health: Automated monitoring and alerting
  • Custom Dashboards: Grafana-powered visualizations

� Quick Start

One-Command Deployment

git clone <your-repo>
cd personal-assistant-system
chmod +x deployment/deploy.sh
./deployment/deploy.sh

Manual Setup

  1. Backend (EC2):

    cd ec2-backend
    npm install
    npm run build
    pm2 start ecosystem.config.js
  2. Mobile App:

    cd cross-platform-app
    npm install
    expo start
  3. Monitoring:

    cd monitoring
    docker-compose up -d

📋 System Requirements

EC2 Instance

  • Type: t2.micro (1 vCPU, 1 GB RAM) minimum
  • Storage: 30GB SSD
  • OS: Ubuntu 20.04+ or Amazon Linux 2
  • Network: Security groups configured for HTTP/HTTPS

Development Environment

  • Node.js: 18.0.0+
  • npm: 8.0.0+
  • Expo CLI: Latest
  • Docker: Latest (for monitoring)

🏗️ Architecture

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   Mobile App    │    │   Desktop App   │    │    Web App      │
│  (React Native) │    │   (Electron)    │    │   (React PWA)   │
└─────────┬───────┘    └─────────┬───────┘    └─────────┬───────┘
          │                      │                      │
          └──────────────────────┼──────────────────────┘
                                 │
                    ┌─────────────┴─────────────┐
                    │      API Gateway          │
                    │   (Express + Security)    │
                    └─────────────┬─────────────┘
                                 │
                    ┌─────────────┴─────────────┐
                    │     Backend Services      │
                    │  ┌─────────────────────┐  │
                    │  │   Task Manager      │  │
                    │  │   Email Service     │  │
                    │  │   Learning Engine   │  │
                    │  │   Voice Processor   │  │
                    │  │   Background Jobs   │  │
                    │  └─────────────────────┘  │
                    └─────────────┬─────────────┘
                                 │
                    ┌─────────────┴─────────────┐
                    │     Data Layer            │
                    │  ┌─────────────────────┐  │
                    │  │   SQLite Database   │  │
                    │  │   File Storage      │  │
                    │  │   Cache Layer       │  │
                    │  └─────────────────────┘  │
                    └───────────────────────────┘

📁 Project Structure

personal-assistant-system/
├── ec2-backend/                 # Node.js backend server
│   ├── src/
│   │   ├── config/             # Configuration management
│   │   ├── database/           # Database models and migrations
│   │   ├── middleware/         # Express middleware
│   │   ├── routes/             # API route handlers
│   │   ├── services/           # Business logic services
│   │   ├── jobs/               # Background job processors
│   │   └── utils/              # Utility functions
│   ├── ecosystem.config.js     # PM2 configuration
│   └── package.json
│
├── cross-platform-app/         # React Native cross-platform app
│   ├── src/
│   │   ├── components/         # Reusable UI components
│   │   ├── screens/            # App screens
│   │   ├── navigation/         # Navigation configuration
│   │   ├── services/           # API and device services
│   │   ├── store/              # Redux state management
│   │   └── utils/              # Utility functions
│   ├── app.json               # Expo configuration
│   └── package.json
│
├── monitoring/                 # Monitoring and analytics
│   ├── grafana/               # Grafana dashboards
│   ├── prometheus/            # Prometheus configuration
│   ├── loki/                  # Log aggregation
│   └── docker-compose.yml     # Monitoring stack
│
├── deployment/                 # Deployment scripts and configs
│   ├── deploy.sh              # Automated deployment script
│   ├── nginx.conf             # Nginx configuration
│   └── README.md              # Deployment guide
│
└── .kiro/                     # Project specifications
    └── specs/                 # Detailed requirements and design

🔧 Configuration

Backend Environment (.env)

# Server
NODE_ENV=production
PORT=3001
HOST=0.0.0.0

# Database
DB_PATH=./data/assistant.db

# Security
JWT_SECRET=your-secret-key
BCRYPT_ROUNDS=12

# Email
EMAIL_SERVICE=gmail
EMAIL_USER=your-email@gmail.com
EMAIL_PASSWORD=your-app-password

# AI APIs (Optional)
GEMINI_API_KEY=your-gemini-key
OPENAI_API_KEY=your-openai-key

Mobile App Configuration

  • API endpoint configuration
  • Voice settings
  • Notification preferences
  • Offline sync settings

📊 Monitoring & Analytics

Available Dashboards

  • System Health: CPU, memory, disk usage
  • API Performance: Response times, error rates
  • User Analytics: Feature usage, task completion
  • Business Metrics: Productivity insights

Access Points

🔒 Security Features

Data Protection

  • Local Storage: All data stays on your EC2
  • Encryption: JWT tokens, bcrypt passwords
  • Rate Limiting: API protection
  • Input Validation: Sanitized user inputs

Network Security

  • HTTPS: SSL/TLS encryption
  • CORS: Configured origins
  • Firewall: Restricted ports
  • VPC: Optional network isolation

📱 Mobile App Features

Core Functionality

  • Voice Commands: "Hey Assistant" wake word
  • Offline Mode: Works without internet
  • Background Sync: Automatic data synchronization
  • Push Notifications: Task reminders, updates
  • Biometric Auth: Fingerprint/Face ID support

Platform-Specific Features

  • iOS: Siri Shortcuts integration
  • Android: Widget support, background services
  • Web: PWA installation, desktop notifications

🚀 Performance Optimization

Backend Optimizations

  • SQLite WAL Mode: Better concurrent access
  • Connection Pooling: Efficient database usage
  • Caching: Redis-compatible in-memory cache
  • Background Jobs: Async processing

Mobile Optimizations

  • Code Splitting: Lazy loading
  • Image Optimization: Compressed assets
  • Bundle Size: Minimized JavaScript
  • Native Performance: Platform-specific optimizations

🔄 Development Workflow

Backend Development

cd ec2-backend
npm run dev          # Start development server
npm run test         # Run tests
npm run lint         # Code linting
npm run build        # Build for production

Mobile Development

cd cross-platform-app
npm start            # Start Expo development server
npm run ios          # Run on iOS simulator
npm run android      # Run on Android emulator
npm run web          # Run in web browser

Monitoring Development

cd monitoring
docker-compose up    # Start monitoring stack

📚 API Documentation

Authentication

POST /api/auth/login
POST /api/auth/register
GET  /api/auth/profile
PUT  /api/auth/profile

Tasks

GET    /api/tasks              # List tasks
POST   /api/tasks              # Create task
PUT    /api/tasks/:id          # Update task
DELETE /api/tasks/:id          # Delete task
GET    /api/tasks/stats        # Task statistics

Conversations

POST /api/conversations        # Send message
GET  /api/conversations        # Get history
GET  /api/conversations/search # Search conversations

Email

POST /api/email/draft          # Create draft
POST /api/email/send           # Send email
GET  /api/email/templates      # Get templates
POST /api/email/improve        # Improve content

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

Development Setup

git clone <your-fork>
cd personal-assistant-system
npm install                    # Install root dependencies
cd ec2-backend && npm install  # Install backend dependencies
cd ../cross-platform-app && npm install  # Install app dependencies

📄 License

MIT License - see LICENSE file for details.

🆘 Support

Documentation

Troubleshooting

  • Check system logs: pm2 logs personal-assistant
  • Monitor health: http://your-ec2-ip:3001/health
  • View metrics: Grafana dashboards

Community

  • GitHub Issues: Bug reports and feature requests
  • Discussions: General questions and ideas

Built with ❤️ for productivity and privacy

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages