A React Router application for reading and visualizing data from the Enphase API. Built with TypeScript and deployed on Cloudflare Workers.
- 📊 Data visualization with Recharts
- 🗄️ Database integration using Drizzle ORM with D1
- 📄 PDF generation capabilities with @react-pdf/renderer
- 🎨 Styled with TailwindCSS
- ⚡ Serverless deployment on Cloudflare Workers
- 🔒 TypeScript for type safety
- Frontend: React 19, React Router 7
- Database: Cloudflare D1 with Drizzle ORM
- Styling: TailwindCSS
- Charts: Recharts
- PDF Generation: @react-pdf/renderer
- Deployment: Cloudflare Workers
- Node.js (v22 or higher recommended)
- npm or bun package manager
- Cloudflare account (for deployment)
Install the dependencies:
npm installOr with bun:
bun installStart the development server:
npm run devYour application will be available at http://localhost:5173.
Run TypeScript type checking:
npm run typecheckCreate a production build:
npm run buildThis application is configured to deploy to Cloudflare Workers. Make sure you have:
- Configured your D1 database binding named
enphase_db - Set up your
wrangler.jsoncconfiguration - Authenticated with Cloudflare CLI
Deploy using:
wrangler deployTo build and run using Docker:
docker build -t enphase-api-reader .
# Run the container
docker run -p 3000:3000 enphase-api-readerThis project uses Drizzle ORM with Cloudflare D1. Configuration can be found in drizzle.config.ts.
To manage database migrations:
# Generate migrations
npx drizzle-kit generate
# Push migrations
npx drizzle-kit pushThis project is licensed under the MIT License - see the LICENSE file for details.
Built with React Router and Cloudflare Workers