GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - JamesTheTerry/neon-usage-xl: Neon database billing dashboard that runs locally with minimal packaging that you can (probably) trust

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
.cursor
.cursor
 
 
public
public
 
 
readme-images
readme-images
 
 
src
src
 
 
.env.example
.env.example
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
UPDATE_RATES.md
UPDATE_RATES.md
 
 
components.json
components.json
 
 
index.html
index.html
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
tsconfig.app.json
tsconfig.app.json
 
 
tsconfig.json
tsconfig.json
 
 
tsconfig.node.json
tsconfig.node.json
 
 
vite.config.ts
vite.config.ts
 
 

Repository files navigation

Neon Usage

A local dashboard for Neon usage-based billing. It pulls live consumption metrics, converts them with Neon’s published formulas, and shows spend by type, day, and project. Nothing is stored.

Plan rates last refreshed: 15 September 2026. Neon has no API for list prices. This app hardcodes them from the docs in src/lib/rates.ts. If you are using this later, paste UPDATE_RATES.md into an LLM and have it re-check Plans and Usage and cost calculations.

Consumption history is available on Launch, Scale, Agent, and Enterprise plans.

What's it look like

Yes there's a light and dark mode.

Fallback image description Fallback image description

Why you can trust this repo: how your API key is handled

The browser never receives NEON_PERSONAL_API_KEY. The key is only ever sent to Neon (https://console.neon.tech), as a Bearer token on allowlisted GET requests. It is not posted to this app’s authors, a third-party backend, or anywhere else. I've limited the packages to prevent any kind of key leakage.

  1. You put a personal API key in a gitignored .env file on your machine.
  2. The UI only calls same-origin /api/neon/....
  3. The only server code is src/server/proxy.ts. Read that file. It is short on purpose.
  4. That proxy:
    • allows GET only
    • allowlists four Neon paths (/users/me/organizations, /projects, /consumption_history/v2/projects, /consumption_history/v2/branches)
    • injects Authorization: Bearer from .env
    • returns JSON as-is
    • does not log the key
    • does not write responses to disk
    • does not use a database

There is no Next.js server, no server actions, and no @neon/sdk. The client uses fetch against the local proxy. If you can read src/server/proxy.ts, you can see every way the key is used.

Restart pnpm dev after changing .env. Vite loads the key at process start.

Final notes on trust

Look I'm just a guy who wants to track his Neon usage. I've done my best to keep this as minimal as possible while still looking nice and getting the info I need. You should always review codebases that you're passing keys to, especially Neon keys, since as of this writing, you can't scope them down to just readonly. Which is so freaking dumb.

So all I can offer is my word, but its your job to review this too. User beware and all that.

Setup

pnpm install
cp .env.example .env

Create a personal API key in the Neon console and set:

NEON_PERSONAL_API_KEY=your_personal_neon_key_here

Then:

pnpm dev

Open the printed localhost URL. pnpm preview uses the same proxy after pnpm build.

What the dashboard does

  • Pick an organization, date range, and granularity (hourly / daily / monthly)
  • Filter to one project or all projects
  • Summary cards for estimated spend
  • Spend over time (stacked by consumption type)
  • Spend share by type, and top projects
  • Per-project table with usage + cost for compute, root/child storage, instant restore, snapshots, public/private transfer, and extra branches
  • Expand a project to load per-branch compute/storage/transfer (snapshots and extra branches stay project-level; those metrics are not on the branch API)

No billing data is persisted. Theme preference is the only localStorage value.

Lookback limits

Neon returns 406 if from is older than the granularity window. The UI clamps ranges to:

Granularity Lookback
Hourly Last 168 hours
Daily Last 60 days
Monthly Last 12 months

Hourly is closest to invoice math for extra-branch allowances. Daily is the usual choice for a month.

How cost is estimated

Raw v2 metrics are converted in src/lib/billing.ts using rates in src/lib/rates.ts:

  • CU-hours = compute_unit_seconds / 3600
  • GB-months = *_bytes_month / 1e9 (decimal GB; v2 is already byte-months)
  • Transfer GB = *_bytes / 1e9
  • Public transfer: max(0, project_GB - 500) then × $0.10
  • Extra branches: per project per bucket, max(0, reported_hours - included_child_branches × hours_in_bucket) / 744 × $1.50

Plan rates come from period_plan on each consumption period (Launch compute $0.106/CU-hr, Scale $0.222/CU-hr; Agent uses Launch compute with Scale allowances). Custom Enterprise contract rates are not applied.

Public-transfer allowance is subtracted from project totals over the selected range. The time-series chart shows transfer before that allowance so spikes stay visible. Partial-month ranges can therefore differ from a full invoice.

Calling the consumption API does not wake suspended computes.

Was this just AI generated

Ugh, yes, it was. I just needed a dashboard, baby, and I didn't want to spend a day on it.

About

Neon database billing dashboard that runs locally with minimal packaging that you can (probably) trust

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.