Reference

Frontend hosting

Hosting is included with every AALY project. Your agent writes the frontend, builds it, and publishes the build to https://<name>.aaly.cloud, served over HTTPS from a global CDN. The backend and the frontend live in the same project, so one address is the whole app.

Which frameworks can I host?

AALY hosts the static build of your app: HTML, CSS, JavaScript and assets. These frameworks work out of the box:

FrameworkBuild settingmode
Vite (React, Vue, Svelte, Solid)default (dist/)spa
Create React Appdefault (build/)spa
Next.jsoutput: 'export' (out/)static
Astrodefault static outputstatic
SvelteKitadapter-staticspa with an index.html fallback, else static
Plain HTMLnonestatic

Server logic goes in Functions. Serve the app from the site root, without a base path.

mode decides what a path without a file extension returns. spa returns /index.html, so a client-side router handles /bookings/42. static returns /about/index.html for /about. A missing file such as /app.js is always answered with a plain "Page not found" page, never with the home page.

The address

set_site(name="northside-fit") reserves northside-fit.aaly.cloud. Choose it with care:

  • it is permanent, and it's unique across all of AALY;
  • lowercase letters, digits and single hyphens, up to 63 characters;
  • reserved names (api, www, login...) and names that imitate a brand are refused.

Short and specific works best: the business plus what it is. Your agent offers two or three and lets you choose.

How do I deploy my app?

  1. Build the app, for example npm run build.
  2. Zip the contents of the build folder, so index.html is at the root of the zip: cd dist && zip -r ../site.zip .
  3. deploy_frontend returns a one-time upload command. Run it within 15 minutes.
  4. finalize_frontend_deployment publishes the build.
  5. Poll list_frontend_deployments until the newest deployment is ready and reachable: true.

ready means the files are published. reachable means AALY's smoke check fetched the live address and got an answer. The first publish of a new site can take about 90 seconds to become reachable while the address propagates.

The switch is atomic: visitors always get a complete version of the site. CDN locations pick up the change over about 20 to 30 seconds.

If a deploy needs a fix, its message lists every problem by path at once, and the live site keeps serving the previous deployment. The usual fixes: zip the build folder's contents rather than the folder, leave .env files out of the build, and use the static file types listed below.

Before announcing a new app, your agent signs in on the live address as the test user and walks through the main screens.

/aaly-config.json

AALY writes this file into every deploy, replacing any copy in your build. The app fetches it once at startup instead of baking settings into the build:

{
  "apiBaseUrl": "https://api.aaly.io/acme/studio_app",
  "projectId": "PRJ12",
  "env": "prod",
  "auth": {
    "signup": "/auth/signup", "signin": "/auth/signin", "google": "/auth/google",
    "refresh": "/auth/refresh", "logout": "/auth/logout",
    "forgotPassword": "/auth/forgot-password", "resetPassword": "/auth/reset-password",
    "header": "Authorization: Bearer <token>"
  },
  "publicSignup": false,
  "multiTenant": false,
  "emailVerification": "optional",
  "googleSignIn": false,
  "googleClientId": null,
  "liveTenantId": "TEN5"
}
FieldUse it to
apiBaseUrlCall the project's REST API
authFind each sign-in route
publicSignupDecide whether to show a sign-up screen
multiTenantExpect a "which organisation?" choice at sign-in
emailVerificationShow "check your email" after sign-up when it's required
googleSignIn, googleClientIdShow "Sign in with Google" only when both are set
liveTenantIdShow which workspace a user is in, on a single-tenant app. Sign-up doesn't need it

For local development, put a copy in public/aaly-config.json with the same apiBaseUrl. CORS is open on the AALY API, so both the hosted site and localhost can call it directly.

Sign-in pages every hosted app needs

  • Sign in, handling the "which organisation?" response.
  • Forgot password. The owner signs in the first time this way.
  • /reset-password. Once the project has a hosted site, reset emails link to https://<name>.aaly.cloud/reset-password?token=…. This is a page your app serves, built by your agent: it reads the token and posts the new password to /auth/reset-password. The email also carries a 6-digit code, so people can reset a password even before the site is live.
  • Sign up, when sign-up is open.

Details on Authentication. The email-verification page is served by AALY and links back to your app.

Caching and redeploys

index.html and /aaly-config.json are always fetched fresh, so a new deploy shows up on the next page load. Files whose names carry a content hash, such as app.3f9a1c7e.js (what Vite, Next.js and most bundlers produce by default), are cached for a year, which is safe because every build gets new names. Other files, for example a stable /app.js or /logo.png, are cached for an hour.

If your build uses stable file names, give each release a new name or a version in the URL (/app.js?v=2), so visitors get the new file together with the new page straight away.

Rollback

Every earlier ready deployment among the newest 10 can be made live again with rollback_frontend, with nothing to rebuild. Visitors see it within about 20 to 30 seconds. A frontend rollback leaves your data and your Functions as they are.

When the site is offline

SituationWhat visitors see
Site taken offline with set_site(status="suspended"), or suspended by AALY for abuseAn "unavailable" page
Project archived (lifecycle: archived)A "no longer available" page, until it's set back to live
Project paused by AALY (a payment is pending)A "temporarily unavailable" page, while the API answers PROJECT_PAUSED
Project suspended by AALYAn "unavailable" page, while the API answers PROJECT_SUSPENDED

Like deploys, these changes reach visitors in about 20 to 30 seconds.

Build sizes and file types

  • Up to 50 MB per zip, 2,000 files, and 10 MB per file.
  • File types: HTML, CSS, JS, JSON, source maps, images, fonts, audio and video, WebAssembly, PDF, text, XML, CSV, Markdown and web manifests.
  • One site per project.
  • Up to 10 deploys per site per hour, and 25 new sites per account in any 24 hours.

Hosting your frontend somewhere else? Set the site's app_url with set_site so sign-in emails link to your app's address.