Documentation Index
Fetch the complete documentation index at: https://mintlify.com/MatthewSabia1/SubPirate-Pro/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
This guide will walk you through setting up SubPirate Pro and running your first subreddit analysis. You’ll create an account, connect a Reddit account, analyze a subreddit, and organize it into a project.This guide assumes you’ve already completed the Environment setup and have the development servers running.
Prerequisites
Before you begin, make sure you have:- Node.js 18+ installed
- A Reddit account to analyze subreddits
- A Reddit app registered at reddit.com/prefs/apps
- Supabase project created with proper configuration
- OpenRouter API key for AI-powered analysis
Create your account
Navigate to the signup page and create your SubPirate Pro account.SubPirate Pro uses Supabase Auth with support for:Visit After signing up, a profile will be automatically created via a Supabase database trigger. Check your email for the confirmation link (if email confirmations are enabled).
- Email and password authentication
- Google OAuth (if configured)
- Email confirmations (recommended for production)
http://localhost:5173 and click “Sign up” to create your account.In development, you can optionally enable local admin bypass by setting
VITE_LOCAL_ADMIN_BYPASS=1 and VITE_LOCAL_ADMIN_TOKEN in your .env file. This shows a “Local Admin Login (dev)” button on the login page for quick testing.Connect your Reddit account
Once logged in, navigate to the Reddit accounts section and connect your first Reddit account.The connected account will appear in your accounts list with the Reddit username and connection status.
How Reddit OAuth works in SubPirate Pro
- Click “Connect Reddit Account” to initiate OAuth flow
- You’ll be redirected to Reddit’s authorization page
- After approving, Reddit redirects back with an authorization code
- SubPirate Pro exchanges the code for access and refresh tokens
- Tokens are encrypted with AES-256-GCM and stored securely
Analyze your first subreddit
Now you’re ready to analyze a subreddit for marketing potential.
Running an analysis
- Navigate to the subreddit analysis page
- Enter a subreddit name (e.g., “technology”, “gaming”, “fitness”)
- Click “Analyze” to start the AI-powered analysis
- Wait for the analysis to complete (typically 10-30 seconds)
What happens during analysis
SubPirate Pro uses a sophisticated analysis pipeline:- Context management:
AnalysisContexthandles UI state - Worker coordination:
analysisWorkerManagerspawns Web Workers for background processing - API call: Worker calls
POST /api/openrouter/analyze-subredditwith subreddit data - AI processing: OpenRouter API uses Google Gemini 3 Flash Preview to analyze the subreddit
- Caching: Results stored in IndexedDB for instant future retrieval
Analysis results
Your analysis will include:- Community size: Subscriber count and active user metrics
- Engagement patterns: Peak activity times and posting frequency
- Content preferences: Popular post types and topics
- Marketing potential: Receptiveness to promotional content
- Optimal strategy: Recommended posting approach and timing
Analysis results are cached in IndexedDB. Re-analyzing the same subreddit will instantly return cached results unless you explicitly refresh.
Create a project
Organize your analyzed subreddits into projects for better management.
Why use projects?
Projects help you:- Group related subreddits by campaign or niche
- Collaborate with team members using role-based permissions
- Track which subreddits are part of specific marketing initiatives
- Manage campaigns targeting specific subreddit groups
Creating your first project
- Navigate to the projects page
- Click “Create Project”
- Enter a project name (e.g., “Tech Product Launch”)
- Optionally add a description
- Click “Create”
Adding subreddits to projects
After creating a project:- Open the project details
- Click “Add Subreddit”
- Select from your analyzed subreddits
- The subreddit is now part of your project
Project permissions
SubPirate Pro supports role-based access control:- Owner: Full control including deletion and member management
- Admin: Can manage subreddits and campaigns, invite members
- Editor: Can edit campaigns and content but not invite others
- Viewer: Read-only access to project data
Optional: Set up a campaign
Take your marketing to the next level by creating an automated posting campaign.
Campaign features
- Content versioning: Create multiple versions of your content
- Scheduling: Set specific times and dates for posts
- Account pairing: Automatically match Reddit accounts with subreddits
- Run tracking: Monitor all posting attempts and results
Creating a campaign
- Open your project
- Navigate to the campaigns tab
- Click “Create Campaign”
- Enter campaign details:
- Name and description
- Target subreddits from your project
- Content versions (title, body, optional image URL)
- Schedule (start/end dates, frequency)
- Save the campaign
Running campaigns
Campaigns can be triggered:- Manually: Click “Run Now” to execute immediately
- Scheduled: Automatic execution via cron job (requires
CAMPAIGN_SCHEDULER_ENABLED=true)
Next steps
You’re now ready to use SubPirate Pro effectively. Here are some things to explore:Environment setup
Learn about all available configuration options
API reference
Explore the complete API documentation
Supabase setup
Configure your Supabase project for production
Deployment
Deploy SubPirate Pro to production
Tips for success
Analyzing subreddits effectively
- Start with larger, well-established subreddits to understand their dynamics
- Compare similar subreddits to identify the best targets
- Refresh analyses periodically as communities evolve
Managing Reddit accounts
- Connect multiple accounts to increase posting capacity
- Distribute posts across accounts to avoid rate limits
- Monitor account health and connection status regularly
Campaign best practices
- Test content variations to optimize performance
- Start with manual runs to verify everything works
- Monitor campaign runs for failed attempts and adjust
- Respect subreddit rules and Reddit’s self-promotion guidelines
SubPirate Pro is designed for legitimate marketing analysis and outreach. Always follow Reddit’s content policy and individual subreddit rules when posting.
Troubleshooting
Analysis fails or times out
- Check that
OPENROUTER_API_KEYis set correctly - Verify your OpenRouter account has sufficient credits
- Check browser console for Web Worker errors
- Clear IndexedDB cache if seeing stale data
Reddit OAuth not working
- Verify
VITE_REDDIT_APP_IDmatches your Reddit app - Check redirect URIs are configured correctly in Reddit app settings
- Ensure
REDDIT_CLIENT_SECRETis set on the server - Verify
TOKEN_ENCRYPTION_KEYis a valid base64-encoded 32-byte key
Campaigns not running
- Confirm
CAMPAIGN_SCHEDULER_ENABLED=truein environment - Check that cron job is configured and calling the endpoint
- Verify
CRON_SECRETmatches between environment and cron caller - Review campaign_run_attempts table for error details
Need more help?
Visit the deployment and troubleshooting guides