Skip to content</> asasvirtuais
Docs menuBuilding an app
Docs/Guides

Building an app

Every asasvirtuais app is built in the same order. Rules coded at the start would change every time something simple changes in the front-end, so the advanced parts come last.

  1. Data modeling, by feature. Each feature's tables become packages: packages/{model}/schema.ts, the schemas in Zod. What the relational database already answers is not a column.
  2. Layout. Routes, layouts and page skeletons, each page providing the tables it shows with the rows it fetched.
  3. Pages, forms and server actions. Each page gets its forms (CreateForm, UpdateForm, FilterForm), its pagination, and the server actions it needs.
  4. Middleware and authorization. Authentication, authorization, and each table's middleware, once the features are defined.
  5. Workflows and custom features. What needs a hand-written state management or a state machine. See Workflows.

A team working by hand runs the same order as a four-week sprint, presenting at the end of each week: planning and setup, then stages 1 and 2, then stage 3, then stages 4 and 5. A coding agent develops much faster, but it follows the same order.

Building with a coding agent works best when the project keeps its context in a few Markdown files:

FileWhat it holds
brief.mdwhat the client asked for
specs.mdhow it's built, technically, kept up to date as things change
plan.mdthe initial plan for the project
changelog.mdwhat has been developed so far
roadmap.mdideas for the future of the project
README.mdwritten at the end: what was done, how, and how to start using it
AGENTS.mdthe framework rules, copied from AGENTS.example.md (explained in The rules)

Naming conventions#

ConceptPatternExample
Tablelowercase plural'todos'
Fields{Field}FieldTitleField
Hooksuse{Model}s(), use{Model}()useTodos(), useTodo()
Providers{Model}sProvider (table), {Model}Provider (row)TodosProvider, TodoProvider
FormsCreate{Model}, Update{Model}, Filter{Model}s, Delete{Model}UpdateTodo
One-click update{Verb}{Model}ToggleTodo
Components{Model}Item, Single{Model}TodoItem

Rather not build it yourself?#

Fast Track BTA builds custom business tools and apps on asasvirtuais, following exactly this process, and delivers in 1 to 5 business days. See Hire us.