Respect for the World
Build sustainably. Efficiency is ethics.
The Problem
The modern web is wasteful:
- Megabytes of JavaScript for simple pages
- Servers spinning up and down wastefully
- Data centers consuming massive energy
- Unnecessary API calls and database queries
- Bloated frameworks that ship 90% unused code
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:
- Zero cold starts (no servers to spin up)
- Minimal energy waste (code runs where users are)
- Infinite scale (network handles traffic naturally)
- <50ms latency globally (fast = efficient)
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:
- Pages built once, served millions of times
- No server-side rendering per request
- Minimal compute per user
- HTML cached at the edge
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):
- FTS5 full-text search: Fast, indexed, efficient
- Prepared statements: Query plan cached
- Smart indexes: Only what’s needed
- Self-healing search: Triggers maintain indexes automatically
No full table scans. No N+1 queries. No waste.
5. Storage Efficiency
Cloudflare R2 (object storage):
- Zero egress fees (no penalty for serving content)
- Efficient compression (gzip/brotli)
- Lazy loading (only fetch what’s needed)
- Content-addressed (deduplication)
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:
- 10 permanent notes
- Full typography engine
- Command palette
- Search and discovery
- No time limit
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:
- Marginal cost per user is ~$0.02/month
- Edge delivery scales naturally
- No servers to maintain
- No DevOps team needed
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:
- No growth-at-all-costs mentality
- No pressure to 10x users next quarter
- No pivot to ads when VC funding runs out
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:
- JavaScript bundle: <100kb total
- CSS bundle: <30kb
- First Paint: <1s
- Time to Interactive: <2s
- Lighthouse Score: >95
If you exceed these, CI fails. No exceptions.
Build Optimization
Every build is optimized:
- Tree-shaking (remove unused code)
- Minification (remove whitespace)
- Compression (gzip/brotli)
- Code splitting (load what’s needed)
- Image optimization (WebP, proper sizing)
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
- Total monthly costs (target: <$200 for 10k users)
- Average request size (target: <100kb)
- Edge cache hit rate (target: >90%)
- Database query time (target: <50ms p95)
- Total bandwidth (target: <1GB per user per month)
Tools We Use
- Cloudflare Analytics (built-in, free)
- Lighthouse CI (performance enforcement)
- Bundle size checks (GitHub Actions)
- Database query profiling (EXPLAIN QUERY PLAN)
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?”
- If it adds unnecessary API calls → reject
- If it bloats the bundle → reject
- If it requires heavy computation → rethink
- If it can be pre-rendered → do that instead
Waste is a moral failure, not just an engineering one.
For Developers
When writing code:
- Measure everything: Bundle size, query time, API calls
- Profile first, optimize second: Don’t guess where waste is
- Use the platform: Native APIs are often smaller and faster
- Cache aggressively: Compute once, serve many times
- Lazy load everything: Don’t load what you don’t need
Code Review Checklist
- [ ] Does this add to the bundle? (Run
npm run buildand check size) - [ ] Does this make unnecessary API calls?
- [ ] Can this be pre-rendered or cached?
- [ ] Are database queries indexed?
- [ ] Is this feature worth its weight?
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:
- Ecological responsibility: Less energy, less waste
- Financial sustainability: Can run forever without VC funding
- User respect: Fast experiences for everyone, everywhere
- Developer sanity: Simple architecture that doesn’t break
Slow, inefficient systems die. Fast, efficient ones endure.
Further Reading
- Respect for the Author – The first pillar
- Respect for the User – The second pillar
- The Three Pillars – Overview of all pillars
Efficiency is kindness to the world. We practice it without compromise.