vite-nitro-evlog-starter

0
0
0
TypeScript
public

vite-nitro-evlog-starter

Minimal starter with Vite, Nitro, and evlog.

Stack

Getting started

pnpm install
pnpm dev

Open http://localhost:3000. Use Call /api/hello for a success wide event, or Trigger error to emit a structured error wide event.

Wide events are written locally to .evlog/logs/ via the FS drain. See AGENTS.md for agent setup, testing, and log analysis.

Scripts

Script Description
pnpm dev Start Vite dev server (client + Nitro API)
pnpm build Build client and server to .output/
pnpm preview Preview production build
pnpm lint Run ESLint
pnpm typecheck Run TypeScript
pnpm test Run Vitest

Project structure

index.html              # Frontend entry (Vite starter)
src/main.ts             # Vite starter UI + API button
src/api.ts              # fetch('/api/hello') on click
src/counter.ts          # Vite starter counter
src/style.css           # Vite starter styles
public/                 # favicon.svg, icons.svg
src/assets/             # hero.png, vite.svg, typescript.svg
vite.config.ts          # nitro() + evlog() plugins
nitro.config.ts         # evlog/nitro/v3 module
server/plugins/evlog-drain.ts # FS drain → .evlog/logs/
server/errors/app.ts    # typed error catalog (server-side)
server/api/hello.get.ts # GET /api/hello
server/api/error.get.ts # GET /api/error
AGENTS.md               # agent instructions (https://agents.md/)
test/counter.test.ts    # starter smoke test (Vite default)

License

Published under the APACHE license.

v0.3.3[beta]