Skip to content

Satyamkumarnavneet/reddit-mastermind-automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

The Reddit Mastermind

A fullstack web application that automates Reddit content planning for client growth. The app ingests company information, personas, target subreddits, and keywords to generate high-quality weekly content calendars using AI.

πŸš€ Features

  • Smart Content Planning: Generate weekly Reddit content calendars with AI-powered content
  • Multi-Persona Support: Manage multiple personas with distinct voices and styles
  • Groq AI Integration: Fast content generation using Groq's LLaMA 3.3 70B model
  • AI-Powered Scoring: Automatic grading with heuristic fallback
  • Thread Simulation: Preview how threads might unfold before posting
  • Multi-Week Support: Generate next week with linked week navigation
  • Edit & Save: Live editing and saving functionality
  • Export Options: Export calendars to CSV or Excel formats

πŸ—οΈ Architecture

reddit-mastermind-automation/
β”œβ”€β”€ backend/                 # Express.js API server
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ index.js        # Main server entry
β”‚   β”‚   β”œβ”€β”€ routes/         # API routes
β”‚   β”‚   β”‚   β”œβ”€β”€ auth.js     # Authentication routes
β”‚   β”‚   β”‚   β”œβ”€β”€ planner.js  # Calendar generation & management
β”‚   β”‚   β”‚   β”œβ”€β”€ export.js   # CSV/Excel export
β”‚   β”‚   β”‚   └── simulator.js # Thread simulation
β”‚   β”‚   └── services/       # Business logic
β”‚   β”‚       β”œβ”€β”€ csv-xlsx-handler.js  # File parsing utilities
β”‚   β”‚       β”œβ”€β”€ smart-parser.js      # AI-powered file parsing
β”‚   β”‚       β”œβ”€β”€ persona.js           # Persona management
β”‚   β”‚       β”œβ”€β”€ llm-adapter.js       # Groq AI integration & scoring
β”‚   β”‚       β”œβ”€β”€ validator.js         # Content validation
β”‚   β”‚       β”œβ”€β”€ planner.js           # Calendar planning algorithm
β”‚   β”‚       β”œβ”€β”€ post-adapter.js      # Post management
β”‚   β”‚       β”œβ”€β”€ simulator.js         # Thread simulation
β”‚   β”‚       └── export.js            # Export utilities
β”‚   β”œβ”€β”€ package.json
β”‚   └── .env.example
β”œβ”€β”€ frontend/               # React (Vite) application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ api/           # API client
β”‚   β”‚   β”‚   └── index.js   # Axios API wrapper
β”‚   β”‚   β”œβ”€β”€ components/    # Reusable UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ Layout.jsx         # Main layout with sidebar
β”‚   β”‚   β”‚   β”œβ”€β”€ FileUpload.jsx     # Drag & drop file upload
β”‚   β”‚   β”‚   β”œβ”€β”€ PostCard.jsx       # Post display card
β”‚   β”‚   β”‚   β”œβ”€β”€ EditModal.jsx      # Edit post/comments modal
β”‚   β”‚   β”‚   └── CalendarSummary.jsx # Calendar stats summary
β”‚   β”‚   β”œβ”€β”€ pages/         # Route pages
β”‚   β”‚   β”‚   β”œβ”€β”€ Dashboard.jsx      # Home dashboard
β”‚   β”‚   β”‚   β”œβ”€β”€ NewPlan.jsx        # Create new calendar
β”‚   β”‚   β”‚   β”œβ”€β”€ CalendarView.jsx   # View/manage calendar
β”‚   β”‚   β”‚   └── Simulator.jsx      # Thread simulator
β”‚   β”‚   β”œβ”€β”€ store/         # State management (Zustand)
β”‚   β”‚   β”‚   └── calendarStore.js
β”‚   β”‚   β”œβ”€β”€ App.jsx        # Main app with routes
β”‚   β”‚   β”œβ”€β”€ main.jsx       # Entry point
β”‚   β”‚   └── index.css      # Tailwind styles
β”‚   β”œβ”€β”€ package.json
β”‚   └── vite.config.js
β”œβ”€β”€ sample_data/           # Example input files
β”‚   β”œβ”€β”€ SlideForge - Company Info_input.csv
β”‚   └── SlideForge - Content Calendar_output.csv
β”œβ”€β”€ Output/                # Exported calendar files
β”œβ”€β”€ docker-compose.yml     # Docker configuration
β”œβ”€β”€ LICENSE
└── README.md

πŸ› οΈ Tech Stack

Backend

  • Runtime: Node.js 20+
  • Framework: Express.js
  • AI: Groq SDK (LLaMA 3.3 70B Versatile)
  • File Processing: papaparse (CSV), xlsx (Excel)
  • Validation: Custom rule engine

Frontend

  • Framework: React 18 + Vite
  • Styling: Tailwind CSS
  • State: Zustand
  • Routing: React Router v6
  • UI: Lucide icons, react-hot-toast

πŸ“‹ Prerequisites

  • Node.js 20.x or higher
  • npm 10.x or higher
  • Groq API key

πŸš€ Quick Start

1. Clone the repository

git clone https://github.com/yourusername/reddit-mastermind-automation.git
cd reddit-mastermind-automation

2. Backend Setup

cd backend
npm install

# Copy and configure environment variables
cp .env.example .env
# Edit .env and add your Groq API key

3. Frontend Setup

cd ../frontend
npm install

4. Start Development Servers

Backend (Terminal 1):

cd backend
npm run dev
# Server runs on http://localhost:3001

Frontend (Terminal 2):

cd frontend
npm run dev
# App runs on http://localhost:5173

πŸ“ Input File Format

The application accepts CSV or XLSX files with company info, personas, subreddits, and keywords. The smart parser uses AI to automatically extract structured data from various file formats.

Required Data

  • Company Info: Name, website, description
  • Personas: Username, bio, tone, tags (minimum 2)
  • Subreddits: Target subreddit names
  • Keywords: Topics and angles for content

See sample_data/ for example input files.

🎯 Core Algorithm

The planner uses a sophisticated allocation algorithm:

  1. Smart Parse: AI extracts company, personas, subreddits, and keywords from uploaded file
  2. Expand Angles: Generate diverse post titles/angles from keywords
  3. Allocate Posts: Distribute across days, personas, and subreddits
  4. Generate Content: Create posts with 5 varied opening styles (story, question, observation, tip, comparison)
  5. Generate Comments: Create follow-up comments with 7 diverse strategies
  6. AI Scoring: Grade content for authenticity, engagement, value, and subreddit fit
  7. Heuristic Fallback: Automatic scoring when AI grading fails
  8. Track Variety: Prevent repetition by tracking persona comment history
  9. Week Linking: Chain calendars together for multi-week navigation

πŸ“‘ API Endpoints

Planner

  • POST /api/planner/generate - Generate calendar from file upload
  • POST /api/planner/generate/json - Generate calendar from JSON input
  • GET /api/planner/calendar/:id - Get calendar by ID
  • GET /api/planner/calendars - List all calendars
  • POST /api/planner/calendar/:id/next-week - Generate next week's calendar
  • PATCH /api/planner/calendar/:id/item/:itemId - Update item (edit)
  • POST /api/planner/calendar/:id/item/:itemId/approve - Approve item for posting

Export

  • GET /api/export/:id/csv - Export to CSV
  • GET /api/export/:id/xlsx - Export to Excel

Simulator

  • POST /api/simulator/:calendarId/:itemId - Simulate thread

🎨 UI Features

  • Dashboard: View all generated calendars with quick stats
  • New Plan: Upload files, preview data, configure generation options
  • Calendar View: Grid/List views, filtering by persona/subreddit, week navigation
  • Edit Modal: Edit post title, body, subreddit, timestamp, and all comments
  • Progress Modal: Visual progress during calendar generation
  • Thread Simulator: Real-time simulation of how threads unfold

πŸ“ License

MIT License - see LICENSE for details.

About

Production-grade Reddit content planner with AI-driven post and thread generation, intelligent CSV/XLSX data ingestion, and precise structured calendar export pipelines.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages