UNDER THE HOOD · MVP ARCHITECTURE

How Screen Sync actually works.

A plain-English tour of the backend — the Solana program, the accounts it keeps, and how a 15-minute promo booking travels from your wallet to the live screen. Enough depth to understand it, without reading a line of Rust.

Booking is free except Solana network gas (~$0.001). Up to 3 bookings per wallet per day.

The big picture

Four layers, one direction of flow.

Your browser talks to a Solana program. The program is the source of truth. Everything else — image storage, analytics — hangs off the edges.

Client

The dApp in your browser

A React app reads slot availability straight from the chain and builds the booking transaction. Your wallet signs it — no account, no password, no email required.

ReactWallet adapterNetlify
On-chain

The Screen Sync Solana program

An Anchor program holds all booking state in purpose-built accounts (PDAs). It validates every booking: is the slot free, is the window open, is the wallet under its daily limit. If the rules pass, it writes the booking. This is the only source of truth.

Anchor / RustSolana5 account types
Storage

Creative files on IPFS

Your actual image isn't stored on-chain — only a pointer to it. Files are pinned to IPFS through Pinata and served fast via the cdn.screensync.xyz gateway.

IPFSPinataCDN gateway
Off-chain

Indexer & database

A listener subscribes to the program's events through Helius webhooks and mirrors activity into a database — used for dashboards and a record of contributions. It never controls bookings; it only observes.

Helius webhooksPostgresCloudflare Workers
On-chain accounts

Five accounts hold everything.

On Solana, data lives in accounts addressed deterministically (PDAs). Screen Sync uses exactly five types — no NFTs, no tokens minted per booking.

M
Singleton

Marketplace

The control account. Stores the treasury address, the booking window's start and end, a pause switch, and the slot count.

seeds: ["marketplace"]
S
1 per slot · 10 total

Slot

One per ad position. Stores its ID, device class (desktop/mobile), pixel dimensions, and host domain.

seeds: ["slot", slot_id]
B
1 per slot

SlotBitmap

A ~1,170-byte calendar — 9,312 bits, one per 15-minute window. A set bit means that window is booked. (See below.)

seeds: ["bitmap", slot_id]
C
1 per booking

Campaign

Created when you book. Holds the slot, time window, your wallet, the creative's IPFS link, and status. Short-lived — closeable for rent back.

seeds: ["campaign", slot_id, time_index]
W
1 per wallet / day

WalletDayCounter

Enforces the 3-bookings-per-wallet-per-day limit on-chain. Auto-closeable once its day has passed.

seeds: ["wallet_day", wallet, day_index]
×
Deliberately absent

No escrow / no NFT

Slots are free and time-leased, so there's no payment escrow and no token minted. Simpler, cheaper, smaller audit surface.

Booking lifecycle

What happens when you book.

One transaction, about a minute, start to finish.

01

Upload creative

Image is pinned to IPFS via Pinata; you get back a content link.

02

Pick slot & time

App reads the slot's bitmap and shows open 15-minute windows.

03

Sign in wallet

You approve one transaction calling book_campaign.

04

Program validates

Checks window open, slot free, wallet under daily limit — then flips the bit.

05

Goes live

At its time, the live page resolves your Campaign and renders the creative.

The clever bit

Why a bitmap, not a calendar of records.

Each slot's availability for the entire run fits in one tiny account. Booking a window is a single bit flip — fast and cheap — instead of creating a heavyweight record per slot-time.

One slot · 97 days × 96 windows/day = 9,312 bits

Each square below is one 15-minute window. Filled squares are booked. The real account holds 9,312 of these in ~1,170 bytes; this is a sample row.

Booked window Open window
Trust boundaries

What's on-chain vs off-chain.

Anything that must be trustless lives on-chain. Anything that's just convenience lives off-chain and can't override the chain.

On-chain (source of truth)

  • Slot definitions & availability bitmaps
  • Every booking (Campaign accounts)
  • Daily per-wallet rate limit
  • Voluntary contributions (transfer + event)
  • Pause & freeze controls

Off-chain (convenience only)

  • Creative image files (IPFS / Pinata)
  • Activity mirror & dashboards (Postgres)
  • Contribution history records
  • Wallet activity snapshots
  • The marketing site & this page
The stack

Built on.

Solana · base layer
Anchor · program framework
React · dApp
IPFS + Pinata · creatives
Helius · event indexing
Postgres · off-chain mirror
Cloudflare · API edge
Netlify · hosting
Ready to look closer?

Try it, or read the code.

Booking is live on Solana. Connect a wallet to claim a free window, or dig into the full implementation on GitHub.