Skip to content

Project Cradle · 2022, revived

A small community you can only join by invitation.

In 2022 Rin Huang and Jiahong Zheng built Cradle, a members' hub with one rule: nobody gets in without a code, and every member holds just two codes to hand out. Here it is again, rebuilt as one Next.js app with a real database behind it.

Got a code already? Join with it Watch the guided tour

Pastel marbled paint in lilac, pink and pale blue
Sample invite · from @mika
Ab3~k9#Q
One use. Joining puts you under @mika in the tree.
Your slots
2 at a time

The community right now

Members
18
Generations deep
4
Codes redeemed
16
Codes being held
5

Newest member: @bea · see where they sit in the tree

How it works

Invite-only, with a quota that keeps it small.

  1. 01

    Get a code

    Someone already inside gives you an eight-character invite code. There is no other way in.

  2. 02

    Join with it

    Signing up uses the code up and files you under the member who invited you, so the tree grows a branch.

  3. 03

    Hold two of your own

    Every member can hold two unused codes at a time. When a friend joins with one, that slot frees up again.

The invite treeWho invited whom, all the way back to the two founders.
A demo inbox instead of emailWelcome mail, invites you send and “someone used your code” notices all land there.

Ported, not reinvented

The rules are the ones written in 2022.

The quota, the order of the sign-up checks, the code alphabet, the form limits and every status message come straight from the original controllers. Tests read the preserved 2022 files and fail if the port drifts. Errors in the app still carry their csc number.

Sign-up status codes from user.status.code.json
cscmessage (verbatim)
102Invalid invitation code!
103Duplicate account!
104Invitation code does not exist!
105You have successfully create a new account!
legacy/octo/controller/invitation/invitationController.ts
// a user can only create 2 invitation codes
const codes = await InvitationCode.find({ inviter: user.username }).lean();

if (codes.length >= 2) {
  return res.json({ ...csc.invitation(101) });
}
legacy/octo/controller/user/userController.ts
// if valid, remove the invitation code from the invitationCode collection
if (code.inviter !== "Cradle") {
  await InvitationCode.deleteOne({ code: req.body.invitation });
}

Because used codes were deleted, the quota really capped the codes a member was holding: two at a time. The revival keeps used codes (it needs them to draw the tree) and counts only unused ones, which gives the same behaviour.

Then and now

Two repos in 2022, one app today.

Original stack compared with the revived stack
Part2022 (cradle-octo + cradle-waddle)2026 (this site)
APIExpress + TypeScript, Mongoose modelsNext.js 16 route handlers and server actions
DatabaseMongoDB Atlas (gone)SQLite via libSQL + Drizzle; Turso in production
Sign-inbcrypt + a JWT the browser could readargon2id + a signed httpOnly cookie for a hashed, rotating server-side session
Emailnodemailer through Gmail, never wired upA demo inbox that stores every message
Front endNext.js 12, Chakra UI, Formik + Yup, SCSSReact 19, Tailwind, shadcn/ui, zod
TestsnoneVitest unit, parity and integration tests

About this project

A two-person side project from 2022.

Project Cradle was a personal learning project, not coursework. Between January – March 2022 two friends set out to build “a technology stacking station” from scratch: a back end in one repository (cradle-octo) and a front end in another (cradle-waddle). It reached invite codes, sign-up, sign-in and a first dashboard before life got busy.

Provenance. Revived in October 2026. The 2022 code is preserved unchanged in the repository's legacy/ folder, with one database password removed. Everything on this site is new code that follows those files; the photos are the Unsplash images the 2022 sign-in page used.

  • Sunchuangyu (Rin) Huang@rNLKJACo-author. Wrote most of the API and the front end in 2022, and the revival.
  • Jiahong Zheng@kwitter777Co-author. Wrote the send-mail helper and the server-side session store experiment in 2022.
Built
January – March 2022
Revived
October 2026
Original
Express, TypeScript, MongoDB, Next.js 12, Chakra UI
Now
Next.js 16, Drizzle, libSQL / Turso, Tailwind, shadcn/ui
Source
rNLKJA/Project-Cradle (private for now)

Have a look around.

The member account makes, copies and emails invite codes under the same two-at-a-time quota, shared with every visitor. The admin account opens every table in the database.