---
title: "Who owns the code when you outsource software development?"
description: "Who legally owns custom-written code under an outsourcing contract, and how that gets decided."
og:
  image: images/app/opengraph/og-who-owns-outsourcing-code.png
---

# Who owns the code when you outsource software development?

Published on: 14-07-2023

Code ownership is one of the first legal questions that needs answering before a contract gets signed - and it matters more than most clients realize going in. Software code carries copyright like any other creative work. This article covers the specific case of work for hire, for an open-source web platform or application built on PHP and running on UNIX infrastructure.

## Code ownership in contract clauses

By default, the copyright owner of code is whoever wrote it. A contract can shift that - to the coder's employer, or to whoever's paying for the development. At Apidemia, our default contract stipulates that the client owns the code.

![Who owns the code when you outsource software development?](/images/pages/code-ownership.png)

## MIT license for frameworks and 3rd-party software

No serious software project starts from a blank file. Most start from a framework - the common functionality every project needs, like page navigation and user accounts - so that framework's ownership matters too. Every piece of code we use in our Dotkernel-based applications is [MIT licensed](https://opensource.org/license/mit/), from the custom code we write to the 3rd-party libraries underneath it.

If it's MIT licensed, what stops us from sharing your custom source code publicly? The contract does. The code isn't secret, and MIT is an open-source license, but access stays limited to the developers explicitly assigned to your project. More importantly: you own the source code, which gives you full rights over it under the MIT license. Anyone else who wants to use it needs to ask you, not us.

## MIT license, briefly

The MIT license is short and permissive - it lets you do essentially anything with the code as long as the original copyright and license notice stay attached to every copy. There are variations in circulation; here's the version we use.

**From the MIT license:**

"Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished to do so"

## How your code is actually structured

A simplified look at what a web application is made of:

- **3rd-party libraries** handle functionality like authentication or form validation - built by developers outside Apidemia. They save you from writing every feature from scratch, and they're generally more secure and stable for it. We check that every 3rd-party dependency is MIT licensed before it goes in; if a client requests something that isn't, we flag it before it's used.
- **The framework** combines the primary 3rd-party libraries with the base code every project starts from. Apidemia builds on three framework-like apps depending on the job - Frontend for the end user, Admin for high-level administration, and API for database interaction - often all three on a single project. Since every piece is MIT licensed, everything we build on top of it stays that way too.
- **The custom code** is written for your project against agreed Work Orders - a feature or update, a deadline, an assigned developer. This is the part 3rd-party libraries can't cover, and by default, it belongs to you.

So: the custom code built for your application - on Dotkernel or any other open-source stack - belongs to you.

## Why work with Apidemia on this?

Twenty years of PHP, and we're an official Laminas commercial vendor - one of a short list endorsed by the technology's own stewards.
Most of our engineers are ZCE (Zend Certified Engineers).
We build for the long term - projects that don't need a rewrite again in three years.

[Talk to us](/#contact) about your platform.
