• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
ashryanio

ashryanio

origami

Public
Like
origami
Home
Code
8
backend
4
frontend
2
jobs
1
shared
1
.vtignore
AGENTS.md
README.md
deno.json
Environment variables
1
Branches
1
Pull requests
Remixes
History
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
…
Viewing readonly version of main branch: v38
View latest version
README.md

origami.now (Val Town)

origami.now is a Val Town project that serves a React UI and an API for generated origami SVGs.

What it does

  • Serves a minimal UI at / with the origami.now heading and the latest generated origami.
  • Generates a new origami artifact on an hourly cadence (UTC hour window).
  • Stores only the latest artifact in Blob storage.
  • Supports manual regeneration with a query parameter (?force=1).

Project structure

backend/ auth.ts index.http.ts origami.ts storage.ts frontend/ index.html app.js jobs/ generate-origami.cron.ts shared/ types.ts

Routes

  • GET /

    • Returns the React UI.
    • Bootstraps the latest origami payload into the page.
    • Supports ?force=1 (or ?regen=1) to force regeneration.
  • GET /api/origami/latest

    • Returns the latest stored origami artifact.
    • Supports ?force=1 (or ?regen=1) to force regeneration.
  • POST /api/origami/generate

    • Protected by x-origami-token.
    • Optional body: { "force": true }.

Artifact shape

Create val
{ id: string; createdAt: string; // ISO timestamp svg: string; seed: number; generatedBy: "cron" | "manual" | "bootstrap"; }

Generation behavior

  • Uses Rabbit Ear to build and fold crease patterns.
  • Uses 3–10 generated fold instructions per artifact.
  • Limits rendered crease segments to a max of 30.
  • Linework is always black.
  • Faces use two generated colors (front/back) per artifact.

Scheduling

  • Cron entrypoint: jobs/generate-origami.cron.ts
  • Intended schedule: every hour at minute 0 (UTC-style cadence).
  • Generation stores only the latest artifact at blob key origami_latest_v1.

Environment variables

  • ORIGAMI_GENERATE_TOKEN
    • Required for POST /api/origami/generate.

Notes

  • force regeneration is intentionally unprotected for GET routes in this project.
  • UI polling interval is 5 minutes.
FeaturesVersion controlCode intelligenceCLIMCP
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
© 2026 Val Town, Inc.