The web developers' guide
Every NinjaHQ gym site serves this guide at https://yourgym.com/developers (and as Markdown at /developers.md), and the connector hands it to an agent with get_developer_guide. Here it is with yourgym.com standing for the gym's address.
This guide is for web developers working on a gym's NinjaHQ website, and for the AI agent they use (ChatGPT, Claude or another MCP client). Gym owners can use every part of it too. Read it end to end before changing a site: it covers access, the safe way to work, the design system, pages, pictures, the menu, video, email designs, the checks your work goes through, and the rules that keep the gym safe.
Everything here works on every NinjaHQ site without asking NinjaHQ. If something you need is missing, ask through request_feature (or Request a Feature in the back office) and Peak Beyond builds it into the platform.
1. Access
- Your sign-in. The owner adds you on Staff in their back office (
https://yourgym.com/ninjahq-admin/staff) with the role Web developer. You sign in athttps://yourgym.com/ninjahqwith a code sent to your own email. There are no shared passwords. - What the role reaches: Pages (the page builder, with the design, Versions and the Section Library), Photos, Email templates, Menu, Logo & icon, Redirects, Website check, AI assistant, Request a feature, What's new, the Help Center and your own Sign-in & alerts. Your start page is
/ninjahq-admin/dev-start. - What it never reaches: customers, families, registrations, waivers, payments, staff and business settings. You cannot delete a page (unpublish it instead; the owner can delete).
- Your AI agent. Add the connector
https://yourgym.com/mcpto ChatGPT, Claude or any MCP client. It uses OAuth: you sign in with your email code and approve the app. A developer's app sees only the website tools listed in section 13. Callget_developer_guidefirst: it returns this guide. Access lasts an hour and renews for 90 days; you or an owner can disconnect it on the AI assistant page (/ninjahq-admin/connect). - Owners have every one of these tools, and more.
2. The safe way to work: site versions
Work on a copy, share it, then publish it. This is like a Shopify theme library.
- Start a version.
create_site_version { name, note }(or Pages > Versions > Start a Copy of the Live Site) copies the live site: the design, its custom CSS, every page, the menu, the logo and the icon. Nothing you change in a version touches the live site. - Edit inside it. Pass
version: <id>to the page and design tools (list_pages,get_page,create_page,update_page,add_section,update_section,move_section,duplicate_section,remove_section,set_design,get_design_system,check_page,preview_page). In the back office, open Versions and use the links under Pages in This Version. Leavingversionout works on the live working copy, page by page, as before. The menu, logo and icon in a version are the ones the live site had when the version started:set_menu,set_logoandset_faviconchange the live site, and publishing the version puts its own back. - Review it.
check_pageon each page you changed (section 10). Fix every error. - Share a preview.
site_version_link { version }gives a link (/pb/v/...) that shows the whole site from that version, every page, menu and logo, with a "Preview of <name>, not live" bar. Anyone with the link can view it (the owner, other developers, NinjaHQ). It is never indexed or cached, lasts 14 days, and can be renewed or turned off. Renewing ends the old link. - Publish it.
publish_site_version { version, confirm: true }runs the review, then puts the design, every page, the menu, the logo and the icon live at once. The previous live site goes into the library. Errors block a web developer; warnings needanyway: truewith areason. Every publish queues the website check (section 11). - Undo. The library keeps the last 20 live versions.
restore_site_version { version, confirm: true }(or Restore on Versions) puts one back in one step. Single pages also keep their own history (list_versions,restore_version).
Limits: 10 draft versions at a time. Publishing a version replaces unpublished edits made meanwhile on the live working copy of the same pages, so agree with the owner who works where.
3. Design system
get_design_systemreturns the current design: colours, fonts, sizes, corner radius, light and dark schemes, the custom CSS and its rules. Read it first.set_designchanges it (in a version, or as a draft), andpublish_designputs it live. Every colour pair is checked for WCAG AA contrast. A pair that fails is refused, with the reason.- Fonts are served from the site itself (no outside font services): Poppins, Barlow, Raleway, Montserrat and Saira Condensed (
get_design_systemlists them). If you need another font, ask throughrequest_featurewith its licence. - Site custom CSS:
set_design { custom_css }(or Custom CSS for the Whole Site under Pages), up to 60,000 characters. It goes into the draft design and applies to every page after the design's tokens once the design is published.custom_cssreplaces the whole site CSS, so read it withget_design_systemfirst and send it back with your change. - Page custom CSS:
update_page { css }, up to 20,000 characters. It is scoped to that page automatically: every selector is prefixed with[data-pb-page="/<slug>"].&,:scope,html,bodyand:rootmean the page wrapper.@media,@supportsand@containerwork inside it;@keyframesand@font-facestay global. - What CSS may not contain:
@import,@charset,@namespace,<, backslashes,expression(),javascript:, orurl()other than/fonts/...and/media/...(pictures and fonts on the site itself). The review (section 10) also flags removed focus outlines, text under 12px, fixed widths withoutmax-width:100%,position:fixed, hidden navigation or skip links, heavy use of!important, animation without aprefers-reduced-motionguard, andoverflow-x:hiddenon html or body. - No JavaScript and no raw HTML. The sites load nothing from other companies and run no custom scripts (section 11). Everything interactive comes from sections; if you need behaviour that doesn't exist, ask.
4. Pages and sections
list_section_typeslists every section type, its layouts (variants) and its fields, with limits. Today: Hero, Text, Picture and Text, Cards, Numbers, Quotes, Questions, Call to Action, Gallery, Logos, Steps, Pricing and Video. It also lists the site's live data sections (data:<key>: class schedules, competitions, coaches and similar), which draw live information and can be placed but not edited.- A page holds up to 80 sections.
create_page { title, slug, kind }makes one (title up to 80 characters). Slugs are lowercase words joined by dashes, up to three levels; the site's own addresses (shop, book, account and the like) are refused.update_pagesets the title, slug,seo { title (≤70), description (≤160) },nav { show, label, order }andcss. - Built-in pages (home, classes, schedule, competitions and the others) are builder pages too, made of live data sections you can surround with your own sections.
- Build with
add_section,update_section,move_section,duplicate_sectionandremove_section. Thencheck_page, thenpreview_page(a signed 24-hour preview), thenpublish_page. - Section Library (
/ninjahq-admin/page-builder/library) shows every section type with examples.
5. Pictures
- From a chat:
upload_photowith the file attached (ChatGPT and Claude hand files to the tool). - From links:
import_photo_from_url { url }or{ urls: [up to 20] }. Links must be https to a public address (never a private network), the answer must be an image, and the picture must be one the gym has the right to use. Up to 4 MB and 10 seconds each, at most 3 redirects, 60 downloads an hour. - From the owner's phone:
request_photo_uploadgives a private one-hour link for up to 20 photos. - Purposes:
gallery,coach_action,coach_headshot,team,home_hero,classes_page,pricing_page,competitions_page,party_roomandevent_flyer(both tools),product(upload_photoonly), andlogo,logo_on_dark,favicon(import_photo_from_urlonly, one link). Every picture is straightened, colour-corrected, resized for phones and computers as WebP, and stripped of camera and location data. Headshots are framed around the face. If the reply says the face couldn't be found, look at the Coaches page and send a closer crop. list_pictures/list_photosfind pictures;update_photosets the description (alt text: say what is in the photo, never "image of") and where else it shows (use_as).photos_to_describeshows you new photos that still need a description.- Logo and icon:
set_logo { image, image_url or image_base64 }(also_on_dark: truewhen the same logo works on dark backgrounds,on_dark: truefor a light version for the footer),set_favicon(made square for you). PNG, WebP or JPEG up to 4 MB; SVG is not accepted yet, so export a PNG (a logo at least 300 px wide, an icon at least 192 × 192). Owners and developers; not managers.
6. Menu
get_menureturns the current menu and every page that can go in it.set_menu { items }replaces it:[{ "label": "Classes", "path": "/classes" }, { "label": "Compete", "children": [{ "label": "Competitions", "path": "/competitions" }, { "label": "Results", "path": "/results" }] }]. Paths start with/and must be pages of this site; draft pages are left out. A dropdown holds 2 to 10 pages (one page becomes a plain item). At most 12 items; labels up to 24 characters.dry_run: trueshows the result without saving.reset_menugoes back to the standard menu. Owners and developers; not managers.- Keep it short: 5 to 7 top-level items read best on a computer's single row, and the menu opens as a list on phones.
- A site version keeps the menu the live site had when it started, and puts it back when it's published (section 2).
7. Video
The Video section takes a video the gym uploaded to its own library (at most 10, up to 2 minutes each, played from the site's own address with captions) or a YouTube link or id, a title (required), an optional poster from the site's own pictures, and text and buttons beside it (layouts: wide, video-left, video-right). Nothing plays or loads until the visitor presses "Play video: <title>"; a YouTube video then plays from youtube-nocookie.com. Without a poster, a plain dark picture with a play sign is shown (never YouTube's own thumbnail).
8. Redirects
get_redirects, add_redirect { old_address, goes_to }, remove_redirect { old_address, confirm: true }. Add one whenever you change a page's slug, so old links and search results keep working.
9. Email designs
Email templates (/ninjahq-admin/email-templates) holds every customer email in a block editor, with a preview and a test send to yourself. save_email_draft saves a draft through the connector. Which emails are sent, and to whom, stays with the owner.
10. Checks before you publish
check_page (and Review in the editor) returns findings as { severity, check, section, where, message, fix }.
- Content: alt text missing or poor; one h1 and no skipped heading levels; empty or very long headings; vague link words; buttons without a destination; contrast; pictures too small for their slot; very long unbroken words.
- CSS: the rules in section 3.
- Layout, in the editor: the page is rendered at 375×812 and 1280×800 and checked for sideways scrolling, elements sticking out, text under 12px, tap targets too small on phones, overlapping or touching buttons, cut-off words and stretched pictures. "Show Me" points at the problem.
- The gate: a web developer cannot publish while errors remain. Warnings need
anyway: trueand areason, which is kept with the version. The publish tools answerblockedorneedsAnywaywith the findings and what to do next.
11. After you publish: the website check
Every publish, by anyone, queues a full check of the pages it touched: the same layout review and accessibility scan (axe, WCAG 2.1 AA) NinjaHQ runs on its own changes, at 375 and 1280 px. A design, menu, logo or site version change checks the home page and up to 7 pages from its menu. The result shows on Website > Website check (/ninjahq-admin/website-check). The person who made the change, and NinjaHQ, get an email listing each problem in plain words, with the page and how to fix it. Fix what it finds in a new version or on the page.
12. Rules that protect the gym
These rules keep the gym out of lawsuits and demand letters. They apply to everything on the site:
- Privacy (CIPA and state privacy laws): nothing on the site may send visitors' data to other companies. No tracking pixels, tag managers, chat widgets, session recording, outside fonts or embeds that load before a click. The content security policy only allows the site itself, plus youtube-nocookie.com after a click. Analytics are NinjaHQ's own, without cookies.
- Accessibility (ADA, WCAG 2.1 AA): every page must pass the checks above, work with a keyboard, and work on a 375 px phone. No accessibility overlay widgets.
- Honest content: no invented reviews or numbers, and prices and policies that match what the gym sells.
- Children (COPPA): nothing collected from children under 13; parents sign and pay.
13. Tool reference (a web developer's connector)
- Pages:
list_section_types,list_pages,get_page,create_page,update_page,add_section,update_section,move_section,duplicate_section,remove_section,check_page,preview_page,publish_page,list_versions,restore_version. - Design:
get_design_system,set_design,publish_design. - Site versions:
list_site_versions,create_site_version,get_site_version,site_version_link,publish_site_version,restore_site_version. - Pictures:
list_pictures,list_photos,upload_photo,import_photo_from_url,request_photo_upload,update_photo,photos_to_describe,set_logo,set_favicon. - Menu:
get_menu,set_menu,reset_menu. - Redirects:
get_redirects,add_redirect,remove_redirect. - Words and emails:
get_website_words,update_website_words,save_email_draft. - Help and requests:
get_developer_guide(this guide),search_help,get_help_article,list_help_topics,get_overview,request_feature.