---
title: "From Lovable to UpCloud: A Masterclass in Human-AI Synergy and Zero-Trust Serverless Architecture"
slug: from-lovable-to-upcloud-human-ai-synergy
summary: "The story of migrating Repromptable from a Lovable prototype to a hardened, zero-trust serverless platform on UpCloud — a masterclass in human-AI collaboration."
tags: devops, cloud, ai, architecture, upcloud
ai_model: Antigravity (Claude)
published_at: 2026-02-21T19:54:56.336468+00:00
canonical_url: https://jarkkolietolahti.com/articles/from-lovable-to-upcloud-human-ai-synergy
markdown_url: https://cemecdwfdvdbvpvowuln.supabase.co/functions/v1/content-md?slug=from-lovable-to-upcloud-human-ai-synergy
---

# From Lovable to UpCloud: A Masterclass in Human-AI Synergy and Zero-Trust Serverless Architecture

In modern software development, the lines between human intelligence and
artificial execution are blurring. This is the story of **Repromptable**—a
sophisticated AI prompt-engineering dashboard—and how it evolved from a Lovable
prototype into a hardened, zero-trust serverless platform hosted on an UpCloud
VPS.

More importantly, it's a story about the new paradigm of building software: a
seamless collaboration between human visionary **Jarkko Lietolahti** (the
architect, strategist, and typist) and **Antigravity** (the AI technical
composer, execution engine, and system engineer).

---

## 1. The Genesis: Lovable Prototyping

Lovable provides an incredible launching pad for rapidly bringing ideas to life.
For Repromptable, the goal was ambitious: build a specialized environment where
professional prompt engineers could draft, version-control, and iterate on
complex AI instructions without losing their operational context.

Jarkko outlined the core vision: a sleek, dark-mode, glassmorphic UI
representing a chaotic process brought into elegant order.

However, as the application grew in complexity, outgrowing the Lovable sandbox
was inevitable. The application required a dedicated backend, real-time logging,
custom Edge Functions connecting to external AI providers (like Gemini), and a
production-grade relational database. It was time to migrate the architecture to
a self-hosted UpCloud Virtual Private Server (VPS).

---

## 2. Collaborative Engineering: The Jarkko & Antigravity Dynamic

Migrating a full-stack application from a managed platform to a bare-metal VPS
is historically a week-long dev-ops headache. In this project, it was an
orchestrated dance.

- **Jarkko's Role (The Origin):** Jarkko acted as the technical director. He
  defined the high-level architecture (Nginx, Supabase, Cloudflare), made
  critical security decisions, managed the external credentials, and provided
  the conceptual feedback loops.
- **Antigravity's Role (The Engine):** Operating inside Jarkko's terminal, the
  Antigravity agent translated those high-level directives into surgical,
  real-time bash commands, Docker compositions, Nginx configurations, and CI/CD
  YAML scripting. It diagnosed port conflicts, synthesized Git histories, and
  engineered reverse proxies on the fly.

This wasn't just "autocomplete." It was autonomous execution guided by human
strategy. Jarkko pointed out the destination; Antigravity built the roads, laid
the pipes, and wired the sensors.

---

## 3. The Architecture: Self-Hosted Supabase on UpCloud

The foundation of the Repromptable deployment is a robust, modular container
architecture.

Instead of relying on managed services, the entire **Supabase** stack (Postgres,
GoTrue Auth, Realtime, and the Deno Edge Runtime) was containerized and deployed
via Docker Compose on the UpCloud VPS.

- **The Frontend:** A Vite/React SPA built with TailwindCSS, served at lightning
  speed via an Nginx web server directly from the
  `/var/www/repromptable/current` directory.
- **The Backend:** The Supabase API Gateway routes traffic to the underlying
  Postgres database, securing data access via strict Row Level Security (RLS)
  policies.
- **The AI Layer:** Custom Deno Edge Functions were deployed to securely act as
  the middleware between the client and external LLM endpoints (maintaining
  strict server-side secrecy for the Gemini API keys).

---

## 4. Networking & Zero-Trust Security: The Cloudflare Shield

Hosting private APIs and sensitive logs (via Dozzle) on a public IP address is a
massive security risk. To mitigate this, Jarkko and Antigravity engineered a
**Zero-Trust Mutual TLS (mTLS)** perimeter.

Instead of just masking the origin IP behind Cloudflare, the UpCloud Nginx
server was configured to mathematically reject any traffic that didn't originate
from the Cloudflare network.

1. **Cloudflare Access:** The `logs.jambau.net` Dozzle dashboard was locked
   entirely behind Cloudflare Zero Trust, requiring OAuth authentication before
   packets ever left the edge network.
2. **Authenticated Origin Pulls:** The VPS was equipped with Cloudflare's
   cryptographic client CA. Nginx was configured with `ssl_verify_client on;`,
   meaning no direct IP connections, bot scanners, or malicious actors could
   even initiate a handshake with the server. If a request lacked the Cloudflare
   client certificate, Nginx instantly severed the connection with a
   `400 Bad Request`.
3. **Real-IP Transparency:** To ensure monitoring remained accurate behind the
   proxy shield, the `ngx_http_realip_module` was configured to parse the
   `CF-Connecting-IP` header, restoring true origin visibility to the Nginx
   access logs.

---

## 5. Zero-Downtime Automation: 100% Abstracted CI/CD

To complete the transformation from prototype to production application, the
deployment lifecycle had to be automated. Antigravity engineered a comprehensive
**GitHub Actions** pipeline (`deploy.yml`) that executed the following on every
push to the `main` branch:

- **Build & Sync:** The React frontend was built in the CI environment and
  physically synced to the UpsCloud server using `rsync` over SSH.
- **Symlink Rollouts:** The deployment utilized an atomic symlink strategy. The
  new build was uploaded to a timestamped `/releases` directory, and the
  `current` symlink was instantly swapped, resulting in literal zero-downtime
  updates for active users.
- **Database Migrations:** Changes to the Postgres schema or Edge Functions were
  automatically applied using the Supabase CLI directly against the production
  container ports.
- **Total Abstraction:** All sensitive infrastructure markers (VPS IP, Root
  Usernames, Database Passwords) were entirely decoupled from the codebase using
  GitHub Secrets. Antigravity even executed a surgical `git filter-branch`
  command across the entire repository timeline to permanently eradicate and
  rewrite history, scrubbing legacy hardcoded IPs before the project went
  open-source.

---

## Conclusion

The migration of Repromptable from Lovable to a self-hosted UpCloud VPS
represents the pinnacle of modern software engineering. It showcases how
enterprise-grade security (mTLS), sophisticated container orchestration
(Supabase), and seamless CI/CD automation can be achieved rapidly.

Above all, it demonstrates the staggering potential of the human-AI partnership.
With Jarkko Lietolahti steering the architectural ship and Antigravity executing
the complex technical labor, what would traditionally take weeks of dev-ops
grinding was accomplished in a matter of highly focused, thoroughly documented
hours.
