Grounding: Clients, Servers & Addresses
"Before energy can flow, you must know where you stand."
Every single thing that happens on the internet is one simple practice, repeated billions of times per second: one computer asks, another computer answers.
π± The Client
Your user's device β a phone, a laptop β running your frontend (the interface people see and touch). The client is the seeker: it asks questions.
π₯ The Server
A powerful computer somewhere else holding your backend: your data, database, and logic. The server is like the guru: it holds the knowledge and answers requests.
π’ The IP Address
Every device on the internet has a unique digital phone number, like 172.64.155.209. No address, no delivery β same as the postal system.
π DNS β the Internet's Phonebook
Humans remember names (myapp.com), computers need numbers. DNS (Domain Name System) translates one into the other, invisibly, before every request.
Deeper practice: what actually happens when you hit Enter on a URL
Stage 1 β Finding the address. The browser checks its cache ("have I looked up this name recently?"). If not, it asks a DNS resolver (your ISP's, or Cloudflare's 1.1.1.1, or Google's 8.8.8.8), which walks the hierarchy: root servers β .com servers β the name servers for myapp.com. Back comes the IP. (This chain of caches is why "change your DNS records" always comes with the warning "may take time to propagate.")
Stage 2 β The server receives and processes. Your request arrives at the server's IP and passes through its firewall (rules deciding which traffic may enter at all β e.g. web traffic yes, random port-scans no). On busier setups a load balancer then picks which of several identical servers should handle you. Inside the chosen server, routing matches your URL to the right piece of code β /about runs one function, /api/login another. That handler does the actual work: reads the database, applies logic, checks your permissions.
Stage 3 β The response returns. The server sends back an HTTP response: a status code (200 OK), headers (metadata), and a body β usually HTML for a page, or JSON for an API call. It travels back down the seven layers, across the world, and up into your browser.
Stage 4 β The browser renders. The browser parses the HTML top to bottom, building an internal tree of the page (the DOM). As it parses, it discovers assets it still needs β CSS stylesheets, JavaScript, images, fonts β and fires off additional requests for each one (a typical page makes dozens of these little round-trips). CSS is applied to compute what everything should look like; JavaScript runs and can modify the page; finally the browser paints pixels to your screen and keeps listening for your taps and clicks. Only now, after this whole pilgrimage, do you "see the website" β usually well under a second later.
Root check-in
Your friend's phone loads your app. In this moment her phone isβ¦
DNS is best described asβ¦
The 7 Layers, The 7 Chakras
"Energy rises from the earth to the crown. Data rises from the cable to the app."
Engineers describe how the internet works using the OSI model β seven layers stacked on top of each other, from raw physical electricity at the bottom to the apps you use at the top. Sound familiar? It should. You already know a seven-layer system where each level depends on the ones below it, and where a blockage at any level disrupts everything above.
The layers you'll actually meet as a vibe coder
Here's the good news: you only work in the top layers. The bottom four are handled by hardware, operating systems, and your hosting provider. But knowing the whole column means error messages stop being scary β you can locate a problem the way you locate tension in your body.
Layer 7 Β· Application β where you live
HTTP, HTTPS, DNS, email protocols β the languages applications speak to each other. Every line of frontend/backend code you'll ever write sits at this layer, standing on the six below it.
Layer 6 Β· Presentation β the third eye that encrypts
Before data leaves your device, this layer translates and protects it: text encoding, compression, and crucially TLS encryption (the padlock, Module 4). Perception and protection in one place.
Layer 5 Β· Session β the held conversation
Sessions are why you don't re-enter your password on every click. The server hands your browser a token (often in a cookie) that says "we're already talking." Log out = close the session. This layer matters when you build login (Module 4).
Layer 4 Β· Transport β TCP, the heart connection
TCP numbers every packet, confirms receipt, and re-sends anything lost β a conscientious correspondent. UDP just fires packets and never looks back β perfect for live video calls where a lost frame matters less than a delay. Your web apps ride on TCP; you get its reliability for free.
Layer 3 Β· Network β where IP addresses live
Routers pass your data packet hand-to-hand across the planet, each one reading the destination IP and choosing the next hop β like a chain of people passing a letter, each knowing only the next post office. This is why the internet survives failures: if one path is blocked, packets flow around it like water.
Layer 1β2 Β· Physical & Data Link β the earth beneath you
Undersea fiber-optic cables carry ~95% of international data. Your WiFi is a radio broadcast between your device and your router. You will never write code here β but when "the internet is down," it's almost always these layers: a cable, a router, a WiFi signal. Grounding practice: restart the router first, always.
Subtle-body check-in
Your app's login is broken, but other websites load fine. Which layer is blocked?
TCP (Layer 4, the heart) promises thatβ¦
HTTP, APIs & JSON: How Machines Converse
"A request without a response is a mantra chanted into the void."
π HTTP / HTTPS
HyperText Transfer Protocol β the etiquette rules for client-server conversation. The S means secure (encrypted). Modern browsers and both app stores effectively require HTTPS. In the age of vibe coding: always HTTPS, no exceptions. More on where that is set in the next module.
π API
Application Programming Interface β the bridge your frontend uses to talk to your backend. User taps "Login" β client sends an API request β server checks credentials β sends back a response. Every dynamic thing in every app is API calls.
π¦ JSON
The universal packaging format APIs use β simple key-value pairs any language can read:
{
"username": "Alex",
"streak_days": 21,
"premium": true
}π€ The verbs of HTTP
Requests carry an intention: GET = "show me" Β· POST = "create this" Β· PUT/PATCH = "change this" Β· DELETE = "remove this". Four intentions cover almost everything an app does.
Status codes: the server's facial expressions
| Code | Meaning | Vibe |
|---|---|---|
200 | OK β here's what you asked for | π Namaste |
301 | Moved permanently β new address | π§³ The ashram relocated |
401 / 403 | Not authenticated / not allowed | πͺ Members only |
404 | Not found | π« Seeking what does not exist |
500 | Server error β the backend crashed | π₯ The teacher fainted (your bug) |
Then there is HTTPS β the secure way to communicate. Before the guru imparts secret teachings (the API response), the student must first recognize the guru's authentic seal (SSL certificate), then enter the sealed chamber (encryption). Inside that shrine, words spoken cannot be overheard or twisted by those outside. This is HTTPS β not hiding from seekers, but ensuring seekers speak to the true teacher in a space where the teaching cannot be corrupted.
Exchange check-in
Your vibe-coded app shows "Error 404" when loading profiles. This meansβ¦
JSON's role in an API call isβ¦
SSL, CORS, Secrets & Who-Gets-What
"Boundaries are not walls. They are how love survives contact with the world."
π SSL / TLS β the padlock
SSL (everyone still says SSL; the modern protocol is technically TLS) encrypts everything between client and server. Without it, anyone on the same WiFi can read passwords in transit. With it, they see only noise. It's what turns http:// into https:// and puts the padlock in the browser bar.
The server proves its identity with an SSL certificate β a document signed by a trusted authority saying "this server really is myapp.com." The beautiful news: platforms like Vercel, Netlify, and Cloudflare issue and renew certificates automatically and free. You'll likely never handle one manually.
Go deeper: DNS lookup vs TCP handshake vs TLS handshake β three stages of enlightenment
Before a single byte of your actual page travels, three distinct actions complete in sequence β and beginners constantly confuse them. Think of them as stages on the path:
1. DNS lookup β seeking the teacher (Layer 7). You know the name but not the place. "Where does myapp.com dwell?" β "76.76.21.21." Nothing has been said between you and the server yet; you have only learned where to go. Fails here β DNS_PROBE_FINISHED_NXDOMAIN: the name doesn't resolve. Check your domain and DNS records.
2. TCP handshake β arriving and being received (Layer 4, the heart). Now you knock. Three messages: client "may we speak?" (SYN) β server "yes, may we?" (SYN-ACK) β client "we are speaking" (ACK). A mutual, confirmed connection exists β presence established, but everything said would still be audible to anyone nearby. Fails here β Connection refused / timed out: the server is down, or a firewall is blocking the port.
3. TLS handshake β the private transmission (Layer 6, the third eye). Within the open connection, the server presents its certificate ("I truly am myapp.com"), and both sides agree on encryption keys no eavesdropper can derive. From this moment the conversation is between you two alone. Fails here β Your connection is not private / SSL error: an expired or misconfigured certificate.
Seeking β connection β union. Only after all three does the first HTTP request flow β and knowing which stage failed tells you exactly which layer to heal.
π CORS β the browser's boundary ritual
Cross-Origin Resource Sharing. Browsers enforce a rule: a page from myapp.com may not freely call a server at a different origin like myapi.com β unless that server explicitly says "I allow myapp.com." No permission β the browser blocks the response, and you see the infamous console error:
Access to fetch at 'https://myapi.com/data' from origin
'https://myapp.com' has been blocked by CORS policy
The fix is always on the server: configure your backend to allow your frontend's URL. When your AI coding assistant writes backend code, ask it to "add CORS headers allowing my frontend's domain." At the same time, make sure it is not handled with an overly permissive wildcard that states (Access-Control-Allow-Origin: *) β that would allow any site to call your API, which is a security hole.
π€« Environment variables β secrets stay backstage
Your app needs secret keys: database passwords, AI API keys, payment keys. Never write them in frontend code β anyone can right-click β View Source and steal them (and bots scan the web for leaked keys constantly; a leaked AI key can cost you thousands in hours).
Instead they live in environment variables β a .env file on the server, outside the code:
# .env β lives ONLY on the server, never in frontend code, never in git
DATABASE_URL=postgres://user:secret@host:5432/mydb
AI_API_KEY=sk-abc123β¦
Agent_KEY=agt_live_β¦
Hosting platforms give you a settings screen to enter these per environment (development vs production). Rule of thumb: if it's a secret, it's an environment variable on the server. If it's in frontend code, it's public.
π Authentication vs Authorization
| Authentication (AuthN) | Authorization (AuthZ) | |
|---|---|---|
| Question | Who are you? | What may you see? |
| Moment | Logging in | Every request after |
| Example | Email + password proves you're Alex | Alex may read Alex's messages β not Sam's |
The classic vibe-coding security hole: an app authenticates users but forgets authorization β so User A can fetch User B's private data just by changing an ID in the API request. When prompting AI tools, explicitly say: "ensure users can only access their own data."
Boundary check-in
You pasted your OpenAI API key directly into your React frontend. What's the risk?
A CORS error appears in your browser console. Where does the fix go?
User A changes /api/messages/42 to /api/messages/43 and reads User B's private message. What failed?
Cloudflare, nginx & the Reverse Proxy
"The teacher does not answer the door personally. That is what the doorkeeper is for."
As apps grow, you stop letting the world talk to your server directly. Instead you place a reverse proxy in front β a doorkeeper that receives every request first.
πͺ Reverse proxy
A server that sits in front of your real server(s). It can: terminate SSL (handle the padlock), distribute traffic across multiple backends (load balancing), serve cached copies of pages, and hide your real server's address entirely.
βοΈ nginx
(pronounced "engine-x") The world's most popular reverse-proxy/web-server software. A small config file tells it: "requests for /api β backend on port 3000; everything else β serve the static files." If you use Vercel or Netlify, they run this tier for you invisibly.
βοΈ Cloudflare
A reverse proxy at planetary scale. Point your domain's DNS at Cloudflare and every request passes through their global network first, giving you: free SSL, a CDN (copies of your content cached in 300+ cities, close to every user), DDoS protection (absorbing floods of malicious traffic), and a firewall β free tier included.
π§ Forward vs reverse
A forward proxy stands in front of clients (like a VPN, hiding the asker). A reverse proxy stands in front of servers (hiding and protecting the answerer). Same idea, opposite direction.
π Inside the server: a request's path from door to answer
Whatever tier you host on, every request walks the same corridor once it reaches your server's address:
1. Firewall β the outer wall. Rules decide which traffic may enter at all: web ports (80/443) open, everything else closed. Cloud platforms configure this for you; on a VPS you set it yourself (and forgetting to is the classic self-hosting mistake).
2. Load balancer β the usher. If you run more than one copy of your backend, it assigns each request to the least-busy copy. If one server dies, traffic silently flows to the survivors β this is how big apps stay up.
3. Routing β the corridor map. Your backend framework matches the URL and HTTP verb to a specific function: GET /profile β the show-profile code, POST /api/login β the login code. When your AI tool "adds an endpoint," it is writing a route.
4. Request handling β the audience with the teacher. The matched function validates the input, checks authentication and authorization (Module 4), talks to the database, and composes the HTTP response that travels all the way back. This is where your logic β and your bugs β live.
Doorkeeper check-in
Your site is getting hammered by a flood of bot traffic. The standard first defense isβ¦
nginx as a reverse proxy decidesβ¦
Where Your Creation Lives: From Static Site to High Traffic
"Choose the dwelling that fits the practice β not the palace you might need someday."
"Hosting" just means: which computer runs your code, and who maintains that computer. As a vibe coder you should almost never manage a raw server. Match your project to the lightest tier that serves it:
Tier 1 Β· Static site β the meditation cushion
What it is: Plain files (HTML, CSS, JS, images) served as-is. No backend, no database. Good for: landing pages, portfolios, course pages like this one, blogs. Use: Vercel, Netlify, Cloudflare Pages, GitHub Pages. Cost: free. You push your files; they give you a global URL, HTTPS certificate, and CDN automatically. Static sites essentially cannot crash and can absorb enormous traffic.
Tier 2 Β· Static frontend + BaaS β cushion with a helpful monastery
What it is: Your frontend stays static, but connects to a Backend-as-a-Service β Firebase or Supabase β which provides a ready-made database, user login, and file storage through simple API calls. Good for: apps with accounts and data (journals, trackers, communities) without writing server code. Cost: generous free tiers, then pay-as-you-grow. This is the sweet spot for most vibe-coded apps.
Tier 3 Β· Hosted server β your own room in the ashram
What it is: You have real backend code (Node, Pythonβ¦) that must run continuously. Platforms like Render, Railway, Fly.io, or Vercel serverless functions run it for you β you still never touch Linux or nginx. Good for: custom logic, AI API calls that need hidden keys, webhooks, background jobs. Cost: ~$5β25/month to start.
Tier 4 Β· Server + reverse proxy β the ashram with a doorkeeper
What it is: A VPS (virtual private server β DigitalOcean, Hetzner, AWS EC2) where you configure nginx, SSL, firewalls, and deployments. Good for: full control, custom infrastructure, cost optimization at scale. Honest advice: as a beginner you don't need this tier β but now you understand what it is when developers mention it.
Tier 5 Β· High traffic β the festival grounds
What it is: Load balancers distributing across many servers, database replicas, autoscaling (servers spawning when traffic spikes), queues, and multi-region deployment. Good for: apps with hundreds of thousands of users. The comfort: tiers 1β3 platforms scale a very long way before any of this becomes your problem. Instagram launched on essentially Tier 3.
Go deeper: subdomain (learn.mysite.com) or path (mysite.com/learn)?
Both are ways to give part of your world its own address β but they live at different layers. A path (mysite.com/learn) is handled inside one deployment: same server, same DNS record β routing (Module 5) decides what to show. A subdomain (learn.mysite.com) is its own DNS record and can point to a completely different server or platform.
Use a path when the content is part of the same app and deploys together: /about, /blog on the same site, /pricing. One deploy, one codebase, and search engines treat it as one site (slight SEO advantage for blogs).
Use a subdomain when the thing is a separate system: a course platform (learn.), your API (api.), an app distinct from the marketing site (app.), a staging copy (staging.). Each deploys independently, on different hosts if you like, can fail independently, and gets its own SSL certificate automatically. Bonus boundary: browsers scope cookies and CORS by origin, so a compromise or misconfiguration on one subdomain doesn't automatically bleed into the others.
Rule of thumb: same app β path. Different app β subdomain. This course living at learn.masarvie.com while the main site lives elsewhere is the pattern in action.
π€ AI tools that carry this for you
The age of vibe coding means much of this module is handled by your tools:
| Tool | What it absorbs for you |
|---|---|
| Vercel (+ v0) | Deploy from a git push or prompt: URL, HTTPS, CDN, serverless backend, env-variable UI β no server knowledge needed. |
| Lovable / Bolt / Replit | Prompt-to-app platforms: generate frontend + backend + database and host it, all in one place. |
| Netlify | Same class as Vercel: static + serverless with automatic everything. |
| Supabase / Firebase | Database, auth, and storage as API calls β with authorization rules ("row-level security") built in. |
| Cloudflare | Free protective layer over any of the above: CDN, DDoS shield, DNS management. |
Dwelling check-in
A yoga studio wants a beautiful site: schedule, photos, contact info. No logins. Which tier?
Your app needs user accounts and saved journal entries, and you'd rather not write server code. Best fit?
Your app calls the OpenAI API and must hide the key. What does that force?
Web vs Mobile Deployment β and Surviving the App Stores
"The teaching is complete only when it reaches a student."
The core difference
| π Web app | π± Mobile app | |
|---|---|---|
| Lives | On a server; users visit a URL in a browser | Compiled into a file (APK/AAB for Android, IPA for iOS) installed on the device |
| Distribution | Share a link β that's it | Through the App Store / Google Play |
| Updates | Deploy β live for everyone instantly | Submit β store review β users update |
| Gatekeeper | None | Apple & Google review every release |
| Cost to publish | $0 (hosting free tiers) | Google: $25 once Β· Apple: $99/year |
| Best first move | Ship the web version first. Validate. Then go mobile if users need it. Many "apps" can stay web apps (or become PWAs β web apps installable to the home screen) forever. | |
π€ Google Play β top 10 questions
1. What does it cost?
$25, one-time, for a developer account β covers unlimited apps forever. Paid via credit/debit card.
2. Do I need a registered company?
No. A personal account with your own name is fine. An organization account requires a registered business plus a D-U-N-S number (a free business identifier that can take up to ~30 days to obtain).
3. Personal or company email?
Personal accounts can use any Google account, but create a fresh one dedicated to development (e.g. yourbrand.dev@proton.me) β the account owns the apps, and untangling it from your personal email later is painful. Organization accounts should use a domain email (dev@yourbrand.com).
4. What's the verification process?
Identity verification with a government ID (and proof of address in some cases), phone and email confirmation. Organizations also verify the D-U-N-S number and business details. Usually resolves in a few days.
5. How long until my app is live?
Review typically takes from a few hours up to ~7 days (longer for brand-new accounts or sensitive categories). Plan for a week; be pleasantly surprised sooner.
6. The testing requirement β what's this about?
New personal accounts must first run a closed test with a minimum number of testers (historically 20, reduced to 12) for 14 consecutive days before applying for production access. Budget this into your launch timeline β recruit friends/community early. Organization accounts are exempt.
7. Can I start personal and switch to a company account later?
You can't convert in place β you create a new organization account and use Google's app transfer process to move your apps to it. Supported and routine, just some paperwork. Starting personal is a legitimate strategy.
8. What does Google take from sales?
15% on your first $1M of revenue per year, 30% beyond that. Selling paid apps/in-app goods requires a payments profile in a supported merchant country β check Google's current merchant-country list for your country; if unsupported, monetize via the web instead (which is exactly what a merchant-of-record like Paddle enables).
9. What can I set up now and change later?
Changeable: app name, description, screenshots, pricing, category, adding a company later via transfer. Hard/impossible to change: the package name (e.g. com.maisjarur.chakranet) β permanent once published β and your developer account country. Choose both deliberately.
10. What gets apps rejected most?
Broken functionality, missing privacy policy (required β a URL on your website), asking for permissions you don't use, misleading store listings, and policy-sensitive content without disclosure. A working app with an honest listing and a privacy policy sails through.
π Apple App Store β top 10 questions
1. What does it cost?
$99 USD per year (Apple Developer Program). Stop paying β your apps eventually come off the store. Fee waivers exist for nonprofits/educational institutions in some countries.
2. Do I need a registered company?
No. Enroll as an Individual with an Apple ID and government ID. An Organization enrollment requires a legal entity, a D-U-N-S number, and authority to sign agreements. One visible difference: individual accounts show your personal name as the seller on the App Store; organizations show the company name.
3. Personal or company email?
Individual: any Apple ID works β but as with Google, a dedicated one (dev@β¦) keeps things clean. Organization: an email at your company's domain strengthens verification.
4. What's the verification process?
Identity verification with government ID through the Apple Developer app; organizations verify D-U-N-S + legal entity, sometimes with a confirmation phone call. Individuals: usually ~1β3 days. Organizations: days to a few weeks (D-U-N-S is the slow part).
5. How long is app review?
Apple reports ~90% of submissions reviewed within 24β48 hours. First submissions and sensitive categories (health, finance, kids) can take longer. Every update goes through review again β plan releases accordingly.
6. Do I need a Mac?
To build and upload the final iOS binary yourself β yes (Xcode is Mac-only). Workarounds: cloud build services (Codemagic, EAS/Expo β the usual vibe-coding route via React Native/Expo or Flutter), or a cloud Mac. Many no-code/AI app builders handle the build + upload for you.
7. Can I start as Individual and switch to Organization later?
Yes β Apple supports converting an individual membership to an organization by contacting support once you have a legal entity + D-U-N-S. Your apps, reviews, and ratings carry over. Starting individual is normal.
8. What does Apple take from sales?
30% standard, or 15% via the Small Business Program (under $1M/year β apply for it, it's not automatic). Digital goods must historically use Apple's in-app purchase system, though rules on external payment links have been loosening in some regions β check current policy when you launch.
9. What can I set up now and change later?
Changeable: app name, screenshots, pricing, subtitle, keywords. Fixed: the bundle ID (permanent once the app is on the store) and your enrolled country/region (changeable only with effort). As with Android: choose the ID deliberately.
10. What gets apps rejected most?
Guideline 2.1 (crashes/bugs/incomplete apps) is #1 by far. Also: "minimum functionality" (apps that are just a wrapped website β a real risk for quick vibe-coded apps; add native value), missing privacy policy / privacy "nutrition labels," broken demo logins for the review team, and misleading metadata.
Release check-in
You've vibe-coded a habit tracker and want feedback fast. Cheapest, quickest launch?
Do you need a registered company to publish on either store?
Your update fixes a critical bug. On web vs mobile, users get itβ¦
π§ Closing integration
You now hold the whole mandala: the client asks and the server answers (root) Β· data ascends and descends seven layers (subtle body) Β· HTTP/APIs/JSON carry the conversation (exchange) Β· TLS, CORS, env vars and authZ guard it (boundaries) Β· proxies and Cloudflare keep the gate (doorkeeper) Β· hosting tiers from static to high-traffic (dwelling) Β· and web-first release with the app stores when you're ready (crown). When an error appears now, don't panic β locate it in the column, and work that layer.