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.
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.
// a user can only create 2 invitation codesconst 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 collectionif (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
Part
2022 (cradle-octo + cradle-waddle)
2026 (this site)
API
Express + TypeScript, Mongoose models
Next.js 16 route handlers and server actions
Database
MongoDB Atlas (gone)
SQLite via libSQL + Drizzle; Turso in production
Sign-in
bcrypt + a JWT the browser could read
argon2id + a signed httpOnly cookie for a hashed, rotating server-side session
Email
nodemailer through Gmail, never wired up
A demo inbox that stores every message
Front end
Next.js 12, Chakra UI, Formik + Yup, SCSS
React 19, Tailwind, shadcn/ui, zod
Tests
none
Vitest 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.
SHSunchuangyu (Rin) Huang@rNLKJACo-author. Wrote most of the API and the front end in 2022, and the revival.
JZJiahong 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
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.