OnlyAutomator Architecture
System Overview
OnlyAutomator is a comprehensive system designed to automate interactions with the OnlyFans platform. The architecture consists of the following core components:- Web Application: A Next.js-based web interface for users to manage their automation workflows
- Chrome Extension: A browser extension that interacts with OnlyFans
- Microservice Backend: A Node.js-based service for handling background processes and scheduled tasks
- Database: Supabase PostgreSQL database for storing user data and automation configurations
- Email Marketing System: For user communications and notifications
Detailed Components
Web Application
The web application provides the main user interface for OnlyAutomator:- Technology: Next.js, React, TailwindCSS
- Key Features:
- User authentication and account management
- Dashboard with analytics and insights
- Automation workflow configuration
- Fan management tools
- Subscription tracking
- Mass messaging features
Chrome Extension
The Chrome extension is responsible for executing automation tasks directly on OnlyFans:- Technology: JavaScript, Chrome Extension API
- Key Features:
- Secure authentication with OnlyFans
- Fan data collection
- Automated messaging
- Content scheduling
- Engagement tracking
Microservice Component
The microservice handles background processing and scheduled tasks:- Technology: Node.js, Express, TypeScript
- Key Features:
- Scheduled automation tasks
- Data aggregation and processing
- Webhook handling for external integrations
- API endpoints for extension and webapp communication
- Email notifications generation
API Endpoints
The microservice exposes several key endpoints:/api/automation/schedule
: Manages scheduled automation tasks/api/fans/sync
: Synchronizes fan data from OnlyFans/api/messages/queue
: Handles queued messages for fans/api/analytics/generate
: Generates analytics reports
Data Flow
- User configures automation in the web app
- Configuration is stored in the database
- Microservice schedules and manages execution tasks
- Chrome extension receives instructions and executes them on OnlyFans
- Results are sent back to the microservice and stored in the database
- Web app displays results to the user
Database
The database layer stores all application data:- Technology: PostgreSQL via Supabase
- Key Schemas:
- Users: User account information
- Fans: Fan profiles and metadata
- Messages: Automated message templates and history
- Schedules: Automation scheduling configurations
- Analytics: Performance data and metrics
Deployment Architecture
The OnlyAutomator system uses a multi-environment deployment strategy:-
Web Application: Hosted on Vercel for seamless CI/CD integration
- Development, staging, and production environments
- Automatic previews for pull requests
- Edge functions for API routes
-
Microservice Backend:
- Primary deployment: Cloudflare Workers for global distribution
- Secondary deployment: Contabo VPS for specialized workloads
- Deployed using GitHub Actions workflow
- Managed with PM2 for process management
- Configured for auto-restart and logging
- Runs on Node.js 18.x
-
Database: Hosted on Supabase
- PostgreSQL with row-level security
- Real-time subscriptions for live updates
- Automated backups and point-in-time recovery
-
Chrome Extension: Distributed through the Chrome Web Store
- Manual release process with version control
- Beta testing channel for early adopters
Security Architecture
The system implements several security measures:- Authentication: OAuth 2.0 with JWT tokens
- Data Encryption: All sensitive data encrypted at rest and in transit
- API Security: Rate limiting, CORS policies, and request validation
- Secrets Management: Environment variables for all credentials, no hardcoded secrets
- Access Control: Role-based permissions system
Scaling Strategy
The architecture is designed to scale horizontally:- Stateless Components: All services are designed to be stateless
- Database Scaling: Connection pooling and read replicas for high load
- Caching Layer: Redis cache for frequently accessed data
- Load Balancing: Distributed traffic across multiple instances
- Microservices: Modular design allows independent scaling of components
Monitoring and Observability
The system includes comprehensive monitoring:- Application Metrics: Response times, error rates, and throughput
- System Metrics: CPU, memory, and network utilization
- User Metrics: Active users, conversion rates, and engagement
- Alerting: Automated alerts for system anomalies
- Logging: Centralized log collection and analysis