Skip to content

crlian/rediate

Repository files navigation

Rediate

A content ideation platform that transforms Reddit conversations into publishable content ideas across multiple formats. Rediate analyzes trending discussions, extracts community insights, and generates refined content ready for creators to publish.

Overview

Rediate is a beta-stage web application designed for content creators who need a faster way to discover and develop content. Instead of manually scrolling through forums and communities, users input a subreddit name, and the platform automatically:

  1. Fetches trending posts and discussions from that community
  2. Analyzes sentiment and extracts key insights
  3. Generates content ideas in multiple formats (newsletter, video script, outline, article)
  4. Provides refinement tools to polish ideas before publication

This tool bridges the gap between raw community data and production-ready content.

Key Features

  • Subreddit Analysis: Extract trending posts and comments from any subreddit with a single input
  • AI-Powered Idea Generation: Automatically generate contextual content ideas with titles, summaries, key points, and audience targeting
  • Multi-Format Refinement: Convert any idea into specialized formats:
    • Newsletter: Subject lines, structured sections, clear CTAs
    • Video/Script: Short-form scripts (30-90 seconds) with beats and voiceover direction
    • Outline: Thesis statements, structured sections, evidence points, and CTAs
    • Auto-detect: AI selects the optimal format
  • Workspace Management: Organize ideas with inbox and drafts sections
  • Masonry Grid Interface: Browse and filter ideas by format type
  • Social Context Display: View engagement metrics (upvotes, comments, source)

Technology Stack

Frontend

  • Framework: Next.js 15.5.9 with React 19.1.4
  • Styling: Tailwind CSS 4 with PostCSS
  • Animation: Framer Motion for UI transitions
  • UI Components: Custom badge, button, input, skeleton, and spinner components
  • Layout: Masonry grid with react-masonry-css
  • Additional: Toast notifications (react-hot-toast), animated text (react-simple-typewriter)

Backend & Services

  • AI: OpenAI API (GPT-4 Turbo Nano for generation, GPT-4o-mini for refinement)
  • Data Source: Reddit OAuth API for post and comment fetching
  • Storage: Vercel KV (Redis) for job queue and session state
  • User Data: Firebase Firestore for email capture and future user accounts
  • Analytics: Vercel Analytics for usage tracking
  • Image Generation: Vercel OG for social preview images

Development Tools

  • Linting: ESLint 9
  • Build Analysis: Next.js bundle analyzer
  • Deployment: Vercel (optimized for Next.js)

Project Structure

src/
├── pages/
│   ├── index.js                 # Landing page and workspace entry
│   ├── analysis/[id]/index.js   # Idea workspace with masonry grid
│   └── api/
│       ├── start                # POST: Begin subreddit analysis
│       ├── status/[id]          # GET: Poll analysis progress
│       ├── results/[id]         # GET: Retrieve completed ideas
│       ├── refinement           # POST: Refine a single idea
│       └── og.js                # Social preview image generation
├── components/
│   ├── IdeaDetailModal.jsx      # Idea viewing and refinement interface
│   ├── IdeasMasonry.jsx         # Grid layout for ideas
│   ├── WorkspaceHeader.jsx      # Tab navigation and metadata
│   ├── InlineFilters.jsx        # Format filtering controls
│   └── UI/                      # Reusable UI components
└── lib/
    ├── pipeline.js              # Core ETL pipeline
    ├── refine.js                # Content refinement logic
    ├── jobs.js                  # Job state management
    ├── quota.js                 # Rate limiting and quotas
    ├── firebase.js              # Firebase client configuration
    └── errors.js                # Error handling utilities

Data Pipeline

User Input
    ↓
API /start (creates analysis job)
    ↓
Reddit Fetch (top posts + comments)
    ↓
OpenAI Processing (generate ideas for each post)
    ↓
Client Polling /status (real-time progress)
    ↓
/results (retrieve completed ideas)
    ↓
Workspace Display (masonry grid)
    ↓
User Refinement (select idea + format)
    ↓
API /refinement (OpenAI specialization)
    ↓
Display refined content

Getting Started

Prerequisites

  • Node.js 18+
  • npm or yarn
  • API Keys:
    • OpenAI API key
    • Reddit OAuth credentials (client ID and secret)
    • Firebase configuration
    • Vercel KV connection string (optional, for production)

Installation

  1. Clone the repository:
git clone <repository-url>
cd rediate
  1. Install dependencies:
npm install
  1. Configure environment variables:
cp .env.example .env.local

Fill in the following variables:

OPENAI_API_KEY=your_openai_key
REDDIT_CLIENT_ID=your_reddit_client_id
REDDIT_CLIENT_SECRET=your_reddit_client_secret
REDDIT_USER_AGENT=Rediate/1.0 (by your_username)
NEXT_PUBLIC_SITE_URL=http://localhost:3000

# Firebase (optional)
NEXT_PUBLIC_FIREBASE_API_KEY=...
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=...
NEXT_PUBLIC_FIREBASE_PROJECT_ID=...
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=...
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=...
NEXT_PUBLIC_FIREBASE_APP_ID=...

# Beta configuration
ANALYSIS_DAILY_LIMIT=1
REFINEMENT_DAILY_LIMIT=8
  1. Start the development server:
npm run dev

Open http://localhost:3000 to see the application.

API Endpoints

POST /api/start

Initiates a new subreddit analysis.

Request body:

{
  "subreddit": "marketing"
}

Response:

{
  "analysisId": "unique_id",
  "stage": "queued"
}

GET /api/status/[id]

Polls the progress of an analysis job.

Response:

{
  "stage": "drafting",
  "progress": 75,
  "totalIdeas": 12,
  "message": "Generating ideas..."
}

GET /api/results/[id]

Retrieves completed ideas from a finished analysis.

Response:

{
  "ideas": [
    {
      "id": "idea_1",
      "title": "How to Build Effective Marketing Funnels",
      "summary": "...",
      "keyPoints": [...],
      "suggestedHooks": [...],
      "targetAudience": "...",
      "source": { "title": "...", "upvotes": 1500 }
    }
  ]
}

POST /api/refinement

Refines an idea into a specific format.

Request body:

{
  "idea": "idea_object",
  "format": "newsletter" | "video" | "outline" | "script" | "auto"
}

Response:

{
  "refined": {
    "format": "newsletter",
    "subject": "...",
    "sections": [...],
    "cta": "..."
  }
}

Configuration & Customization

Rate Limiting

Daily quotas are IP-based during beta:

  • 1 analysis per IP per 24 hours
  • 8 refinements per IP per 24 hours

These are configured in lib/quota.js and can be adjusted via environment variables.

Content Refinement Prompts

Format-specific refinement instructions are defined in lib/refine.js. Customize these to match your content guidelines.

Bundle Optimization

The project excludes the OpenAI client from the frontend bundle via webpack configuration. All OpenAI calls are server-side only.

Current Limitations (Beta)

  • Session-Based Storage: All workspace data is cleared when the browser closes. No persistent user accounts yet.
  • IP-Based Quotas: Rate limiting is based on IP address, not user identity. Not suitable for shared networks.
  • No Data Export: Ideas must be manually copied or screenshotted. Export to platforms (WordPress, Medium) is planned.
  • Synchronous Pipeline: Analysis runs synchronously due to Vercel serverless limitations. Future versions may use background jobs.
  • Limited Concurrency: Reddit API calls are limited to 3 concurrent requests; OpenAI calls to 4 per job.

Next Steps with AI

Short-Term (Immediate Enhancements)

  • User Authentication: Implement Firebase Authentication to enable per-account quotas and persistent workspaces
  • Data Persistence: Migrate from SessionStorage to Firestore to preserve ideas across sessions
  • Enhanced Filtering: Add AI-powered tagging and search to organize ideas by topic, sentiment, or engagement level
  • Drafts Improvement: Implement version control for refined ideas with comparison views

Medium-Term (Feature Expansion)

  • Platform Export Integration: Add one-click publishing to WordPress, Medium, Substack, and LinkedIn
  • Advanced AI Analysis:
    • Sentiment analysis to identify trending emotions in discussions
    • Topic clustering to automatically group related ideas
    • Competitor analysis to see what other creators are publishing about similar topics
  • Content Calendar: Generate content calendars with suggested publishing dates based on community activity patterns
  • Audience Insights: Extract demographic and psychographic data from Reddit discussions to better target content

Long-Term (Scalability & Intelligence)

  • Multi-Source Intelligence: Expand beyond Reddit to Twitter, YouTube comments, Discord servers, and industry forums
  • Predictive Performance Scoring: Use machine learning to predict which ideas will perform best based on historical data
  • AI Collaboration Features:
    • Real-time collaborative refinement suggestions from Claude or other models
    • Alternative content variations generated automatically (A/B testing support)
    • Grammar, SEO, and tone optimization powered by specialized AI models
  • Content Performance Tracking: Monitor how published content performs and use feedback to improve future idea generation
  • Custom AI Model Fine-Tuning: Train specialized models on your content style to generate more personalized ideas
  • Workflow Automation: Set up recurring analyses on multiple subreddits with automated idea generation and refinement

AI-Driven Improvements (Current & Future)

  • Smarter Idea Generation: Implement prompt engineering techniques to generate more targeted, actionable ideas
  • Context Awareness: Track which ideas perform best for your audience and use that data to improve future generations
  • Personalization: Allow users to define content preferences and have the AI learn their style over time
  • Multi-Language Support: Generate ideas in multiple languages for global content creators
  • Accessibility Features: Automatically generate alt text, captions, and transcripts for accessibility compliance

Development

Build for Production

npm run build

Analyze Bundle Size

npm run analyze

Lint Code

npm run lint

Deployment

The application is optimized for deployment on Vercel:

vercel deploy

Vercel automatically handles:

  • Serverless function deployment
  • Edge caching with appropriate headers
  • Environment variable management
  • Automatic HTTPS and domain configuration

For other platforms, ensure Node.js 18+ is available and configure the required environment variables.

Support & Feedback

This is a beta product. Feedback and bug reports are essential. Please open an issue on the repository or contact the development team with your experiences.

License

MIT

About

New repo for radiate in next

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published