Dependencies and build for dev's toolchain (released solid-start, nitro 3.0.260903-beta, @typescript/native, no nitro patch), the textjs package, link preview cards (script/og.ts, with the source frames it crops) and the server-bundle guard in the build. Middleware (redirects for /go, /zen, /black, /enterprise, /pricing, /models, /teams, /download, /products, plus dev's iOS pairing, server-action sanitizing and /auth, /workspace), robots.txt, humans.txt, security.txt, llms.txt (ours), sitemaps with the V2 docs at /v2/sitemap.xml, Markdown twins, link preview cards, the site header (our nav including Enterprise), footer, settings, search, voice, i18n in 18 locales with RTL, and the 404 arcade. Docs stay on dev's proxy: docsBase is /v2/docs. consoleMarketingEnabled is kept for dev's test. Zen is renamed OpenCode Models in our copy. Middleware sends heavy media to the CDN (src/lib/media.ts). Vite keeps one environments block. The mono font is OpenTUI Mono (Anomaly's, SIL OFL 1.1): the files and licence are in src/asset/fonts, built by script/opentui-mono.py. The legal library has the Privacy Policy and the Terms only; the legal drafts are not in this branch. |
||
|---|---|---|
| .. | ||
| .opencode/agent | ||
| public | ||
| script | ||
| src | ||
| test | ||
| .gitignore | ||
| AGENTS.md | ||
| DESIGN.md | ||
| media-manifest.txt | ||
| MEDIA.md | ||
| package.json | ||
| README.md | ||
| sst-env.d.ts | ||
| tsconfig.json | ||
| vite.config.ts | ||
SolidStart
Everything you need to build a Solid project, powered by solid-start;
Creating a project
# create a new project in the current directory
npm init solid@latest
# create a new project in my-app
npm init solid@latest my-app
Developing
Once you've created a project and installed dependencies with npm install (or pnpm install or yarn), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
GitHub API
The site reads the repo's stars, contributors and releases from the GitHub API on the server
(src/lib/github-api.ts). Without a token GitHub allows 60 calls an hour per IP, which a dev
machine can use up; then the pages show the last good data or the config fallbacks. Start the dev
server with your GitHub CLI token for 5,000 calls an hour:
GITHUB_TOKEN=$(gh auth token) bun run dev
Never commit a token. In dev the last good GitHub data is also kept in
$TMPDIR/opencode-site-github/, so a restart while rate limited still has it.
Building
Solid apps are built with presets, which optimise your project for deployment to different environments.
By default, npm run build will generate a Node app that you can run with npm start. To use a different preset, add it to the devDependencies in package.json and specify in your app.config.js.