[← All disciplines](/work#system-map) 

06 / Infrastructure architecture

# How we deploy, serve and watch our products

## What we run

## What we’re building

Where does a branch deploy?

Branch delivery: Where does a branch deploy?

Each branch event triggers its own deployment. Stage is a demo URL, not a step every change passes through on the way to main.. GitHub → GitHub Actions: push. Returns checks. GitHub → Deploy platform: push or merge. Deploy platform → Preview: branch. Deploy platform → Stage: merge to stage. Deploy platform → Production: merge to main.

[Open Deploy platform drawing](/work/infra#hosting) 

━ Selected flow ┄ Other connections

GitHub Actions runs CI. Each product deploys through the platform that suits it: Laravel Forge, Vapor, Laravel Cloud, AWS Amplify or Cloudflare.

GitHub Actions runs CI on a pushed branch and reports the result back to GitHub.

Every feature branch gets an automatic preview, so the team can try a change before it merges.

A merge to stage deploys at a stable demo URL.

A merge to main deploys the live product.

## What we run · Branch delivery

Which platform deploys

AWS Amplify deploys the branded websites. Vapor deploys the Platform API, and Forge deploys the staff CRM.

Triggers, not a ladder

A feature branch gets a preview, a merge to stage updates the demo and a merge to main deploys live. A change doesn’t have to go through stage to reach main.

Give a batch more room without resizing the API

Request and job traffic: Give a batch more room without resizing the API

HTTP reads and queued jobs use different allocations. Not every request creates a job.. Web + mobile → HTTP function: request. Returns JSON. HTTP function → Aurora MySQL: query. Returns rows. HTTP function → Amazon SQS: dispatch job. Amazon SQS → Queue worker: delivers job.

[Open Amazon SQS drawing](/work/backend#crm-sync) [Open HTTP function drawing](/work/backend#system-A2) [Open Queue worker drawing](/work/backend#crm-sync) [Open Aurora MySQL drawing](/work/infra#hosting) 

━ Selected flow ┄ Other connections

The live Platform API runs on AWS. Vapor configures its HTTP function and queue worker separately.

Clients call the HTTP function. A database-backed read goes to Aurora.

When a request schedules background work, it queues a job rather than waiting for it.

A separate worker consumes queued jobs with its own limits.

## What we run · Request and job traffic

Tune the worker

A batch can need more time or memory without needing more of either for page requests. Vapor exposes separate queue settings.

Hosting

The branded websites call the API. The CRM follows a separate route through Forge-managed servers.

Where does a production error go?

Errors and alerts: Where does a production error go?

An alert tells the team what happened. The Sentry issue gives the engineer and their agent a place to start investigating.. Web frontend → Sentry: web errors. Mobile app → Sentry: app errors. Backend → Sentry: server errors. Sentry → Slack: alerts. Sentry → Engineer + agent: issues.

[Open Web frontend drawing](/work/frontend#shared-views) [Open Mobile app drawing](/work/mobile) [Open Backend drawing](/work/backend#running) 

━ Selected flow ┄ Other connections

Web, mobile and backend report errors to Sentry. An error event is separate from the response a customer receives.

Each surface reports its own errors.

Slack brings alerts to the team. An engineer picks up the Sentry issue and uses an agent to analyse it against the web or app code.

## What we run · Errors and alerts

Ownership

Frontend and backend engineers look after the systems they ship. The error report points them back to the affected surface.

Infrastructure work

Agents also help provision Cloudflare Workers and R2 buckets. Provisioning is separate from handling an error.

Read traffic before changing a rule

Traffic analysis: Read traffic before changing a rule

Staff ask, agents analyse and find issues, and the analysis informs rule changes.. Cloudflare → Agent: traffic data. AWS → Agent: traffic data. Agent → Analysis: analysis. Analysis → Rule changes: informs.

[Open Rule changes drawing](/work/infra#agent-ops) 

━ Selected flow ┄ Other connections

Staff ask agents to analyse traffic and find issues: Cloudflare through Cloudflare MCP, AWS through AWS agent tooling. The analysis informs rule changes.

When staff ask, the agent reads Cloudflare traffic through Cloudflare MCP. Through AWS agent tooling it reads AWS traffic and the services behind it.

It analyses the data and reports the issues it finds.

The analysis informs changes to traffic rules.

## What we run · Traffic analysis

Two sources

Cloudflare shows traffic passing through its network. AWS agent tooling covers both traffic and the services we run there.

What comes next

Our plan is for agents to handle this end to end. That plan is under What we’re building.

Where would a request go?

Edge and hosting: Where would a request go?

A planned request path. Not every request reaches the backend, R2 or a Durable Object.. Visitor → Cloudflare: request. Returns response. Cloudflare → Frontend: uncached request. Frontend → Durable Object: coordinate. Frontend → Laravel backend: API call. Returns JSON. Frontend → R2: files. Laravel backend → R2: files. Laravel backend → Database: query. Returns rows.

━ Selected flow ┄ Other connections

This is the direction, not what every product runs today. Cloudflare would sit in front of each product, and frontends would deploy on Workers.

Cloudflare DNS resolves the name to Cloudflare. Requests then pass its security and bot protection, and cached responses return from the edge.

Requests the cache can’t answer reach the frontend deployed on Workers.

The frontend calls the Laravel backend, which queries the database chosen for that workload.

Frontend and backend read and write the same R2 buckets through its S3-compatible API.

When requests need to coordinate, the Worker calls a Durable Object. Most page requests wouldn’t need one.

## What we’re building · Edge and hosting

Where Durable Objects fit

They don’t host the frontend; Workers do. A Worker would call a Durable Object when several requests need one consistent piece of state, which the object keeps in its own storage.

Backends and databases

Backends would run on Laravel Cloud or Forge-managed EC2\. Each workload would use a Laravel Cloud database, Amazon RDS or PlanetScale according to its needs.

One object store

R2 speaks the S3 API, so frontends and Laravel backends could share buckets with standard S3 clients.

Handle an incident end to end

Agent operations: Handle an incident end to end

A plan, not a live integration: an agent acts only within its scope, and anything else goes to a person.. Signals → Ops agent: watch. Ops agent → Scoped action: act. Ops agent → DevOps: alert.

[Open Signals drawing](/work/infra#traffic) 

━ Selected flow ┄ Other connections

Today staff ask agents to analyse traffic and errors. The plan is for an agent to handle an incident end to end: monitor it, then take a scoped action or alert DevOps.

The agent would watch traffic, errors and incidents without waiting to be asked.

If the response falls within the permissions it has been given, the agent would take that action.

Otherwise it would alert DevOps with what it found.

## What we’re building · Agent operations

What runs today

Staff pick up issues and ask agents to analyse Cloudflare and AWS data or a Sentry issue against the web or app code. People still carry out the fix.

What “scoped” means

An agent would take only the actions it has been permitted to take. Everything outside that scope is an alert for DevOps.

## Where the frontend, API and CRM run today

Frontend

Live hosting: Frontend

Amplify serves the branded frontend, which requests data from the Platform API.. AWS Amplify → Branded websites: serves site. Branded websites → Platform API: requests data.

[Open Branded websites drawing](/work/frontend#shared-views) [Open Platform API drawing](/work/infra#hosting-api) 

━ Selected flow ┄ Other connections

One Next.js frontend serves several brands. The sites share an API, not a database connection.

Amplify serves the site with the requested brand’s colours and artwork.

The site calls the live Platform API. Follow that node to see where the request runs.

Platform API

Live hosting: Platform API

Cloudflare DNS resolves the API name. Lambda runs the API, which queries Aurora MySQL.. Cloudflare → Platform API: resolves to. Platform API → Aurora MySQL: queries.

[Open Platform API drawing](/work/backend#system-A2) 

━ Selected flow ┄ Other connections

Web and mobile clients resolve the API name before calling Laravel on Lambda.

Cloudflare resolves the API name. The client sends its request to the API running on Lambda.

Laravel reads and writes application records in Aurora MySQL.

Staff CRM

Live hosting: Staff CRM

Route 53 resolves the CRM name. The CRM app server queries a separate MySQL server.. Route 53 → Staff CRM: resolves to. Staff CRM → MySQL server: queries.

[Open Staff CRM drawing](/work/backend#system-A1) 

━ Selected flow ┄ Other connections

Staff use a separate Laravel application. Forge manages its app server and its database server.

Route 53 resolves the CRM name. The staff browser connects to the app server.

The CRM queries MySQL on its own database server.

__How we ship and watch these systems__
| System   | Deploy                                          | Observe                                                             |
| -------- | ----------------------------------------------- | ------------------------------------------------------------------- |
| Frontend | AWS Amplify deploys the branded sites.          | Sentry reports browser errors.                                      |
| API      | Vapor deploys the API to Lambda.                | Sentry reports API errors. Slack brings alerts to the team.         |
| CRM      | Forge manages both servers and deploys the app. | Sentry reports errors. Nightwatch traces Laravel requests and jobs. |

## Open roles

Kathmandu, Nepal · Full-time

[DevOps Engineer →](/join/devops-engineer) 

Own the infrastructure that keeps our products running on AWS and Cloudflare. You’ll be our first dedicated DevOps engineer.

[See all open roles →](/join)

[Interactive page](/work/infra)
