Ecosystem ↗

1. Understand what you are building

Learn browser, server, request, response and package concepts with one concrete example.

↗ View Markdown
LESSON 1 OF 812 min + practice · Start here
  • Explain a request and a response
  • Choose the right ecosystem layer
  • Know what AI-generated code still needs you to verify

Your goal#

Explain what happens when someone opens a page, and choose which part of the ecosystem is responsible for each step. No terminal work is required in this lesson.

Start with a familiar interaction#

You enter a shop, ask for a product, and receive an answer. On the web, your browser sends a request to a server. The server runs a handler and sends a response. The response might be an HTML page, JSON data or a deliberate error.

text
Browser → GET /welcome → ZeruxJS route handler → response → Browser

GET is the HTTP method: it describes the kind of request. /welcome is the path: it identifies the resource. A route connects a method/path to the code that answers it. JSON is a data format; HTML describes a page. Neither automatically gives a route authentication or a database.

Put each tool in its place#

Layer Responsibility Example
ZeruxJS Node server runtime, route discovery and application lifecycle Answer GET /api/hello
ZyroJS Reactive browser/UI primitives Update a visible greeting when state changes
zlocale Translation data and locale formatting Display Bonjour or format a price
Database adapter Connect to persistent storage Keep records after restart
Your application Product rules, user permissions and ownership Decide who may read a private note

A package is installable code with a public import contract. Installing one does not automatically connect every feature. A framework coordinates application behavior; a library provides functions your application calls. Read each package's documented integration path.

What code is running where?#

A conceptual handler; the next lesson supplies its real file path
/** Answer a public greeting. @returns JSON-shaped data. No globals or services. */
export function GET() {
  return { message: 'Hello from the server' };
}

This function runs on the server. It returns data. The browser does not receive your entire server process, environment or source files. Conversely, code put in a browser bundle is visible to the visitor; do not put a database password there.

Expected result: when a real route invokes this handler, the response contains message. Nothing in this snippet creates a database, reads a cookie or installs dependencies.

If you use an AI coding tool#

Ask for one change with a verifiable outcome: “Add GET /api/hello that returns a greeting. Explain the new file and give a command to inspect its response.” Review the file location and imports. Run the application. Inspect the response. Ask why the result differs if it fails; do not repeatedly add libraries without understanding the failure.

Treat generated code as a draft. A correct-looking type is not runtime validation. An error disappearing is not evidence that authorization works. Do not ask a tool to publish credentials, disable checks or expose a private database just to make a demo appear successful.

Try it yourself#

Draw the browser → route → response flow for a weather page. Label where a private API credential should live and where the public weather text appears. Explain why the credential must not be inside a browser JavaScript file.

You are done when: you can describe the request, the handler and the response without saying that installing a package “does everything.”

When you get stuck#

Use the glossary for individual words. Read the mental model for runtime details. Continue to your first route to run this idea.

PUT IT INTO PRACTICE

Check your understanding

Try the exercise above, then answer both questions. Each correct answer earns 10 local learning points, once. You can retry; all lessons stay open.

You open /welcome in a browser. What does a server handler do?

Explain the answer

Receives the request and returns a response. A handler runs on the server and returns content, data or an error for that request.

Which tool handles reactive browser UI?

Explain the answer

ZyroJS. ZyroJS supplies browser UI primitives. ZeruxJS coordinates the server runtime.

Implementation sources

Implementation files for the APIs described on this page.

ZeruxJS · Open source · MIT OR Apache-2.0

Make yourself at home.

Every shortcut has a visible control too. Reading and navigation work without JavaScript.

Ctrl / ⌘ K
Search all documentation
/
Search, outside editable fields
?
This help, outside editable fields
↑ / ↓
Move through search results
Esc
Close a dialog or version menu
Progress, privacy, offline reading and controls →

Reset this learning record?

This removes course answers, exercise confirmations, bookmarks and recent pages for this docs version in this browser. Export a copy first if you want to keep it.

Search documentation

Type at least two characters.