How Timespace Works
Timespace is a course planner built by UC Merced students, for UC Merced students. This page is for developers and anyone who wants a look under the hood. It explains how the pieces fit together and the rules every part of the system follows.
We keep the source code private, so we’re intentionally leaving out the internal details: exact limits, internal routes, and how keys and tokens are built. The overall design and the rules we follow are all here.
The big picture
Every request passes through Cloudflare first. Our own servers don’t accept connections from the open internet. They only talk to Cloudflare.
What it’s built with
- API: Hono on our own server, with a Cloudflare Workers backup
- App: Next.js, installable on your phone (PWA)
- Data: Cloudflare D1 (database) and KV (cache)
- Sign-in: Google, limited to
@ucmerced.eduaccounts. We never store passwords. - Bot checks: Cloudflare Turnstile
- Payments: Stripe’s hosted checkout. Card details never reach us.
Eight checks on every request
Every part of the API runs the same checks, in the same order. Cheap rejections come first, so bad requests are turned away before they cost anything.
- Size-cap the request. Oversized requests are rejected before we read them.
- Rate-limit it. Limits apply per visitor, per sign-in, and per account, and they’re tighter during registration.
- Confirm who you are. Your sign-in is checked on our server, not in your browser.
- Validate the input. Strict rules for every field. Anything unexpected is turned away.
- Check the data is yours. Asking for another student’s schedule or plan returns “not found.”
- Use safe queries and return only what’s needed. The database only receives prepared statements, and responses include only the fields the app needs.
- Give generic errors. You get a plain message and a reference ID, never internal details.
- Keep logs clean. Logs are structured, and tokens, private links, and personal details are removed.
If a request is missing any one of these checks, we treat that as a bug.
In your browser
- Strict security headers: HSTS,
nosniff, a strictReferrer-Policy, and a Content Security Policy with nounsafe-evalandframe-ancestors 'none'. The only outside script allowed is Cloudflare’s bot check. - No
eval, and no raw HTML from untrusted sources. Everything is escaped by React by default. - Shared plan links have a size cap, so a crafted link can’t freeze your browser.
- Nothing secret ships to your browser. Only values meant to be public are included in the app.
- The offline cache holds public files only. It never stores signed-in responses.
Your data
- Schedules stay on your device unless you turn on sync.
- Degree audits are read in your browser by default. If you choose the optional cloud reader, your name and student ID are removed first.
- Your Canvas calendar link is only allowed to reach Canvas. It’s used to fetch your calendar and is never saved or logged.
- Everything at rest is encrypted by Cloudflare. Backups are encrypted again before they leave.
How we run it
- Every change is scanned for secrets before it ships, and any secret that might have leaked is replaced.
- Software dependencies are locked to exact versions and checked for known vulnerabilities.
- Daily encrypted backups go to two independent providers, and we restore one every quarter to prove it works.
- We get alerts when traffic looks like abuse.
- Admin tools live on a separate system that requires multi-factor sign-in, and every admin action is permanently logged.
Why closed source?
We may never publish the source code. Keeping it private keeps the details of how we protect student data away from anyone looking for a way in, and it lets a small team move fast. Everything about how Timespace treats your data is on this page and on the About page.
Found something?
Use Report a problem in Timespace Settings, or email contactus@aiero.space. Security reports go to the top of the pile.
Timespace is an independent student project. It isn’t affiliated with, sponsored by, or endorsed by the University of California, Merced, or the Regents of the University of California.