Architecture
Admin Dashboard (cookest-admin)
Detailed setup and development guide for the Next.js Cookest Admin Dashboard.
The cookest-admin application is a Next.js admin dashboard that allows system operators and administrators to manage users, inspect server health, analyze app usage/subscriptions, and seed the food and recipe databases.
Technology Stack
- Framework: Next.js 16 (App Router)
- Styling: TailwindCSS v4.0
- Tables & Components: Headless UI + Custom components
- Authentication: JWT token-based session persistence in HTTP cookies.
Features
- Dashboard Analytics: Real-time charts of user registrations, active plans (Stripe), and meal plans created.
- User Management: Table with full CRUD operations, pagination, search, status toggles, and direct subscription adjustments.
- Database Seeding Controls: UI trigger to start ingestion jobs, importing recipes from external CSV/JSON datasets.
- API Settings: Configurable endpoints to communicate with both
app-apiandfood-api.
Directory Structure
cookest-admin/
├── app/ # App Router pages (auth, dashboard, users, logs)
│ ├── (dashboard)/ # Main dashboard layout & analytics
│ ├── auth/ # Login and session setup
│ └── users/ # User management tables
├── components/ # Dashboard widgets, stats charts, modals
├── lib/ # API fetch helpers and JWT decoders
└── package.jsonLocal Development & Setup
Environment Variables
Create a .env.local file in the root of cookest-admin/:
# URL accessed by the browser for client-side API requests
NEXT_PUBLIC_APP_API_URL=http://localhost:8080
# URL accessed by the NextJS server for server-side fetches (ssr)
APP_API_INTERNAL_URL=http://localhost:8080Installation Steps
- Install dependencies:
bun install - Start the local development server:
bun run dev - Open
http://localhost:3002in your browser.