AI-Powered Energy Management Platform for Nigerian SMEs & African Businesses
# EnergyIQ
Next.js 16 + React 19 + Tailwind v4 + shadcn (radix-maia). Validated env, typed proxy, and the standard set of route conventions wired up.
## Stack
- **Next.js 16** App Router (`proxy.ts`, `forbidden.tsx`, `unauthorized.tsx`)
- **React 19**, **TypeScript** (strict)
- **Tailwind v4** with shadcn `radix-maia` style
- **`@t3-oss/env-nextjs`** + **Zod 4** for build-time env validation
## Getting started
```bash
pnpm install
cp .env.example .env.local # fill in values
pnpm dev
```
Open .
## Scripts
| Command | What it does |
| ---------------- | -------------------------------- |
| `pnpm dev` | Dev server |
| `pnpm build` | Production build (validates env) |
| `pnpm start` | Run the production build |
| `pnpm lint` | ESLint |
| `pnpm typecheck` | `tsc --noEmit` |
## Environment variables
Schemas live in `src/env/`, split by side:
- `src/env/server.ts` — server-only vars. t3-env throws at runtime if a client component reads it.
- `src/env/client.ts` — `NEXT_PUBLIC_*` vars, safe everywhere.
Both are imported in `next.config.ts` so the build fails on any malformed value. Set `SKIP_ENV_VALIDATION=1` to bypass (Docker, lint-only CI).
| Var | Side | Required | Notes |
| ---------------------- | ------ | -------- | ------------------------------------- |
| `NODE_ENV` | server | auto | `development` / `test` / `production` |
| `API_BASE_URL` | server | optional | Upstream API for server-side `fetch` |
| `API_SECRET` | server | optional | Bearer token forwarded server-side |
| `NEXT_PUBLIC_APP_URL` | client | optional | Defaults to `
localhost` |
| `NEXT_PUBLIC_APP_NAME` | client | optional | Defaults to `Next Starter` |
Use it like:
```ts
// Server code (route handlers, Server Components, Server Actions)
import { env …