← All templates

Energy Monitoring

Operations & IoT · React + Node (Express) · 16 @molecule/* packages

Sense-like energy monitoring with usage tracking, solar production, cost analysis, alerts, and consumption trends — with built-in Stripe-backed subscription tiers

Open in Molecule

What is inside

  • auth
  • reporting
  • alerts
  • charts
  • date-range
  • push-notifications
  • subscriptions

Screens (13)

  • Login /login
  • Signup /signup
  • ForgotPassword /forgot-password
  • ResetPassword /reset-password
  • Dashboard /dashboard (signed in)
  • Devices /devices (signed in)
  • Reports /reports (signed in)
  • Alerts /alerts (signed in)
  • Settings /settings (signed in)
  • DeviceDetail /devices/:id (signed in)
  • AlertRule /alerts/rules/new (signed in)
  • Profile /profile (signed in)
  • Billing /billing (signed in)

Data model (10 tables)

  • alert_rules — id, user_id, name, meter_id, type, threshold, comparison, notify_email, …
  • devices — id, createdAt, updatedAt, userId, name, pushPlatform, pushSubscription, hasPushSubscription
  • energy_alerts — id, user_id, rule_id, meter_id, type, severity, message, status, …
  • energy_daily_summary — id, user_id, meter_id, date, total_kwh, peak_kwh, off_peak_kwh, reading_count, …
  • energy_monthly_summary — id, user_id, meter_id, year, month, total_kwh, total_cost, reading_count, …
  • meter_tokens — id, meter_id, user_id, token_hash, label, enabled, last_used_at, created_at, …
  • meters — id, user_id, name, type, location, unit, description, status, …
  • rate_plans — id, user_id, name, rate_per_kwh, peak_rate, off_peak_rate, peak_start_hour, peak_end_hour, …
  • readings — id, meter_id, value, unit, timestamp, created_at
  • payments — id, createdAt, updatedAt, userId, transactionId, productId, platformKey, data, …

API (6 handlers)

  • \_seed api/src/handlers/_seed.ts
  • alerts api/src/handlers/alerts.ts
  • costs api/src/handlers/costs.ts
  • me api/src/handlers/me.ts
  • meters api/src/handlers/meters.ts
  • readings api/src/handlers/readings.ts

Subscription tiers

free / pro / team — gated by: maxAlerts, maxCosts, maxMeters, maxReadings, advancedFeatures, canExport, retentionDays

Built from 16 @molecule/* packages

Browse all @molecule/* packages →

Required secrets

  • DATABASE_URL PostgreSQL connection string
  • MAILGUN_API_KEY Mailgun API key for alert emails
  • MAILGUN_DOMAIN Mailgun sending domain

The @molecule/* packages are Apache-2.0. The app you build from this template is yours to export and self-host. Licensing