understanding-taubyte-architecture
Understanding Taubyte Architecture
When to use
- "What is
tauvsdream?" - "Why didn't my push show up on the cloud?"
- "Do I need GitHub for this?"
- "What repos does a Taubyte project need?"
- "Should I use Dream or a remote cloud?"
- Onboarding a new project / first-time orientation.
One-paragraph mental model
Taubyte is git-native: GitHub is the source of truth, and clouds are build+serve consumers of what's pushed. tau is the CLI that connects to a cloud (remote or local) to create/manage projects and resources by writing config files into a config repo. dream is a miniature Taubyte cloud you can run on your laptop; tau can target it as a local cloud. Remote clouds build automatically via GitHub webhooks; Dream local clouds are triggered with dream inject because no public webhook can reach localhost.
Cloud types
| Type | Where it runs | How builds trigger |
|---|---|---|
| Remote | Real Taubyte infrastructure | GitHub webhook (automatic on push) |
| Local (Dream) | Laptop, hosted by dream |
dream inject push-all / push-specific after GitHub push |
tau connects to either via:
tau select cloud --universe <name>→ local Dream cloud (the universe is the Dream-side context).tau select cloud --fqdn <fqdn>→ remote cloud.
Source-of-truth repos
A Taubyte project always has two mandatory repos on GitHub, plus optional ones per resource:
GitHub: <org>/
├── tb_<project> # Config repo (mandatory) — YAML resource definitions
├── tb_code_<project> # Code repo (mandatory) — inline serverless function source
├── tb_code_<project>_<site> # Optional, one per website
└── tb_code_<project>_<lib> # Optional, one per library
- Config repo: contains
config.yamlplus folders likedomains/,functions/,applications/<app>/databases|storage|messaging|services|functions/,websites/,libraries/. Modify only viatau— manual edits can break the schema and causetau validate configfailures. - Code repo: holds inline function source if you choose the inline approach.
- Website / library repos: each website and each library lives in its own repository.
Build flow
Remote (webhook-driven, default for production)
flowchart LR
Dev[Local repo] -->|git push| GH[GitHub]
GH -->|webhook| Cloud[Remote cloud]
Cloud -->|build + serve| Users
Local Dream (inject-driven)
flowchart LR
Dev[Local repo] -->|git push| GH[GitHub]
Dev -->|dream inject push-specific| Dream[Dream local cloud]
Dream -->|build + serve| Browser[localhost]
Both flows still go through GitHub. dream inject simulates the webhook locally because Dream can't receive a public webhook.
Local on-disk layout (after tau new project)
/path/to/projects/<project>/
├── config/ # cloned from tb_<project>
├── code/ # cloned from tb_code_<project>
├── websites/<repo>/ # cloned when website is imported
└── libraries/<repo>/ # cloned when library is imported
Hard rules
- GitHub is the source of truth. Never push directly to the cloud bypassing git.
- Config repo structure is owned by
tau. Don't hand-edit YAML inconfig/unless explicitly debugging schema (and even then,taushould rewrite it). - Project name → use snake_case (dashes break
tau validate configwithinvalid variable name). See bootstrapping-taubyte-projects. - Each website/library is its own GitHub repo.
Intent → resources (how to translate "build me an app")
When a request is phrased as an application (not a single Taubyte resource), interpret it as a bundle of resources that must be created and wired together:
- UI: website + domain + paths (project-scoped if needed or mentioned).
- State: application + database/storage/messaging/service as implied (application-scoped if needed or mentioned).
- API glue: at least one function providing the API surface the UI can call; attach it to the right domain and routes.
The goal is to deliver a working composition, not just YAML. Use creating-taubyte-resources as the concrete checklist for scopes, and enforcing-taubyte-constraints to keep matcher strings consistent across YAML and Go.
Related skills
starting-dream-locally— bring up a Dream cloudbootstrapping-taubyte-projects— create the config + code repostriggering-dream-builds— local-cloud build triggerpushing-taubyte-projects— push config/code/website/library to GitHub viatau
More from taubyte/skills
verifying-taubyte-functions
Verifies a Taubyte Go function locally via the `taubyte/go-wasi` Docker recipe (preferred over `tau build`, with tmpfs+bind-mount-ro to avoid root-owned artifacts in the source tree), and verifies a function actually serves on Dream by curling the gateway with the right `Host:` header (plus `/etc/hosts` mapping for `*.localtau`). Use when locally compiling a Go function to WASM, when smoke-testing a function before pushing, or when probing a Dream-hosted HTTP function from the laptop.
12creating-taubyte-resources
Creates Taubyte resources non-interactively via `tau new` for domain, website, library, function, application, database, storage, messaging, and service. Encodes the project-vs-application scope rule, the database `min < max` constraint, the website/library `--generate-repository` + import sequence, and the forbidden `--generated-fqdn-prefix` flag. Use when adding any resource to a Taubyte project's config repo.
12diagnosing-dream-builds
Diagnoses Dream local-cloud builds when `tau list/query builds` is empty or unreliable, by hitting the jobs HTTP endpoint directly (`GET /jobs/<project_id>`, `GET /job/<job_id>`) using the GitHub token from `~/tau.yaml`, then downloading logs with `tau query logs --jid`. Use when Dream builds appear silent, the build table is empty after `dream inject`, or you need raw job ids and logs for a failing build.
11taubyte-resource-creation
Scope-aware resource creation workflow. Uses non-interactive mode by default and references the shared flags catalog.
11taubyte-push-build-verify
Pushes config/code and verifies builds/logs. Includes website/library push handling with tau command first, git fallback.
11taubyte-scope-routing
Routes project-level vs application-scoped work; defaults to a website when a browser UI is logically appropriate; avoids unnecessary applications for simple website/function-only tasks unless needed.
11