This page is the fastest way to understand how an EdgeSpark project is meant to be changed day to day. The current scaffold is repo-driven: you edit files in the project, run the matching CLI command, deploy, and iterate.Documentation Index
Fetch the complete documentation index at: https://docs.edgespark.dev/llms.txt
Use this file to discover all available pages before exploring further.
The short version
| What you want to change | Edit this | Then run |
|---|---|---|
| App database schema | server/src/defs/db_schema.ts | edgespark db generate && edgespark db migrate |
| App database relations | server/src/defs/db_relations.ts | Usually edgespark pull types, and migrations only if the schema changed |
| Storage buckets | server/src/defs/storage_schema.ts | edgespark storage apply |
| Runtime secret and var key names | server/src/defs/runtime.ts | edgespark secret set ... or edgespark var set ... |
| Auth configuration | configs/auth-config.yaml | edgespark auth apply |
| Pulled platform-managed files | Nothing in your app repo | edgespark pull or edgespark pull types |
| Deploy and test | Your app code | edgespark deploy, edgespark deploy --dry-run, and edgespark log tail |
1. Change your app schema in the repo
Your app tables live inserver/src/defs/db_schema.ts, not in a dashboard table editor.
server/src/defs/db_schema.ts
2. Declare storage buckets in the repo
Buckets live inserver/src/defs/storage_schema.ts.
server/src/defs/storage_schema.ts
3. Keep runtime keys explicit
When your code reads vars or secrets, declare the allowed keys inserver/src/defs/runtime.ts.
server/src/defs/runtime.ts
4. Treat secrets differently from vars
Use vars for plain configuration values:edgespark var setis for non-sensitive configurationedgespark secret setis for credentials, signing keys, and tokens
5. Manage auth in configs/auth-config.yaml
Auth configuration lives in configs/auth-config.yaml.
Pull the current config:
6. Refresh generated types when needed
EdgeSpark also generates runtime type declarations inserver/src/__generated__/.
Refresh them with:
7. Deploy and iterate
Your normal loop should be:edgespark deploy updates that environment directly. Use edgespark deploy --dry-run when you want build validation without a live deploy.
A practical sequence
If you add a feature that needs a table, a bucket, and a secret, the normal order is:- Edit
server/src/defs/db_schema.ts - Run
edgespark db generate && edgespark db migrate - Edit
server/src/defs/storage_schema.ts - Run
edgespark storage apply - Edit
server/src/defs/runtime.ts - Run
edgespark secret set YOUR_SECRET_KEY - Write route code in
server/src/index.tsor route files - Run
edgespark pull typesif needed - Run
edgespark deploy --dry-run - Run
edgespark deploy - Run
edgespark log tail
See also
Project structure
See where
server/src/defs/, server/src/__generated__/, and configs/ live in the scaffold.Manage secrets
Learn the secure browser-based secret workflow in more detail.