Respect for the World

Build sustainably. Efficiency is ethics.


The Problem

The modern web is wasteful:

Every wasted byte is energy burned. Every inefficiency is ecological harm.

Standard Garden refuses this waste.


Our Promise

Efficient code running on the edge isn’t just good engineering—it’s ecological stewardship.

Our target: 10,000 users for less than $200/month in hosting costs.

This isn’t about being cheap. It’s about being responsible.


What This Means in Practice

1. Edge Computing (No Servers)

We run on Cloudflare’s edge network:

Traditional serverless:

User in Tokyo → US-East server → 200ms latency
Server spins up → 500ms cold start
Database query → 100ms round trip
Total: ~800ms + energy waste

Standard Garden (edge):

User in Tokyo → Tokyo edge node → 20ms latency
Already running → 0ms cold start
D1 query at edge → 30ms
Total: ~50ms + minimal energy

16x faster. Fraction of the energy.

2. Static-First Architecture

We pre-render everything possible:

One build = infinite reads. That’s efficiency.

3. Minimal Payloads

Every byte is scrutinized:

Typical React app: – React: 130kb – Router: 30kb – UI library: 200kb – State management: 50kb – Utilities: 100kb
Total: ~510kb just to start

Standard Garden: – Astro (static): 0kb – Svelte 5 islands: 15kb – Utilities: 10kb – CSS: 30kb
Total: ~55kb

9x smaller payload.

Smaller payloads = less bandwidth = less energy.

4. Database Efficiency

Cloudflare D1 (SQLite at the edge):

No full table scans. No N+1 queries. No waste.

5. Storage Efficiency

Cloudflare R2 (object storage):


The Economics of Sustainability

Our cost structure (10,000 users):

Cloudflare Pages Functions: – 100M requests/month: Free tier – Additional: $0.50/million

Cloudflare D1: – 25M reads/month: Free tier – Additional: $0.001 per 1000

Cloudflare R2: – 10GB storage: Free tier – Additional: $0.015/GB/month

Cloudflare Vectorize: – 30M queries/month: Free tier – Additional: $0.04 per million queries

Total estimated: <$200/month for 10,000 users

This isn’t luck—it’s architecture.

We chose Cloudflare because they’re efficient at scale. Edge computing is inherently more sustainable than traditional cloud.


What This Enables

1. Free Tier Forever

Because hosting is cheap, we can offer a generous free tier:

Free doesn’t mean “temporarily free until we need to monetize.”

It means “actually free because we’re efficient.”

2. Affordable Paid Tier

$4/month for unlimited notes is possible because:

Traditional SaaS: “We need $20/month to cover AWS costs”
Standard Garden: “$4/month covers costs and pays for sustainable development”

3. No Venture Capital Trap

We’re not raising millions to “scale fast” and burn money:

Sustainable business = sustainable product = sustainable planet.


The Technical Implementation

Code Efficiency Standards

Every feature must justify its weight:

// ❌ Bad: Import entire library
import _ from ‘lodash’; // 70kb

// ✅ Good: Import specific function
import debounce from ‘lodash-es/debounce’; // 3kb

// ✅ Better: Write it yourself if simple
function debounce(fn, ms) { /* 10 lines */ } // 0.1kb

Performance Budget

Hard limits enforced by CI:

If you exceed these, CI fails. No exceptions.

Build Optimization

Every build is optimized:

We ship the minimum viable bytes.


Database Best Practices

Efficient Queries

// ❌ Bad: N+1 query problem
for (const user of users) {
  const notes = await db
    .prepare(“SELECT * FROM notes WHERE owner_id = ?”)
    .bind(user.id)
    .all();
}

// ✅ Good: Single query with JOIN
const placeholders = userIds.map(() => “?”).join(“, ");
const notes = await db
  .prepare(`
    SELECT users.*, notes.*
    FROM users
    LEFT JOIN notes ON notes.owner_id = users.id
    WHERE users.id IN (${placeholders})
  `)
  .bind(userIds)
  .all();

Smart Indexing

Only index what’s queried:

— ❌ Bad: Index everything
CREATE INDEX idx_all ON notes(owner_id, slug, visibility, created_at, updated_at);

— ✅ Good: Index what's actually used
CREATE INDEX idx_owner_slug ON notes(owner_id, slug);
CREATE INDEX idx_visibility ON notes(visibility) WHERE visibility = 'public';

FTS5 Search

Full-text search without external services:

— SQLite FTS5 is incredibly efficient
CREATE VIRTUAL TABLE notes_fts USING fts5(
  title, content,
  content='notes',
  content_rowid='id'
);

— Automatic trigger keeps it in sync
— (self-healing search index)

Monitoring Efficiency

We track our environmental impact:

Metrics We Watch

  1. Total monthly costs (target: <$200 for 10k users)
  2. Average request size (target: <100kb)
  3. Edge cache hit rate (target: >90%)
  4. Database query time (target: <50ms p95)
  5. Total bandwidth (target: <1GB per user per month)

Tools We Use

What gets measured gets optimized.


Examples

Inefficient (Typical SaaS)

User creates note:
1. Hit AWS Lambda (cold start: 500ms)
2. Parse request (50ms)
3. Validate (20ms)
4. Query Postgres (100ms)
5. Upload to S3 (200ms)
6. Update Elasticsearch (150ms)
7. Invalidate Redis cache (30ms)
8. Return response (50ms)

Total: ~1100ms
Cost per request: ~$0.001
Energy: High

Efficient (Standard Garden)

User creates note:
1. Hit edge function (0ms cold start)
2. Validate (5ms)
3. Insert to D1 (20ms)
4. Save to R2 (30ms)
5. Update FTS5 (automatic trigger)
6. Return response (10ms)

Total: ~65ms
Cost per request: ~$0.00001
Energy: Minimal

17x faster. 100x cheaper. Fraction of the energy.


The Litmus Test

Before adding any feature, ask:

“Does this waste resources?”

Waste is a moral failure, not just an engineering one.


For Developers

When writing code:

  1. Measure everything: Bundle size, query time, API calls
  2. Profile first, optimize second: Don’t guess where waste is
  3. Use the platform: Native APIs are often smaller and faster
  4. Cache aggressively: Compute once, serve many times
  5. Lazy load everything: Don’t load what you don’t need

Code Review Checklist

If you can’t justify the waste, don’t merge it.


The Long View

Standard Garden is built to last decades, not quarters.

Efficiency isn’t about cost-cutting. It’s about:

Slow, inefficient systems die. Fast, efficient ones endure.


Further Reading


Efficiency is kindness to the world. We practice it without compromise.