APIs, testing, accessibility and secure deployment

The four things that separate a demo from something you can leave running.

advanced9 minChecked 2026-09-06

What you will be able to do

Ship a small application with credentials handled properly, tests that mean something, and accessibility checked.

Before you start

  • Comfort with a terminal and version control.
  • A deployed project to improve.

Secrets, once and properly

API keys belong in environment variables, never in code and never in a client-side bundle. A key in a public repository is compromised the moment it is pushed, and rotating it is the only fix.

If a browser needs to call an API that requires a secret, the call goes through a small server you control. There is no client-side way to hide a key.

Tests that specify behaviour

A test that asserts a function was called proves nothing. A test that asserts the right output for a known input, including edge cases, is a specification you can hand to a person or an agent.

Write the awkward cases: empty input, wrong type, the boundary value, the duplicate.

Accessibility as a build step

Run an automated check in the pipeline — it catches contrast, missing labels and structural problems. Then do what automation cannot: operate the whole thing with a keyboard, and check it at 200 per cent zoom.

Automated tools find a minority of real issues. They are the floor, not the ceiling.

Step by step

  1. Move every secret to an environment variable and confirm none is in the repository history.
  2. Add tests for the awkward inputs, not the happy path you already trust.
  3. Add an automated accessibility check to the build.
  4. Tab through the whole application without a mouse.
  5. Check the deployed version, not just the local one.
  6. Add security headers and confirm they are being served.
Pre-deployment review
Review this project for deployment readiness.

Check specifically: secrets in code or history; unvalidated user input reaching a query or the DOM; missing error handling on network calls; accessibility problems in the markup; and dependencies with known issues.

For each finding give the file, the line, why it matters and the smallest fix. Do not rewrite anything yet.

What good looks like

  • No secret appears anywhere in the repository or its history.
  • Tests fail when you deliberately break the behaviour.
  • The whole application is keyboard operable.
  • Headers are present on the deployed site, not just configured locally.

What it cannot do

  • Automated accessibility checks find only some issues.
  • Generated security advice needs verification against current guidance.

When it goes wrong

A key committed and then deleted.
It is still in the history. Rotate the key. Removing the file is not enough.
Green tests, broken feature.
The tests assert implementation rather than behaviour. Test what a user gets.

Privacy and data handling

Deployment is where data protection becomes real. Know what you collect, why, where it is stored and how long you keep it, before you launch rather than after.

Sources3 referenced
  1. Guidelines for secure AI system development

    National Cyber Security Centre · security guidance · link checked 2026-09-06

  2. Web Content Accessibility Guidelines 2.2

    W3C · standard · link checked 2026-09-06

  3. Deploy a site — Netlify documentation

    Netlify · official product documentation · link checked 2026-09-06

Links are checked at build time. If one has moved, tell us.

Written by
BLACK LDN
Last checked
2026-09-06
Content state
editorial

Product behaviour changes. If something here no longer matches the documentation, send a correction.

Read next

Building something9 min

Turn a small idea into a working app

The discipline is not technical. It is refusing to build the second feature before the first one works.

intermediate

Checked 2026-09-06

Using it responsibly9 min

Privacy and sensitive information

The question is not whether these tools are safe. It is what you are permitted to put into them, and what happens to it afterwards.

beginner

Checked 2026-09-06

Next: Privacy and sensitive information