Random Subcurrent Post

A Val Town application that fetches a random post from the Subcurrent RSS feed and displays it in a clean, responsive web interface.

Features

  • šŸŽ² Random Post Selection: Fetches a random article from the Subcurrent RSS feed
  • šŸ“± Responsive Design: Clean, mobile-friendly interface using TailwindCSS
  • šŸ”„ Refresh Functionality: Get a new random post with the click of a button
  • šŸ“Š Feed Statistics: Shows total number of available articles
  • šŸ”— Direct Links: Easy access to read the full article on the original site

How It Works

  1. RSS Discovery: The backend automatically discovers the RSS feed from the Subcurrent website
  2. Feed Parsing: Parses the RSS XML using regex-based extraction (server-side compatible)
  3. Random Selection: Selects a random post from all available articles
  4. Clean Display: Presents the post with title, description, publication date, and link

API Endpoints

  • GET / - Main web interface
  • GET /api/random-post - Returns a random post in JSON format

Technical Stack

  • Backend: Hono framework for HTTP handling
  • Frontend: React 18.2.0 with TailwindCSS
  • RSS Parsing: Custom regex-based XML parser (Deno/server compatible)
  • Styling: TailwindCSS via CDN

Project Structure

ā”œā”€ā”€ index.ts              # Main HTTP handler with API routes
ā”œā”€ā”€ frontend/
│   └── index.html        # React frontend application
└── README.md            # This file

Usage

Visit the deployed Val to see a random Subcurrent post. Click the "Get Another Random Post" button to fetch a new random article.

The application automatically handles RSS feed discovery and parsing, making it easy to adapt for other RSS-enabled websites.