Openelectricity
Open Electricity
Install / Use
/learn @opennem/OpenelectricityREADME
Open Electricity
The frontend for the Open Electricity platform — an open-source project exploring Australia's electricity system through data visualisation and analysis.
For the Data Tracker (a.k.a. OpenNEM), see opennem/opennem-fe.
Tech Stack
- SvelteKit with Svelte 5 (runes)
- Tailwind CSS 4 with shadcn-svelte components
- LayerCake + D3.js for data visualisation
- Sanity CMS for editorial content
- Cloudflare Pages for deployment
- Clerk for authentication
Getting Started
Prerequisites
Setup
bun install
bun run dev
The dev server starts at http://localhost:5173.
Commands
| Command | Description |
| -------------------- | ------------------------------- |
| bun run dev | Start development server |
| bun run build | Production build |
| bun run preview | Preview production build |
| bun run check | Type check with svelte-check |
| bun run lint | Lint with Prettier + ESLint |
| bun run format | Auto-format with Prettier |
| bun run test | Run unit tests (Vitest) |
| bun run test:e2e | Run end-to-end tests (Playwright) |
Project Structure
src/
├── lib/
│ ├── components/ # UI and chart components
│ │ ├── charts/ # LayerCake-based visualisations
│ │ ├── form-elements/ # Reusable form controls
│ │ ├── info-graphics/ # Interactive homepage visuals
│ │ └── ui/ # shadcn-svelte components
│ ├── fuel-tech-groups/ # Energy source categorisation
│ ├── models/ # Static scenario data
│ ├── opennem/ # OpenNEM API integration
│ ├── stores/ # Global state (Svelte stores)
│ ├── theme/ # Colour palettes and theming
│ ├── types/ # TypeScript definitions (JSDoc)
│ └── utils/ # Data processing utilities
├── routes/
│ ├── (main)/ # Primary app routes
│ │ ├── about/ # Team and project info
│ │ ├── analysis/ # Editorial articles (Sanity CMS)
│ │ ├── facilities/ # Power station explorer
│ │ ├── records/ # Historical electricity records
│ │ ├── scenarios/ # Future energy modelling
│ │ └── studio/ # Data exploration tools
│ │ ├── strata/ # Published chart detail pages
│ │ └── strata-community/ # Community chart gallery
│ ├── (micro)/ # Embeddable widgets and micro-apps
│ │ ├── record/ # Minimal record displays
│ │ ├── strata-embed/ # Strata chart iframe embeds
│ │ ├── stratify/ # Stratify chart builder (closed beta)
│ │ └── widget/ # Grid status widget
│ └── api/ # Server-side data endpoints
└── ...
Deployment
Deployments are triggered via a Cloudflare deploy hook on version tags:
npm version patch # or minor / major
git push # push.followTags pushes the tag automatically
GitHub Actions picks up the v* tag and triggers the Cloudflare build.
Licence
See LICENSE for details.
Related Skills
node-connect
351.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
