Skip to content

About

Web front end for Caddy — access-log analytics plus a Caddyfile editor with a real lexer/parser/serializer

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

caddy-analytics

A web front end for a Caddy server — reads the access logs, and edits the Caddyfile.

Stack: Next.js · TypeScript · Jest

What it does

Two halves.

Analytics parses Caddy access logs into an overview, traffic and errors tabs, and a searchable log explorer. Client IPs get country flags, with private and loopback addresses marked as local rather than mislabelled as foreign traffic.

Config editing is the part I'm happier with. Rather than treating the Caddyfile as text, it has a real lexer, parser, and serializer — so the UI can offer a structured editor and a raw view over the same document and keep them in sync. Each stage is unit-tested independently.

Admin access is password-protected via a generated hash; there's no plaintext credential in the config.

Running it

npm install
npx tsx scripts/create-admin.ts   # generates ADMIN_PASSWORD_HASH for .env
npm run dev                       # localhost:3000
npm test

Status

Working against my own Caddy instance. The parser is the load-bearing piece and has the test coverage to match.

About

Web front end for Caddy — access-log analytics plus a Caddyfile editor with a real lexer/parser/serializer

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages