Cita Secreta
Surprise dates for couples: each of you draws one of the other's secret plans.
Each person keeps a list of secret plans. When both are ready, each draws one of the other's plans to prepare as a surprise; nobody knows which of their plans was picked until they live it.
- Stack
- Next.js 16React 19FirebaseServer Actions
How it works
My partner and I wanted a way to surprise each other without always falling back on the same plans. In Cita Secreta, each person writes a list of secret plans that only they can see. When both press “I'm ready”, each draws one plan from the other's list at random: it becomes their secret mission to prepare. The author doesn't know which of their plans was picked until they live it.
When the surprise is done, it is revealed to its author and leaves their pool; they write a new one to refill it. While a surprise is pending, nobody can draw another, so the game keeps a gentle rhythm.
Keeping secrets on the server
Since the whole point is that plans stay secret, the browser never reads the database. Every read and write goes through Next.js Server Actions using the Firebase Admin SDK, which check who is asking and return only what that person is allowed to see. The Firestore rules simply deny all direct client access.
The mutual draw has to be all-or-nothing: either both people get a plan or neither does. It runs inside a Firestore transaction that checks both are ready, picks one plan from each pool and stores both missions atomically, so double clicks or two people pressing at the same time can't leave the pair in a half-drawn state.
$ highlights
- The mutual draw runs inside a Firestore transaction, so it's atomic.
- All data access goes through Server Actions with the Admin SDK; clients can't read the database.
Want to talk about this project or something similar?
Get in touch