subcurrentShuffle3
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data ā all from the browser, and deployed in milliseconds.
index.ts
https://ashryanio--186d25f8424611f0aa9176b3cceeab13.web.val.run
A Val Town application that fetches a random post from the Subcurrent RSS feed and displays it in a clean, responsive web interface.
- š² 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
- RSS Discovery: The backend automatically discovers the RSS feed from the Subcurrent website
- Feed Parsing: Parses the RSS XML using regex-based extraction (server-side compatible)
- Random Selection: Selects a random post from all available articles
- Clean Display: Presents the post with title, description, publication date, and link
GET /
- Main web interfaceGET /api/random-post
- Returns a random post in JSON format
- 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
āāā index.ts # Main HTTP handler with API routes
āāā frontend/
ā āāā index.html # React frontend application
āāā README.md # This file
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.