1.6 KiB
1.6 KiB
AGENTS.md
Repo Facts
- Single-page app: The entire dashboard is self-contained in
src/pages/index.astro(~360 lines). It does not meaningfully useLayout.astroorWelcome.astro— those are leftover starter code and can be ignored or removed. - Bun is the package manager (lockfile:
bun.lock). Usebun install/bun dev/bun build. - No lint, test, or typecheck scripts are defined in
package.json.tsconfig.jsonextendsastro/tsconfigs/strict.
Token & API
- Dashboard fetches from a hardcoded API base URL:
https://bitfreedom.net/code/api/v1(seesrc/pages/index.astro:108). - Access token is passed as a query param:
?access_token=<token>&since=<ISO>. - Token is injected at build time via Vite
defineinastro.config.mjs(ACCESS_TOKEN→import.meta.env.PUBLIC_ACCESS_TOKEN). - Set it in
.envasPUBLIC_ACCESS_TOKEN=.....envis gitignored. - For deployments, the hosting platform must provide
PUBLIC_ACCESS_TOKENas a build env var. - To change the API endpoint or token mechanism, edit
src/pages/index.astro.
Commands
bun install # install deps
bun dev # dev server at localhost:4321
bun build # static output → dist/
bun preview # serve dist/ locally
Structure Notes
src/pages/index.astro— the only meaningful page. Inline styles, inline JS, ApexCharts via CDN.src/layouts/Layout.astroandsrc/components/Welcome.astro— unused starter code.public/— onlyfavicon.icoandfavicon.svg..playwright-mcp/— contains Playwright MCP artifacts (screenshots, page yamls); not part of the app.