tessera-labs — our-code.ts
Start a project
tessera-labs › src › our-code.ts
// our-code.ts: how we write software you can keep
// readable first, tested second, fast when it needs to be
// 1. Rules live in plain functions, so anyone can read them
export function canBook(slot, patient) {
if (slot.isBlocked) return false;
if (patient.hasOverdueForm) return false;
return slot.seatsLeft > 0;
}
// 2. Every rule has a test that describes what the business expects
test("blocks patients with an overdue form", () => {
expect(canBook({ isBlocked: false, seatsLeft: 2 }, { hasOverdueForm: true })).toBe(false);
});
// 3. Security and data rules are reviewed before every release
const standards = {
passwords: "hashed, never stored in plain text",
backups: "daily, tested every month",
access: "each user sees only their own records",
history: "every change is recorded in version control",
};
// 4. Handover: you receive everything needed to keep going
"source code in your repository", "setup and deployment notes", "a short guide for your team"

You do not need to understand every line to own this code. We write it so that another developer can pick it up, read it, and extend it without us.

Chat with us