Metadata-Version: 2.4
Name: autoemployee-ai
Version: 2.0.0
Summary: Enterprise AI Employee Platform - Autonomous Multi-Agent System
Author-email: Adeel Ahmed <adeelabro007@gmail.com>
Project-URL: Homepage, https://autoemployee.com
Project-URL: Documentation, https://docs.autoemployee.com
Project-URL: Repository, https://github.com/adeelahmed/autoemployee
Project-URL: Issues, https://github.com/adeelahmed/autoemployee/issues
Project-URL: Changelog, https://github.com/adeelahmed/autoemployee/blob/main/CHANGELOG.md
Keywords: ai,automation,agent,employee,enterprise,business
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.13
Description-Content-Type: text/markdown
Requires-Dist: fastapi>=0.109.0
Requires-Dist: uvicorn[standard]>=0.27.0
Requires-Dist: python-multipart>=0.0.6
Requires-Dist: sqlalchemy>=2.0.25
Requires-Dist: psycopg2-binary>=2.9.9
Requires-Dist: alembic>=1.13.1
Requires-Dist: python-jose[cryptography]>=3.3.0
Requires-Dist: passlib[bcrypt]>=1.7.4
Requires-Dist: authlib>=1.3.0
Requires-Dist: pydantic>=2.5.3
Requires-Dist: pydantic-settings>=2.1.0
Requires-Dist: email-validator>=2.1.0
Requires-Dist: httpx>=0.26.0
Requires-Dist: python-dotenv>=1.0.0
Requires-Dist: psutil>=5.9.7
Requires-Dist: watchdog>=4.0.0
Requires-Dist: requests>=2.31.0
Requires-Dist: google-auth>=2.0.0
Requires-Dist: google-api-python-client>=2.0.0
Requires-Dist: schedule>=1.2.0
Requires-Dist: pyyaml>=6.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: click>=8.0.0
Requires-Dist: packaging>=23.2
Provides-Extra: dev
Requires-Dist: pytest>=7.4.4; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.3; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Requires-Dist: black>=23.12.1; extra == "dev"
Requires-Dist: ruff>=0.1.14; extra == "dev"
Requires-Dist: mypy>=1.8.0; extra == "dev"
Provides-Extra: social
Requires-Dist: tweepy>=4.14.0; extra == "social"
Requires-Dist: linkedin-api>=2.0.0; extra == "social"
Requires-Dist: playwright>=1.40.0; extra == "social"
Provides-Extra: all
Requires-Dist: autoemployee[dev,social]; extra == "all"

# AutoEmployee v2.0 - Production-Ready AI Employee Platform

> **Enterprise-Grade Full-Stack Application** with FastAPI Backend, Next.js 14 Frontend, PostgreSQL, and Real-Time Dashboard

---

## 🚀 Quick Start (5 Minutes)

### Prerequisites
- Docker & Docker Compose
- OR: Python 3.13+, Node.js 20+, PostgreSQL 15+

### Option 1: Docker (Recommended)

```bash
# 1. Clone/navigate to directory
cd Platinum-Tier

# 2. Copy environment file
cp .env.example .env

# 3. Start all services
cd docker
docker-compose up -d

# 4. Access application
# Frontend: http://localhost:3000
# Backend API: http://localhost:8000
# API Docs: http://localhost:8000/docs
```

### Option 2: Manual Setup

```bash
# Backend
cd backend
pip install -r requirements.txt
uvicorn app.main:app --reload

# Frontend (in new terminal)
cd frontend
npm install
npm run dev

# Database (ensure PostgreSQL is running)
```

---

## 📁 Organized Directory Structure

```
Platinum-Tier/
│
├── backend/                    # FastAPI Backend
│   ├── app/
│   │   ├── main.py            # Main application
│   │   ├── config.py          # Configuration
│   │   ├── database.py        # Database connection
│   │   ├── models/            # SQLAlchemy models
│   │   ├── schemas/           # Pydantic schemas
│   │   ├── api/               # API routes
│   │   ├── services/          # Business logic
│   │   └── auth/              # Authentication
│   ├── requirements.txt
│   └── Dockerfile
│
├── frontend/                   # Next.js 14 Frontend
│   ├── src/
│   │   ├── app/               # App router pages
│   │   ├── components/        # React components
│   │   ├── lib/               # Utilities
│   │   └── styles/            # CSS styles
│   ├── package.json
│   └── Dockerfile
│
├── docker/                     # Docker Configuration
│   ├── docker-compose.yml
│   └── nginx.conf
│
├── watcher/                    # AI Watchers (Existing)
│   ├── gmail_watcher.py
│   ├── facebook_watcher.py
│   └── ...
│
├── mcp-servers/                # MCP Servers (Existing)
│   ├── email-mcp/
│   └── ...
│
├── data/                       # Application Data
│   ├── Inbox/
│   ├── Needs_Action/
│   ├── Done/
│   └── Logs/
│
├── docs/                       # Documentation
│   ├── API.md
│   ├── FEATURES.md
│   └── DEPLOYMENT.md
│
├── scripts/                    # Utility Scripts
│   ├── setup.sh
│   └── init-db.sql
│
├── .env.example               # Environment template
├── .gitignore
└── README.md                  # This file
```

---

## ✨ Features

### Backend (FastAPI)

| Feature | Status | Description |
|---------|--------|-------------|
| **REST API** | ✅ | 40+ endpoints |
| **JWT Auth** | ✅ | Access + Refresh tokens |
| **OAuth2** | ✅ | Google, GitHub login |
| **PostgreSQL** | ✅ | Production database |
| **WebSocket** | ✅ | Real-time updates |
| **Dashboard API** | ✅ | Live watcher data |
| **Task Management** | ✅ | Full CRUD operations |
| **Audit Logging** | ✅ | Compliance-ready |

### Frontend (Next.js 14)

| Feature | Status | Description |
|---------|--------|-------------|
| **Modern UI** | ✅ | Tailwind CSS, dark theme |
| **Real-Time Dashboard** | ✅ | Live watcher/agent data |
| **Documentation Site** | ✅ | All features documented |
| **Task Interface** | ✅ | Manage AI tasks |
| **Responsive** | ✅ | Mobile-friendly |
| **Authentication UI** | ✅ | Login, register, OAuth |

### Infrastructure

| Feature | Status | Description |
|---------|--------|-------------|
| **Docker** | ✅ | Full containerization |
| **Nginx** | ✅ | Reverse proxy |
| **Health Checks** | ✅ | Service monitoring |
| **Auto-Restart** | ✅ | Production-ready |

---

## 🔐 Authentication

### Default Credentials
```
Email: admin@autoemployee.com
Password: admin123
```

⚠️ **Change immediately after first login!**

### Supported Methods
- Email/Password (JWT)
- Google OAuth2
- GitHub OAuth2

---

## 📊 Dashboard Features

The real-time dashboard displays:

### Agent Status
- Cloud Executive (Running/Stopped)
- Local Executive (Running/Stopped)
- Uptime, CPU, Memory usage

### Task Statistics
- Pending tasks (Cloud/Local breakdown)
- Completed today
- Pending approval queue

### Watchers (11 Total)
1. Gmail Watcher
2. Facebook Watcher
3. Instagram Watcher
4. X/Twitter Watcher
5. LinkedIn Watcher
6. WhatsApp Watcher
7. Needs Action Watcher
8. HITL Watcher
9. Scheduler
10. Cloud Sync
11. Local Sync

### MCP Servers (6 Total)
- email-mcp
- odoo-mcp
- social-mcp
- social-mcp-fb
- social-mcp-ig
- social-mcp-x

### System Resources
- CPU usage %
- Memory usage (GB)
- Disk usage (GB)

---

## 🛠️ Development

### Backend Development

```bash
cd backend
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000
```

**Access API Docs:** http://localhost:8000/docs

### Frontend Development

```bash
cd frontend
npm install
npm run dev
```

**Access Frontend:** http://localhost:3000

### Running Watchers

```bash
# Start individual watchers
python watcher/gmail_watcher.py
python watcher/facebook_watcher.py
python watcher/orchestrator_cloud.py
python watcher/orchestrator_local.py
```

---

## 📖 API Endpoints

### Authentication
```
POST   /api/v1/auth/register       - Register new user
POST   /api/v1/auth/login          - Login (JWT)
POST   /api/v1/auth/refresh        - Refresh token
POST   /api/v1/auth/oauth/google   - Google OAuth
POST   /api/v1/auth/oauth/github   - GitHub OAuth
```

### Users
```
GET    /api/v1/users               - List users
GET    /api/v1/users/me            - Current user
PUT    /api/v1/users/me            - Update profile
```

### Tasks
```
GET    /api/v1/tasks               - List tasks
POST   /api/v1/tasks               - Create task
GET    /api/v1/tasks/{id}          - Get task
PUT    /api/v1/tasks/{id}          - Update task
DELETE /api/v1/tasks/{id}          - Delete task
POST   /api/v1/tasks/{id}/approve  - Approve task
```

### Dashboard
```
GET    /api/v1/dashboard           - Full dashboard data
GET    /api/v1/dashboard/summary   - Lightweight summary
GET    /api/v1/dashboard/watchers  - Watcher status
GET    /api/v1/dashboard/resources - System resources
WS     /api/v1/dashboard/ws        - Real-time WebSocket
```

---

## 🚢 Production Deployment

### Environment Variables

Create `.env` file:

```bash
# Database
DB_PASSWORD=secure-password-here

# Authentication
SECRET_KEY=your-super-secret-key-min-32-chars

# OAuth2 (Optional)
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-secret
GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-secret

# CORS
ALLOWED_ORIGINS=https://yourdomain.com
```

### Deploy with Docker

```bash
# Production mode
cd docker
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d

# Check status
docker-compose ps

# View logs
docker-compose logs -f
```

### Backup Database

```bash
docker-compose exec db pg_dump -U autoemployee autoemployee > backup.sql
```

---

## 🧪 Testing

### Backend Tests

```bash
cd backend
pytest --cov=app
```

### Frontend Tests

```bash
cd frontend
npm test
```

### E2E Tests

```bash
python test_e2e_complete.py
```

---

## 📚 Documentation

| Document | Description |
|----------|-------------|
| [API Docs](http://localhost:8000/docs) | Interactive API reference |
| [FEATURES.md](docs/FEATURES.md) | Complete feature list |
| [DEPLOYMENT.md](docs/DEPLOYMENT.md) | Production deployment guide |
| [DASHBOARD_GUIDE.md](docs/DASHBOARD_GUIDE.md) | Dashboard user guide |

---

## 🔧 Troubleshooting

### Frontend won't load
```bash
# Check backend is running
curl http://localhost:8000/health

# Restart frontend
docker-compose restart frontend
```

### Database connection error
```bash
# Check database is healthy
docker-compose ps db

# View database logs
docker-compose logs db
```

### Watchers not showing data
```bash
# Ensure watchers are running
python watcher/gmail_watcher.py
python watcher/orchestrator_cloud.py
```

---

## 📞 Support

- **Documentation:** http://localhost:8000/docs
- **GitHub Issues:** https://github.com/adeelahmed/autoemployee/issues
- **Email:** support@autoemployee.com

---

## 🎯 Roadmap

### Q2 2026
- [ ] Mobile app (iOS/Android)
- [ ] Advanced analytics
- [ ] Custom integrations

### Q3 2026
- [ ] Plugin marketplace
- [ ] Multi-tenant support
- [ ] Advanced AI models

---

## 📄 License

Proprietary - All rights reserved

---

**Version:** 2.0.0  
**Last Updated:** March 30, 2026  
**Status:** ✅ Production Ready

**Built with ❤️ by Adeel Ahmed**
