Create README.md and add AGENTS.md
This commit is contained in:
parent
adc39db441
commit
c04e80dbd9
2 changed files with 120 additions and 33 deletions
32
AGENTS.md
Normal file
32
AGENTS.md
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# AGENTS.md
|
||||
|
||||
## Repo Facts
|
||||
|
||||
- **Single-page app**: The entire dashboard is self-contained in `src/pages/index.astro` (~360 lines). It does not meaningfully use `Layout.astro` or `Welcome.astro` — those are leftover starter code and can be ignored or removed.
|
||||
- **Bun** is the package manager (lockfile: `bun.lock`). Use `bun install` / `bun dev` / `bun build`.
|
||||
- **No lint, test, or typecheck scripts** are defined in `package.json`. `tsconfig.json` extends `astro/tsconfigs/strict`.
|
||||
|
||||
## Token & API
|
||||
|
||||
- Dashboard fetches from a **hardcoded API base URL**: `https://bitfreedom.net/code/api/v1` (see `src/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 `define` in `astro.config.mjs` (`ACCESS_TOKEN` → `import.meta.env.PUBLIC_ACCESS_TOKEN`).
|
||||
- Set it in `.env` as `PUBLIC_ACCESS_TOKEN=...`. `.env` is gitignored.
|
||||
- For deployments, the hosting platform must provide `PUBLIC_ACCESS_TOKEN` as 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.astro` and `src/components/Welcome.astro` — unused starter code.
|
||||
- `public/` — only `favicon.ico` and `favicon.svg`.
|
||||
- `.playwright-mcp/` — contains Playwright MCP artifacts (screenshots, page yamls); not part of the app.
|
||||
Loading…
Add table
Add a link
Reference in a new issue