Legal basics

The compliance vibe coders skip — until it costs them.

Building fast with AI is great, until a leaked key drains an account, a license is violated, or a client dispute has no contract behind it. None of this is hard once you know it. Here are the essentials every vibe coder should understand before they ship.

Education, not legal advice. This page explains common concepts in plain English so you can build responsibly. For a real contract, a dispute, or a specific situation, talk to a qualified Nigerian lawyer.

Six things to get right

Who owns AI-generated code?

Most AI coding tools (Claude, Cursor, Copilot) grant you the rights to the code they generate for you — but read each tool's terms, because they differ. Note that in some countries, code written purely by an AI with no human authorship may not be copyrightable on its own. The safest position is the VibeCoded one: you shaped it, reviewed it, and can explain it, so it is your work.

Open-source licenses

AI can suggest code that resembles licensed open-source projects. Respect licenses: MIT and Apache are permissive (keep the notice), while GPL is copyleft — using it can require you to open-source your project too. When you copy a library or snippet, check its license and keep attribution.

Never ship secrets

API keys, passwords, and .env files must never be committed to a repo or pasted into a public place. Use environment variables, add .env to .gitignore, and if a key ever leaks, rotate it immediately. A leaked payment or database key can cost you real money.

Data & privacy (Nigeria's NDPA)

Don't paste customers' personal data into AI tools, and collect only what you truly need. If you build anything that stores Nigerians' personal data, the Nigeria Data Protection Act applies: get consent, keep data secure, and let people delete their data. Treat privacy as a feature, not an afterthought.

Read the AI tool's terms

Each AI service has a terms of use that can restrict things like commercial use, reselling output, or using its output to train competing models. Skim them before you build a business on top of a tool, so a surprise clause doesn't undo your work later.

Simple client contracts

If you build for someone, a short written agreement protects you both: what you'll deliver, the price and payment schedule, who owns the final code, and what is out of scope. It prevents the most common disputes. Registering a business (CAC) adds credibility once you're working with real clients.

The honest-builder rule: never claim work you can’t explain, never ship code you haven’t reviewed, and never put someone’s private data somewhere you wouldn’t put your own. That single habit keeps you on the right side of almost every rule on this page.
Back to zero-to-pro