FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
ashryanio
ashryaniosubcurrentShuffle3
Public
Like
subcurrentShuffle3
Home
Code
3
frontend
1
README.md
H
index.ts
Branches
1
Pull requests
Remixes
History
Environment variables
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.
Sign up now
Code
/
Code
/
Search
index.ts
https://ashryanio--186d25f8424611f0aa9176b3cceeab13.web.val.run
README.md

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.

HTTP
  • index.ts
    ashryanio--18…13.web.val.run
Code
frontendREADME.md
H
index.ts
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
Ā© 2025 Val Town, Inc.