EXAMPLES

FORK A WORKING APP

Every Moon product is a small open-source app on Moon's public API. Copy one, change the words, ship it under your own name. No account and no key to start.

01

FOUR WORKING APPS

Each one is plain HTML and JavaScript with no build step. Every file is in the open repo, and each app is live on moon369.org so you can try it before you copy it.

TICKETS

Tickets bound to the guest's phone. The QR changes every 5 seconds, so a screenshot or a forwarded code never gets in, and the door works offline once its list is loaded.

FILES TO COPY
ticket.js
guest phone: key, ticket, live code
door.js
door: camera scan and check
tickets-page.js
organizer: make an event
ENDPOINTS
POST /v1/tickets
POST /v1/tickets/{event}/issue
POST /v1/tickets/{event}/door
POST /v1/tickets/{event}/checkin

PASSES

Memberships for gyms, clubs and studios. Each pass lives on one phone, has an end date, and can be renewed or cancelled. A pass-back window stops one pass letting two people in.

FILES TO COPY
pass.js
member phone: join and live code
members.js
owner: invite, renew, cancel
door.js
door: same scanner as tickets
ENDPOINTS
POST /v1/passes
POST /v1/passes/{place}/invite
POST /v1/passes/{place}/join
POST /v1/passes/{place}/renew
POST /v1/passes/{place}/cancel

STAYS

Guest passes for rentals. The pass only opens the door between check-in and check-out, the lock checks Moon's signature with no internet, and every stay gets a backup PIN.

FILES TO COPY
stay.js
guest phone: pass and 30-second code
host.js
host: add a door, book stays
lock.js
lock: offline reader and PINs
ENDPOINTS
POST /v1/stays
POST /v1/stays/{door}/book
POST /v1/stays/{door}/join
POST /v1/stays/{door}/lock

MOMENTS

The Moon app. Tap once to mark a moment: the exact time is signed by Moon, kept on the phone, and anyone can check it later. Also shows the moon, sky and tides for any place.

FILES TO COPY
app.html
the whole app shell
app.js
marking, moments, sky and tide
moonglow.js
the live moon
ENDPOINTS
POST /v1/sign
POST /v1/verify
GET /v1/night
GET /v1/tides
03

START WITH ONE CALL

Everything above is built on calls like this one. Only the fingerprint is sent, never the thing itself.

sign.jsPOST /v1/sign
// Prove when anything existed. Works in any browser or in Node 18+.
const bytes = new TextEncoder().encode("The thing I want to prove");
const hash = await crypto.subtle.digest("SHA-256", bytes);
const sha256 = [...new Uint8Array(hash)]
  .map(b => b.toString(16).padStart(2, "0")).join("");

const r = await fetch("https://api.moon369.org/v1/sign", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ sha256 })
}).then(r => r.json());

console.log(r.receipt.moonmark);   // the moment, signed by Moon
// Keep r.receipt. Anyone can check it at moon369.org/verify,
// or with POST /v1/verify, or offline with Moon's public key.

BUILT SOMETHING ON MOON?

Show us. We'll share the best ones and link them here.