WattXchange is an internal Next.js dashboard for monitoring solar and wind energy production across multiple parks. It processes CSV files, aggregates data hourly, and presents interactive charts and tables with filtering by quarter/year or custom date/time range.
- Interactive area charts (solar, wind, combined) using shadcn/ui charts (Recharts).
- Date/time filtering with a toggle between preset ranges (quarter/year) and custom date/time range.
- Per-park and all-parks views (solar and wind).
- Searchable, paginated data tables (TanStack Table) with totals.
- Dark mode toggle.
- GitHub Actions test workflow (Jest).
- Next.js 16 (App Router)
- React 19
- TypeScript
- Tailwind CSS + shadcn/ui
- Recharts
- TanStack Table
app/
layout.tsx
page.tsx
components/
app-sidebar.tsx
charts/energy-area-chart.tsx
filters/date-time-range-picker.tsx
tables/energy-data-table.tsx
ui/...
lib/
charts/
types.ts
utils.ts
design.ts
Each chart has a toggle:
- Preset: quarters + full years (from available data).
- Date/time range: choose single day or range with times.
The filter applies to both the chart and its table.
Install dependencies and run the dev server:
npm install
npm run devnpm run dev # start dev server
npm run build # production build
npm run start # start production server
npm run lint # lint
npm run test # jest unit testsJest + Testing Library are configured. Run:
npm run testTests live in __tests__/ and currently cover chart utilities.
The app is compatible with AWS Amplify or Vercel.
- Connect the GitHub repo.
- Amplify will run
npm ciandnpm run build.
A workflow is included at .github/workflows/tests.yml to run npm test on pushes/PRs.
Internal use only.