Home/Docs

Documentation

How AppWand works, what it writes, and how to take your app from a description to a live API.

Projects

A project is a folder in Documents\AppWand\Projects\<name>. It holds three things:

  • api/: a Node.js API built on Express, with Sequelize models for your tables.
  • app/: a Flutter app using Riverpod, go_router and dio.
  • appwand.json: the plan for each page (its route, purpose, tables and who can open it) and your project settings.

The code on disk is the source of truth. AppWand never keeps a hidden copy of your pages. If you edit a file in another editor, AppWand sees the change.

The bar across the top of a project is the way through it: Data, Plan & Design, Build, Check and Deploy. Each step's dot shows its state, and you can move between them at any time.

Data

Every app starts with its tables. There are two ways in.

Describe a new app

From Home, describe what you want to build and connect an empty MySQL or PostgreSQL database. AppWand proposes the tables as SQL. Read it, ask for changes in the prompt bar, or edit it on the SQL tab, then apply it. The diagram updates from your real database.

Start from your database

Choose Start from my database on Home and pick a database you already have. AppWand reads its tables and opens on Data, where Build the app starts the rest. If it can't tell which table people sign in with, it asks you, or offers to add an accounts table.

Sample data

Sample data on the Data view fills the tables you tick with realistic rows. Related tables are filled in the right order, ids never clash with rows you already have, and sample accounts sign in with the password password.

Changing the tables later

When you change tables that pages already use, Data offers Update the pages, which plans the code changes for you on the Plan view.

Plan & Design

Once the tables are in place, AppWand plans the app: its pages, their routes, the menu order, and the roles that can open each page. Each page also gets a pattern: list, detail, form, dashboard, master–detail or custom.

  • Reorder pages to change the menu, add a page, or re-plan from scratch.
  • App theme sets the brand colour, the style (nine to choose from), how notifications look, and whether the app follows the system's light or dark mode.
  • App layout picks the navigation: a sidebar, bottom tabs, a top bar, or a launcher grid.
  • App settings holds the name, the logo and the API's port.

The prompt under the plan's header takes requests about the whole app, like "let people create an account" or "add a users page for admins". AppWand answers with steps (a database change, new pages, edits to existing pages), and you untick any you don't want before it runs them.

Build and edit

AppWand writes every page at once, a few at a time in parallel. Select a page in the Explorer to see its API code and UI code. Both are full code editors with Dart and JavaScript language servers, so you get completion, hover and live errors.

Asking for changes

Type what you want in the assistant panel. The answer comes back as a change to review: a diff per file, each with a tick box. Accept it, untick files, or ask for a revision. Nothing is written until you accept.

Suggestions

Suggest features reads the page and offers ideas, both new features and ways to modernise what is there. Build it turns an idea into a reviewed change. More ideas asks for ones you haven't seen.

A page only ever touches its own two places: api/src/routes/<page>.js and app/lib/features/<page>/. Shared wiring such as the router, the menu, sign-in security and the theme belongs to AppWand's base app, so an AI change to one page can't break another.

Check

After every accepted change or save, AppWand checks the app: flutter analyze for the Flutter side, and a load of every API route for the Node.js side. The Check stage turns amber when something needs attention, and editors mark the lines.

The Check view groups problems by the page that owns them. Each group has Fix with AI, which comes back as a change to review like any other. Click a row to jump to the line.

Run

Run starts the API and the app in the built-in terminal. Pick Windows, Chrome or an Android device. Hot reload brings your changes into the running app without restarting it.

Deploy

The Deploy view puts your API online at https://<your-app>.appwand.io.

  • It runs a check first, and won't deploy if API routes fail to load.
  • The first deploy copies your local database, with or without its rows, and your uploaded files.
  • Deploy again keeps the live data. If you added tables, columns or foreign keys locally, they are added to the live database first. Tables or columns that only exist live are kept, never dropped.
  • A new version starts beside the old one and must pass a health check before traffic moves, so updates have no downtime.
  • Run on the live API starts your app on Windows, Chrome or Android against the deployed API.
  • Take offline deletes the deployed API, its database and its files.

Changed column types and new indexes on existing tables are not detected by Deploy again. For those, use Replace the live database in the card's More menu, which overwrites the live data with your local copy.

Sign-in and roles

Every AppWand app has sign-in. Passwords are hashed with bcrypt, sessions use signed tokens, and the security steps live in the base app where page code can't change them.

The sign-in screens themselves are your code, kept in the Sign-in section above Pages in the Explorer. Edit them like any page. Reset to the default brings back the original screens.

If your accounts table has a role column, each page can be limited to some roles. Access is enforced twice: the API refuses the request, and the app hides the menu entry and redirects.

The generated code

WhereWhat
api/src/routes/<page>.jsA page's API. Mounted at /api/<page> behind sign-in and its roles.
api/src/models/A Sequelize model per table, with associations from your foreign keys. Regenerated when the tables change.
api/src/middleware/validate.jsZod validation for params, queries and bodies. Errors come back as plain sentences per field.
api/src/uploads/File uploads, served at /uploads/.
api/.envDatabase connection, port, rate limits and the token secret.
app/lib/features/<page>/A page's Flutter screens. The entry is <page>_page.dart.
app/lib/core/The theme, the API client, sign-in state, shared widgets and helpers.
app/lib/app/router.g.dartRoutes and menu, generated from the plan.

Run the API yourself with npm start in api/, and the app with flutter run in app/. To point a build at your deployed API:

flutter run --dart-define=API_URL=https://your-app.appwand.io/api