Blog / Framer & site building /

What to document when a Framer project has custom code

The client opens their Framer project and finds a block of custom code. Nobody knows whether it powers the contact feature, adds tracking or belongs to an experiment that ended months ago. Deleting it feels risky. Leaving it alone feels risky too.

Custom code needs a handover record because its purpose isn’t visible on the canvas. I’d document what it does, where it runs, what it depends on and how someone can test or remove it safely. The record should help a future maintainer make a decision, not just admire the work.

Start with the purpose

When I hand over a project with code in it, I describe the user or business problem the code addresses. “Custom script” is a location label, not an explanation. State the visible behaviour or operational result that would be missing without it.

Separate the intended effect from implementation detail. A client needs to know the form sends information to an approved service long before they need to know how the script does it.

Include why a native or simpler approach was not used where that decision matters. Keep it brief. It helps a later maintainer judge whether the code is still needed.

Identify its location and scope

Record where the code is configured in the actual project and which pages or components depend on it. Note whether its effect is site-wide or limited to a particular route.

Framer’s own custom-code guidance describes the supported configuration area, but the handover needs the project-specific inventory as well. A generic link can’t tell anyone which script belongs to their site.

Name related components, fields or external files in a way the maintainer can locate. Avoid relying on “the script near the bottom” when several people may add code later.

List dependencies and ownership

Identify external libraries, services and accounts the code relies on. Record the business owner and technical maintainer for each relevant dependency. A service working today does not explain who responds if access or billing changes.

Keep credentials out of the documentation. Point to the approved secret-storage process instead. If anything sensitive has ended up in public client-side code, get the responsible technical person to review the exposure.

Note any data sent outside the site and its purpose. The person responsible for privacy and service approval needs enough information to understand the flow, without copying personal data into the handover.

Explain the inputs and outputs

Describe which fields, identifiers or page states the code expects. If it relies on a particular element or naming convention, say so. A harmless-looking design edit can break a script that depends on that structure.

Explain what success looks like and where to verify it. A visual effect can be checked on the page; a service handoff may require confirmation in another system. Identify the relevant test without implying that the visible interface proves the whole process succeeded.

Include the expected failure behaviour. If the external service is unavailable, should the page remain usable, show a message or offer another route? A maintainer needs to know what was intended before diagnosing a fault.

Record how it was tested

Keep the relevant pages, device conditions and interaction states with the test result. State which checks require a published or approved testing environment rather than assuming editor preview exercises every dependency.

Use safe test inputs and protect information in screenshots or logs. A troubleshooting record should not expose customer submissions, access tokens or internal account details.

Test the surrounding journey as well as the feature. A script can perform its own task while disrupting navigation, keyboard use or another component. Note the boundaries of the review so later staff know what still needs checking.

Make removal understandable

Document the consequences of disabling the code and any cleanup required. A removed script may leave a button, help instruction or external account that still needs attention. Include those relationships.

Save an appropriate version reference and describe the recovery route. Do not rely on someone copying code into an unlabelled chat message. The maintainer should know which version is approved and where its history belongs.

If the code was temporary, give it a review trigger. Experiments have a habit of becoming permanent simply because the removal decision was never assigned.

Keep the note with the work

Update the record whenever the behaviour or dependency changes. A detailed note describing an obsolete implementation can be more misleading than a short current explanation.

I like to ask someone who did not build the feature to locate the code, explain its purpose and identify its test. Their questions reveal which part of the handover still relies on memory.

Document the permission to change it

A future editor needs to know which adjustments are routine and which require technical review. Changing a displayed label may be different from altering an endpoint, identifier or dependency. Explain those boundaries with the actual feature as the example.

Record the approval owner for changes that affect data flow, measurement or customer commitments. The original author shouldn’t be the permanent bottleneck, but handing over needs enough context to be safe.

If the code is supplied by an external service, keep the vendor reference and the reason it is used. Note any project-specific modification so a future update does not overwrite it accidentally.

During handover, ask the client to identify the first step they would take if the feature stopped working. A clear escalation route and a reproducible test are more useful than a document that explains every line of code but leaves ownership uncertain.

Choose one unexplained code block in the project today. What would the client need to know before they could confidently keep, change or remove it?