# Web Apps — host your own school apps on PortalHQ Web Apps lets your school build small custom tools — a fee calculator, a house points board, a uniform shop catalogue, a club directory — and host them right inside your portal. You (or anyone at your school, with help from tools like Claude or ChatGPT) write a simple app in HTML, CSS and JavaScript; PortalHQ hosts it securely at your school's address, controls who can open it, and gives it something a plain HTML file can't have on its own: **shared data storage**, so a change saved by one staff member is instantly what every parent and student sees. Every web app gets: - **Its own address** — `https://yourschool.portalhq.com.au/apps/your-app/` - **A settings document** — one shared block of configuration your app can read and authorised staff can update (e.g. this year's fees) - **Collections** — structured lists of records with fields you define (e.g. a list of clubs, events or products), managed through PortalHQ or from the app itself - **Access control** — public, logged-in members only, staff only, parents or students, chosen per app and per piece of data --- ## Before you start 1. **The module must be enabled for your school.** If you don't see **Web Apps** in the staff sidebar, contact PortalHQ support to have it switched on. 2. **You need the "web apps admin" permission.** Portal admins have access automatically and can grant *Is web apps admin* to other staff via **Members → Staff → (person) → Permissions**. Only staff with this permission can create apps, upload files or change schemas. That's deliberate: uploaded JavaScript runs on your portal's address, so uploading is trusted, admin-level work — treat app code with the same care as a newsletter that goes to every family. --- ## Creating a web app 1. Open **Web Apps** in the staff sidebar and click **Add Web App**. 2. Fill in: - **Title** — e.g. *Fee Calculator*. The URL is generated from this (you can set your own in the **URL** field; a few names like `staff` and `api` are reserved). - **Status** — start as **Draft**. Draft apps are only visible to web apps admins, so you can build and test privately. Switch to **Published** when ready. - **Who can open the app** — see [Access levels](#access-levels) below. - **Settings read/write access** — who may read and change the app's settings document (defaults: read *Anyone*, write *Staff only* — right for most apps). - **Allow embedding** — tick this if the app will be shown inside an iframe on your school's public website. 3. Click **Save**. You'll land on the app's page, ready for files. --- ## Uploading your app's files Your app is just files — at minimum one `index.html`. From the app's page you can: - **Upload files** — pick one or more files, optionally into a folder (e.g. `assets/images`). - **Upload a zip** — zip your whole app folder and upload it in one go. Folder structure is preserved, and if everything sits inside a single top folder (typical when you zip a `dist/` folder), that folder is stripped so `index.html` lands at the top. Junk entries (`__MACOSX`, `.DS_Store`) are skipped automatically and anything else skipped is reported to you with a reason. Things to know: - **`index.html` is the front door** — it's what loads at `/apps/your-app/`. - **Re-uploading a file with the same path replaces it.** Deploying an update is just uploading the new zip. - **Allowed file types**: HTML, CSS, JavaScript, JSON, text/markdown/CSV/XML, images (PNG, JPG, GIF, SVG, WebP, AVIF, ICO), fonts (WOFF/WOFF2/TTF/OTF), PDF and web manifests. Executables and anything else are rejected. - **Limits**: 5 MB per file, 50 MB per app, 500 files per zip. - **Apps must be self-contained.** For security, apps can't load scripts, styles or fonts from external websites (CDNs) — bundle everything into your uploaded files. Inline `