Commission a custom web application with your own code repository
For founders and executives about to commission a custom web application: the contract clauses, repository set-up and handover that keep you free to change partner later.
On this page
You are about to pay for a custom web application, and one question matters as much as the feature list: when the project ends, who holds the keys? A custom web application with your own code repository means the code, its full history and the accounts it runs on sit under your name from the first day.
Most founders never need to leave their agency. The ones who do are glad they asked early, because staying with a good partner then becomes a choice, not a trap.
This guide covers the contract clauses, the GitHub set-up, the environments and the handover that make a change of partner a routine decision. It goes deeper on ownership than our general list of questions to ask a web development agency, and every step says what it protects.
Key takeaways
- Ownership is decided by the contract and by where the repository lives, so ask for both in writing before any work starts.
- Start the project in your own GitHub organisation, with the agency invited as collaborators you can add or remove at any time.
- Keep hosting, domains, secrets and third-party accounts under your company name, even when the agency runs them day to day.
- Test the handover with one simple check: could a new team deploy the app within a week using only the documentation?
Who owns the code in a custom web application
You should own it. Whether you do depends on two things: what the contract says and where the repository lives. Goodwill and good intentions, however sincere, appear in neither.
Default rules: the author owns it until a contract says otherwise
In many countries, copyright starts with whoever writes the code. When an agency builds your application, the agency or its developers can hold the rights until a written agreement transfers them to you. An invoice marked as paid, or a friendly promise that the code is yours, may not be enough on its own.
Ask for it in writing
In many jurisdictions the author keeps the rights until they are assigned in writing. Rules differ between the United States, Spain and each Latin American country, so have a lawyer in your own country review the clause. This article is not legal advice.
Think of ownership as a key that has to be handed over on purpose. Until that happens, the agency holds it, even when the work was built for you and paid by you.
Why a repository in your name is the proof of ownership
A contract states the right. A repository shows it every day. If the code lives in an account the agency controls, you depend on their goodwill each time you want a copy.
If it lives in your GitHub organisation and you hold the owner role, the agency works in your house as a guest. Nobody has to ask permission to see the code. The repository also records every change, who made it and why, and that history is part of what you own.
Contract clauses that put the code in your hands
Four clauses cover nearly every ownership question. Bring them to the first call as requests, not demands: a good agency has answered them before and will not be surprised.
IP assignment and when it takes effect
An IP assignment clause says the agency transfers all rights in the code written for you to your company. Ask when the transfer happens. The cleanest answers are on creation of the work, or on payment of each milestone, so you never sit in a gap where you have paid but not yet own.
Ask that the clause covers code, designs, database schemas and documentation. Watch for the word licence where you expected assignment. A licence to use the work can be limited or ended, and an assignment cannot.
Licences for third-party and open-source code
Every modern application contains libraries written by other people. Most carry permissive open-source licences such as MIT, which let you use the code freely. A few carry obligations you should know about before launch.
Ask for a list of dependencies and their licences, kept inside the repository. For any paid component or service, ask that the licence is issued to your company, not to the agency.
The agency's reusable tools and what you may keep using
Most agencies keep internal starter kits and helper libraries that speed up every project. That is reasonable, and it often lowers your cost. What matters is that anything embedded in your application stays usable by you.
A fair clause lets the agency keep ownership of its generic tools while giving you a perpetual, irrevocable licence to use them inside your app. Ask for that sentence in the contract.
Clause 1
IP assignment
Moves the rights in everything written for you to your company, so nobody can restrict how you use or change it.
Clause 2
Third-party licences
Lists every library and paid component with its licence, so no obligation surprises you at launch or in a sale.
Clause 3
Reusable components
Lets the agency keep its generic tools and guarantees you a lasting licence to run whatever sits inside your app.
Source code escrow: when it helps and when a repository is enough
Source code escrow means a neutral third party holds a copy of the code and releases it under agreed conditions, such as the agency closing. It helps when the agency keeps the code on its own systems, or when you license a vendor's product and cannot hold the source yourself.
When the code lives in your repository from day one, there is nothing to release. The repository does what escrow does, without a fee and without waiting for a trigger event. For a custom build, that is the simpler and cheaper route.
Put your custom web app repository in your GitHub organisation
This set-up takes an afternoon and makes ownership real from the first commit. Your company creates a GitHub organisation, you hold the owner role, and the agency joins as collaborators. The GitHub documentation on organizations (opens in a new tab) explains roles, teams and billing in detail.
Who creates the organisation and who holds the owner role
You do, with a company email address and your company's billing details. Name two owners, for example you and one trusted colleague, so a lost login never locks the company out.
The agency never needs the owner role to build your application. It needs write access to the repositories it works on, and nothing more.
Access for the agency that you can add and remove
Invite the agency's developers as a team with write access to the project repository. Turn on branch protection, so every change reaches the main branch through a pull request that someone reviews. A pull request is a proposed change, shown for review before it goes live.
When a developer leaves the agency, or you change partner, you remove one team and add another. The code, the history and the pipelines stay where they were.
Ownership set-up
- 01Your organisationYou hold the owner role
- 02Agency invitedCollaborators with write access
- 03Reviewed release pathPull request, staging, production, all yours
- 04Swap collaboratorsRemove one team, add another
Four steps showing how your GitHub organisation keeps the code in place while agency collaborators change
What a healthy history of commits and pull requests shows
A commit is one saved change. A healthy history has small, frequent commits with plain descriptions, and pull requests that say what changed and why. You do not need to read the code to benefit.
Skim the pull request list once a month, as a free progress report. Frequent, reviewed, clearly described changes are a good sign. Long silences followed by one giant change deserve a conversation.
Environments, CI and deployment you control
Code alone does not run a business. An environment is a place where the code runs: staging for testing, production for customers. CI, short for continuous integration, runs automated checks on every change. Deployment sends the checked result live.
Hosting and domains in accounts under your name
Register the domain with your company, and keep the DNS records in your account. Put hosting in an organisation account owned by your company, with the agency as team members. Whether the platform is Vercel, AWS or another provider, the principle is the same.
Billing to your card has a side benefit: you see the real running costs of the application, with nothing added on top.
Staging and production with a repeatable deployment
Deployment should run from the repository as a pipeline, not from one developer's laptop. If a documented pipeline publishes the app, a new team can run it too. If only one person knows the steps, that person is a single point of failure.
Ask for a staging environment that mirrors production. It lets you approve changes before customers see them, and it gives a future team a safe place to practise.
Secrets, keys and third-party accounts
Passwords, API keys and payment credentials are secrets. The Twelve-Factor App (opens in a new tab) method says configuration belongs in the environment, outside the code. In practice, secrets live in a store under your account and never inside the repository.
Keep a list of every third-party service the app uses, such as payments, email, maps and analytics. Next to each one, write who owns the account and who can reset the password.
Documentation and a handover checklist
A new developer should be able to run your application on day one using only what is in the repository. Write that into the statement of work as a paid deliverable, so documentation is checked at each milestone and never a favour at the end.
What a new developer needs on day one
Four items cover most of it: a README with the steps to run the app, a list of environment variables (the names, never the values), a one-page architecture note, and the database schema with the backup routine.
Add a security review before launch. The OWASP Top 10 (opens in a new tab) lists the most common web application risks, and asking the agency to check the app against it, and to note the result, gives a new team a clear starting point.
A handover checklist to request at every milestone
Asking at each milestone keeps the effort small. A short update every few weeks is easier than a rushed document in the last days of the project. Put this list into the statement of work.
- Your organisation holds the repository, with two owners and the agency invited as collaborators
- A README explains how to install, run and test the app
- A list of environment variables, with names and purpose, and no values
- Deployment instructions, with the pipeline stored in the repository
- A one-page architecture note: main parts, data flow, external services
- Database schema, backup schedule and the steps to restore a backup
- A list of third-party accounts, each with its owner and renewal date
- Domain and DNS records, registered and managed in your company account
Setups that tie you to one agency
Lock-in is rarely deliberate. It usually grows from convenience: the agency hosts everything because it is quick, or uses its own framework because it knows it well. The aim is to spot these setups early and ask for a different arrangement, without blaming anyone.
Agency-owned hosting and accounts
When hosting sits in the agency's account, moving means asking them to export the app and wait for it. The same applies to a domain registered in their name or to app store and analytics accounts.
The fix is easy to request: accounts in your company name, with the agency administering them as team members. Day-to-day work stays the same, and the ownership is yours.
Proprietary frameworks and closed builders
Two things make a later switch harder. One is a framework that only the agency uses. The other is a closed builder that does not let you export the source code.
Standard, open frameworks have large communities and many developers who already know them. Next.js, the React framework that werun.dev recommends for SaaS builds, is one example. Any competent team can take over a well-documented app built on it.
Hard to leave
Agency-owned setup
- Hosting and domain in the agency's account
- In-house framework or closed builder
- Code kept on the agency's own servers
- Credentials known only to the agency
Our pick for this case
Your accounts, open tools
- Hosting, domain and DNS in your company accounts
- Standard open framework with a wide talent pool
- Repository in your GitHub organisation
- Secrets in a store you control
Questions that surface lock-in in a first call
Five questions bring most lock-in into the open within minutes. A confident agency answers them plainly.
- Which accounts will hold the repository, hosting and domain, and in whose name?
- Which frameworks and tools will you use, and can another team work with them?
- When do the rights in the code transfer to us, and where is that written?
- What will the handover include, and when do we receive each part?
- If we wanted to move in a year, what would you hand over, and how long would it take?
What it costs to leave, and how to keep it low
Switching partner always costs something, because a new team needs time to learn the application. The size of that cost depends on choices made in the first weeks of the project, and you can shape them now.
Where the cost of a switch comes from
Three sources account for most of it. The first is recovering access, which can take days or weeks when accounts sit with the old partner. The second is understanding an undocumented app. The third is moving hosting and pipelines to a new place.
For example, imagine a new team that needs two weeks to reverse-engineer an undocumented app and one more to rebuild its hosting. With a README, a pipeline in the repository and accounts already in your name, the same team might be productive in a couple of days. The saving comes from decisions you make at the start.
A test: could a new team deploy it in a week?
Ask a developer outside the project, such as a trusted freelancer or another agency, to clone the repository and deploy it to a fresh staging environment. They may use only the documentation. If they succeed within a week, you are free to leave.
If they get stuck, the gaps they report become your to-do list for the current partner. Run the test at launch and again once a year. It costs a few hours of a developer's time and tells you exactly where you stand.
A one-off project does not have to end the relationship. Whether the app then continues under a Retainer or a Care plan, or moves to another team, is your decision. See how engagements at werun.dev are structured.
How werun.dev delivers your repository and project view
You set the goal, and we build the way there in a place you own. That is how we run custom application projects, so the freedom to change partner is part of the delivery from the start.
Your repository from day one
We start in your GitHub organisation, with your accounts for hosting and domains, and work as collaborators you can add or remove. Custom applications are built on Next.js, an open framework many teams know, as described on our custom apps page.
The handover checklist above becomes part of the statement of work, delivered milestone by milestone. When you write to us, you get a reply within 2 hours on business days.
Client panel for projects, requests and invoices
The client panel shows your projects, your requests and your invoices in one place. You see what is being built, what you asked for and what it costs, with no digging through email.
The same transparency applies to the code: the repository shows the work, and the panel shows the plan around it. Together they let you judge progress without being technical.
Where to start this week
Start with one honest check. Find out where your code, domain and hosting live today, and in whose name. If any of them sit in an agency account, ask for read access to the repository this week and run the one-week deployment test.
If you are about to commission a new application, create the GitHub organisation yourself with two owners. Then add three requests to your brief: IP assignment on payment of each milestone, hosting and domains in your name, and a handover checklist at every milestone.
When you are ready, tell us your goal through the contact page. If you want to see what we build first, browse our solutions.
Frequently asked questions
Who owns the code when an agency builds a custom web application?
It depends on the contract and on local law. In many countries the author keeps the rights until they are assigned in writing, so ask for an explicit IP assignment to your company and have a local lawyer review it.
Should my custom web app live in my own GitHub repository?
Yes. A repository in your GitHub organisation, with you as owner and the agency as collaborators, gives you the code and its history at all times. You can add or remove developers without moving anything.
What contract clauses protect code ownership with a web agency?
Four matter most: an IP assignment that states when rights transfer, a list of third-party and open-source licences, a lasting licence to the agency's reusable tools embedded in your app, and a handover obligation at each milestone.
Do I need source code escrow for a custom web application?
Usually not. Escrow helps when the agency keeps the code on its own systems. If the code lives in your repository from day one, you already hold what escrow would release, without the fee or the wait.
What should an agency hand over when a custom app project ends?
The repository with full history, a README with run steps, the environment variable list, deployment instructions, an architecture note, the database schema and backup routine, and a list of third-party accounts. Domain and hosting should already be in your name.
How do I switch development agencies without rebuilding the app?
Make sure the code, hosting and domain are in your accounts, then add the new team as collaborators and remove the old one. A new team should be able to deploy the app from the documentation. Test this with a deployment check before you decide.