Vinova Lab · Engineering

Rainty modules

What every module challenge requires, whichever module it names.

Version 1.04 November 2026SHA-256 1b6b3711e7b9e103fd0a7017d1c506c2a85b25ba004a782e718f8d01ae63bc6d

Rainty modules

Every Rainty module challenge is reviewed against this document. The brief of a single challenge says which module — its data, its screens, its events; this page says what is the same for all of them: what a module is made of, who writes which part, and how the work is accepted.

Every rule has a number. A review that returns work cites the rule it fails — §3.2, not “this could be cleaner”. If a reviewer cannot point at a number, the work is accepted.

Read this together with the engineering guidelines. Where the two disagree on something specific to modules, this document wins; on everything else, the guidelines do.


1. What you are building

Rainty is one application. What changes from one customer to the next is which modules they see: an agenda, invoicing, photos, a treatment history. A module is a feature that can be switched on or off per user, and the application must behave identically whether it is there or not.

1.1 A module is a folder. frontend/modules/<key>/ in the rainty repository: a manifest, pages, components, an API client, translations and tests. Optionally a service of its own, services/<key>-service/, when the module has asynchronous work or external integrations. That is all you write.

1.2 It touches nothing outside itself, except one line: its entry in frontend/modules/index.ts, the list the shell reads. No shell file, no shared component, no other module.

1.3 The backend is ours. The tables and the API routes a module needs live in our data service. You do not write them: you propose them (§4), we review the proposal and put them in place, and you build against them. Nothing you write opens a database connection or calls anything but our public data service.

1.4 The module does not decide whether it is active. The shell builds menu and routes only from the modules switched on for the user; our API answers 403 MODULO_NON_ATTIVO for a module that is off. A module that checks its own activation, or hides its own menu entry, is returned.


2. The manifest

2.1 One file the shell reads: manifest.ts in the root of the module folder, typed as ModuloManifest from @vinovalab/app-shell.

import { lazy } from "react";
import type { ModuloManifest } from "@vinovalab/app-shell";
import type { PropsPaginaModulo } from "@rainty/nucleo";

export const manifest: ModuloManifest<PropsPaginaModulo> = {
  key: "agenda",                 // the module key, as given in the brief
  versioneContratto: 1,
  tipo: "menu",
  dipendenze: ["nucleo"],
  rotte: [{ id: "agenda", pagina: lazy(() => import("./pages/AgendaPage")) }],
  menu: [{ id: "agenda", etichetta: "agenda.menu", icona: "mdi:calendar-outline", ordine: 30 }],
  schedaCliente: [{ id: "agenda", titolo: "agenda.tab", componente: lazy(() => import("./components/TabCliente")) }],
  eventi: ["agenda.appuntamento.creato", "agenda.appuntamento.spostato", "agenda.appuntamento.annullato"],
  i18n: { it: () => import("./i18n/it.json"), en: () => import("./i18n/en.json") },
};

2.2 key is the one in the brief. It is the key of our module catalogue; a different key is a module nobody can switch on.

2.3 Labels are translation keys, never text. The namespace is the module key: agenda.menu, agenda.tab.

2.4 Everything visual is lazy. A module that is off must not be downloaded.

2.5 Events are declared. Every event type the module emits (§6) is listed in eventi; an undeclared event is rejected at runtime and in review.


3. The frontend

3.1 Pages are thin. A page loads data, holds state and assembles components. It defines no presentational component in its own file and carries no long block of markup.

3.2 One component per file, typed props, no fetching. A component receives its data from the page. The one exception is the customer-record tab (§5), which the shell mounts directly.

3.3 Use the design system. Card, Badge, Button, DataTable, EmptyState, ModalShell and the rest exist; a card or a table rebuilt with raw utility classes is returned. Inline classes are for layout only.

3.4 Imports. Allowed: @vinovalab/app-shell, @rainty/ui, @rainty/api, @rainty/i18n, @rainty/nucleo, files in your own folder. Forbidden: any file under frontend/modules/<other-key>/, any relative path into the shell. The check is automatic.

3.5 API calls live in api/, one function per route, built on @rainty/api: elencaAppuntamenti(), creaAppuntamento(). Never fetch in a component, never a call to anything but our data service.

3.6 Every string a user reads goes through t(), with the same keys in it.json and en.json. A string that does not change when the language is switched is a bug. Dates and numbers are formatted with the locale of the current language.

3.7 Responsive, mobile-first. The module ships on phones from day one.


4. The proposal

4.1 The first file in your branch is PROPOSTA.md in the module folder. Open the pull request as soon as it exists, even if nothing else does: our review starts there.

4.2 It is one page: the schema (rainty_<key>, one table per section with columns, types and notes), the routes (/rainty/<key>/…, with method, input and output), the events, whether the module has a service of its own, and which parts of the core it uses. What is not in the proposal is not built.

4.3 Every table carries organization_id. Foreign keys point only at the core (rainty.clienti, backbone_auth.organization, backbone_auth."user"), never at another module. A reference to another module’s object is a textual triple (module, type, id) with no constraint.

4.4 Names carry the module key, not a vertical. The same module runs for a personal trainer and for a real estate agent.

4.5 We answer within the next working day, with the schema and routes in place on the development environment, your development user switched on for the module, or with the corrections the proposal needs.

4.6 Changes along the way are expected. Update PROPOSTA.md, ask in the pull request; we add a migration. Keep the first proposal small: it is cheaper to add than to undo.


5. The core

5.1 Customers, timeline, activities and the customer record are the core, shared by every module. A module uses them through their API routes, never through their tables.

5.2 The customer-record tab. A module can register tabs in the customer record through schedaCliente. The tab component receives the customer id and the active organisation and loads its own data: it is the one component allowed to fetch, because the record is assembled by the shell, not by one of your pages.

5.3 The brief says what exists. Each challenge states which parts of the core are available at its date. Do not build on a part that is not listed.


6. Events

6.1 Every action that matters to a customer produces an event on their timeline: <key>.<object>.<past-participle> — agenda.appuntamento.creato, pagamenti.fattura.emessa.

6.2 Events are the only way modules talk to each other. Module A publishes pagamenti.pacchetto.esaurito; module B, if it is on, reacts. Neither knows the other exists. A module that imports, reads or calls another module is returned.

6.3 Events are written by our routes, in the same operation that creates the object. Your proposal says which route emits which event.


7. Your own service

7.1 Only when needed: queues, workers, scheduled work, an external provider. Logic that fits in the frontend plus plain CRUD routes does not get a service.

7.2 It starts from the service template and keeps what the template gives: logging, configuration, health, Redis. See Using the service template.

7.3 It reads and writes only through our data service. No database connection, no direct call to internal services.

7.4 It checks activation before working for a user. A worker that acts for a user whose module is off is a defect.


8. Where you work and test

8.1 In your workspace, against the development environment. Your frontend development server runs in the workspace and calls our development data service with your own development user. There is no local database to set up.

8.2 Your user has the module switched on by us, as part of §4.5. Nobody else sees the module until it is in a plan.

8.3 While a proposal is pending, work with fake data that matches it.

8.4 You do not deploy, build or migrate anything shared. Your branch and your pull request are the whole of what you push.


9. Acceptance

A module is accepted when all of the following hold:

9.1 The conformance checks pass: the manifest is valid, the key matches the brief, no forbidden import, every emitted event is declared, every translation key exists in it and en.

9.2 With the module switched on, its menu entry, pages and customer-record tab work; with it switched off, the entry is gone, its routes redirect to the overview, and nothing else in the application has changed.

9.3 The pages follow §3; the proposal in PROPOSTA.md matches what the module actually uses.

9.4 TypeScript builds with zero errors; tests exist for the manifest, the components and the hooks, and pass.

9.5 The work is a pull request on rainty from your own branch. We merge.

The first module of its kind gets a longer review: it becomes the reference the next ones are compared with. The brief says so when that is the case.


10. What stays ours

10.1 Everything outside the module folder: the shell, the core, the design system, the data service, the database, the module catalogue and the plans.

10.2 The contract is public and stays public. What you build on it is the work we commission.

10.3 It becomes part of a product. Your module will run for paying customers on their own data. That is the reason for §1.4, §3.4 and §4.3 — and the reason the review is what it is.


Versions

This document is versioned. The version in force when you claim a challenge is the version that challenge is reviewed against — a change published mid-window never applies to work already claimed.

Each version is published at vinovalab.ai/work-with-us/rainty-modules with its date and hash. Substantive changes are announced before they take effect.

Version 1.0 — 4 November 2026