Documentation

  • Use the interfaces described in docs/db.md for database access
  • Import the DB module like this: import { db } from "$db"; Use db.get, db.getOne, db.set, db.delete, db.query, db.stream, db.update
  • Use the interfaces described in docs/sessions.md for web sessions import { getSession, setSessionValue, saveSession } from "../core/sessions.ts";
  • Add JSDoc-style documentation for each file, interface, and method:
    • Files: Document purpose and main functionality at the top
    • Interfaces: Document purpose and all properties
    • Methods: Document purpose, parameters, return values, and side effects
  • When documenting, use technocratic American English. Don't overhype. Be concise, straight-to-the-point. Use idiomatic expressions and IT slang.

UI

  • Use Tailwind and DaisyUI styles for the user interface

Deno Fresh

  • Use Deno Fresh
  • Rather than importing module directly, define aliases in deno.json and import using these aliases
  • Don't use any client side JS for components or routes.
  • All client-side JS should be in the islands/ folder.
  • Don't try accessing the DB from the client side islands.

Conventions

  • Use ULIDs rather than UUIDs or timestamps import { ulid } from "$ulid/mod.ts";