Introduction
Learn VitNode development step by step. Set up an app, build the site-notes plugin with an API, a page, a database table, a permission and an AdminCP screen, then explore the framework.
VitNode is a TanStack Start front end, a Hono API, PostgreSQL and an AdminCP. Product features live in plugins. A plugin owns its pages, API, tables, translations and AdminCP screens, so the app itself stays small.
These pages follow VitNode 2.0 on the canary branch. It moves quickly; when
code and prose disagree, trust the code and send the prose a friendly PR.
Learn by building one plugin
The Learn lessons build one small plugin, site-notes, which publishes short notes on your site. Each lesson starts from the previous one and says which files change and how to check the result.
| # | Lesson | What site-notes can do afterwards |
|---|---|---|
| 1 | Setup | A VitNode app runs locally, with you as its administrator. |
| 2 | Create plugin | The generated plugin shows a page at /site-notes. |
| 3 | API modules | GET /api/site-notes/notes returns sample notes. |
| 4 | API routes | GET /api/site-notes/notes/{id} validates its parameter and answers 404 for a missing note. |
| 5 | Plugin page | /site-notes/notes lists the notes, loaded before the page renders. |
| 6 | Database | Notes live in a site_notes PostgreSQL table. |
| 7 | Permissions | Only administrators with Create notes can add a note. |
| 8 | AdminCP page | Staff create notes from a Notes screen in the AdminCP. |
The same plugin then continues in Events, Queue, Email templates and Storage.
The Content Engine builds all of them from one content type definition. Choose it for editorial content such as articles or events; choose the lessons above to learn how a plugin works by hand.