04 / Sample application

See the whole thing in one project.

The sample app separates a Next.js frontend from an Express backend. Person Items are typed, stored through Sequelize, exposed through REST, and consumed with client-side cache behavior.

Project shape

sample-app/
├── app/                 # Next.js frontend
├── api/                 # Express server
├── src/model/           # Person Item types
├── src/lib/             # Fjell libraries
├── src/database/        # Sequelize setup
└── src/client/          # providers and cache

Integration sequence

interface PersonProperties { id:string; name:string; age:number }

const library = createSequelizeLibrary(
  registry, { kta:["person"], scopes:[] },
  [personModel], { validators, hooks, finders }
);

app.use("/api/people", new PItemRouter(library,"person").getRouter());

The application can replace Sequelize with Firestore, add finders, introduce child resources, or add cache providers without changing the story.