WebRobot

App Studio guide

Sample app 3 / 5 · Public funding for small businesses and their consultants

RadarAgevolazioni

What was asked

Every morning the app reads the new calls for funding and scores each one against the company’s profile (sector code, region, size, planned investment), with what is met and what is missing. The company can have an application draft written; its consultant reviews and approves it before the company downloads it.

How the manifest models it

Who

Companies sign up. The consultant role is derived: whoever is named in a company profile’s consultant_email holds it, with no invitation, and keeps it while a record names them.

Data

Profiles, matches and drafts belong to the company; access rules give the assigned consultant the records that name them (read and edit the profile and drafts, read the matches). Drafts are deleted after two years. Calls belong to the app.

Events

A new draft emails the consultant with a link to the approvals; an approval of draft_review (by the consultant, rejected after seven days) starts the agent that finalises it; the draft turning approved emails the company.

Time

The app reads the calls at 04:00; each company’s radar (a template, one per user, minimum score as a parameter) runs at 06:00 and emails the compatible calls only when there are new ones.

Views

For the company: profile form, a dashboard with figures and the compatible calls, drafts, history. For the consultant: assigned clients, their matches, the drafts to review, the approvals.

Money

A subscription for the radar, and credits for the drafts: 40 credits each, packs of 3 or 10; at most 10 drafts a day.

From the manifest: A derived role, an approval, three events

An excerpt: 46 of the manifest’s 860 lines, copied as they are.

spec:
  auth:
    roles:
    - key: consultant
      label: Consulente
      assignedBy: derived
      from: collection:company_profiles.consultant_email
  approvals:
  - key: draft_review
    title: Revisione bozza di domanda
    description: Il consulente rivede e approva la bozza prima che il cliente la scarichi.
    role: consultant
    fields:
    - grant_title
    - draft_id
    timeoutMinutes: 10080
    onTimeout: reject
  triggers:
  - key: draft_to_review
    'on':
      collection: drafts
      op: insert
    notify:
      to:
      - record.consultant_email
      subject: 'Nuova bozza da rivedere: {record.grant_title}'
      body: Un cliente ha una bozza di domanda in attesa di revisione.
      link: approvals
  - key: draft_approved
    'on':
      approval: draft_review
      decision: approved
    start:
      agent: finalizer
    goal: 'Approvazione concessa. Evento: {event}. Imposta status approved sulla bozza indicata da draft_id.'
  - key: draft_ready
    'on':
      collection: drafts
      op: update
      where:
        status: approved
    notify:
      to: owner
      subject: 'La tua bozza è pronta: {record.grant_title}'
      body: Il consulente ha approvato la bozza. Puoi scaricarla dall'area Le mie pratiche.
      link: my_drafts

The whole manifest · RadarAgevolazioniDownload
Loading…

The result

The home page.
The home page.
The company’s dashboard: figures, compatible calls with what is met and missing, the radar.
The company’s dashboard: figures, compatible calls with what is met and missing, the radar.
Signed in as the consultant: only the client that names them.
Signed in as the consultant: only the client that names them.
The drafts the consultant has to review.
The drafts the consultant has to review.

What it cannot express yet

Nothing: everything the description asked for is in the manifest’s own constructs.

What the manifest cannot express goes into spec.extensions, in words, so nothing is lost silently. A sample generated by the co-pilot; the records in the screenshots are made up.

← NormaVigile← All five appsGruppi in Partenza →