Problem
Purple Network built Kiwici for teams and agencies that ship sites and apps without a DevOps engineer. A user connects a Git repository, sets up environments with variables, domains and databases, and runs build and deploy. Builds run on Jenkins and environments on Kubernetes, and the user never has to touch either.
All of that happens in the dashboard: projects and environments, build pipelines with live logs (rerun, cancel), databases and SFTP users, Git provider connections, team invites with roles, billing, and an AI assistant that streams its answers.
Architecture
The dashboard is a React single-page app. It talks only to the Kiwici API (Symfony and API Platform), with a Cognito token. The API keeps its data in MySQL, starts builds on Jenkins, manages environments on Kubernetes and bills usage through Stripe. Git access goes through a separate Laravel service, the Git gateway, which handles OAuth with GitHub, GitLab and Bitbucket and returns repositories, branches and clone credentials.
Scope
Mine
- The dashboard, almost all of it (1,106 of 1,257 commits), and the landing page
- The frontend architecture and the tests that enforce its rules
- The end-to-end stack and suite
- Part of the Git gateway: repository listing for the three providers, the GitHub App installation, grants per connection
- API changes for the Git flow, environment creation and user visibility across shared workspaces
Other teams
- Most of the API, the data model and billing (Purple Network backend team)
- Build and runtime infrastructure: Jenkins and Kubernetes
Key decisions
Enforce the frontend rules with tests
Why. Several people work on the codebase, and it keeps growing. The rules themselves are simple: the view renders, a controller hook decides, a service talks to the API, and every external input goes through Zod. I enforce them with architecture tests. Each test counts violations per file and checks them against a list of known debt. A new violation fails the test. So does a fixed one, until someone lowers the number in the list. Before each commit, AI review agents check the same rules.
Trade-off. The checks are regex scans. They miss edge cases, and code review still has to catch those. And the known-debt lists stay until someone fixes the code they count.
End-to-end tests that run offline
Why. Signup, invites, payment and Git connections cross a lot of services. The end-to-end stack I set up runs the real frontend, the real API and MySQL with every migration applied, and simulates only the third parties: Cognito, Stripe, Jenkins and the Git gateway. The tests need no network and no keys, and they give the same result every time.
Trade-off. Some things only the real services can check, like 3-D Secure and email delivery. The first start is also slow: 90 migrations, 5 to 7 minutes.
One gateway for three Git providers
Why. GitHub, GitLab and Bitbucket each have their own OAuth flow, tokens and API. The gateway puts one REST interface in front of all three, and the dashboard only ever talks to the Kiwici API. Adding a provider or changing a token flow doesn’t touch the frontend.
Trade-off. It is one more service to deploy and monitor. Its errors also have to reach the user with a clear reason, so the API passes them through to the dashboard.
In code
An architecture test that can only get stricter:
import known from "./zod-usage.known.json";
describe("Zod usage — ratchets", () => {
CHECKS.forEach((check) => {
it(check.name, () => {
const actual = check.counts(sources); // violations per file
const allowed = known[check.name] ?? {};
const report: string[] = [];
for (const file of new Set([...Object.keys(actual), ...Object.keys(allowed)])) {
const n = actual[file] ?? 0;
const limit = allowed[file] ?? 0;
if (n > limit) report.push(`${file}: ${n}, ${limit} allowed — ${check.rule}`);
if (n < limit) report.push(`${file}: ${n}, list says ${limit} — lower it`);
}
expect(report.join("\n")).toBe("");
});
});
});Results
- 157
- tagged releases of the dashboard
- ~2,500
- unit tests, including the architecture checks
- 32
- end-to-end tests on a hermetic stack
The dashboard is in production, and I still ship new releases. Usage numbers are Purple Network’s to share.