• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
owen

owen

test

Public
Like
test
Home
Code
4
backend
3
frontend
1
shared
README.md
Branches
2
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
/
README.md
Code
/
README.md
Search
5/20/2025
README.md

Hacker News "Show HN" Screenshot Gallery

This project automatically captures screenshots of "Show HN" products posted on Hacker News and displays them in a gallery format.

Features

  • Automatically fetches new "Show HN" posts from Hacker News
  • Takes screenshots of the linked websites using a screenshot service
  • Displays screenshots in a gallery with titles and links
  • Stores post data in SQLite database

Project Structure

  • /backend/ - Server-side code
    • index.ts - Main HTTP API handler (HTTP trigger)
    • cron.ts - Scheduled job to fetch new posts (Cron trigger)
  • /frontend/ - Client-side code
    • index.html - Main HTML template with embedded JavaScript

How It Works

  1. A cron job periodically fetches new "Show HN" posts from the Hacker News API
  2. For each post, it generates a screenshot URL using a screenshot service
  3. Post data and screenshot URLs are stored in a SQLite database
  4. The web interface displays these screenshots in a gallery format

Implementation Details

  • Uses the Hacker News API to fetch posts
  • Uses the Microlink API for generating screenshots
  • Stores data in SQLite for persistence
  • Frontend built with HTML, JavaScript, and Tailwind CSS
  • Backend API built with Hono

Setup

  1. The cron job will automatically run on a schedule to fetch and process new "Show HN" posts
  2. Visit the website to see the gallery of screenshots
  3. Use the pagination controls to browse through all captured screenshots
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.