feat: Responsive admin UI, SEO pages, and click analytics

## Responsive Admin UI
- Layout.tsx: Mobile sidebar drawer with hamburger menu
- Dashboard.tsx: 2-col grid on mobile, responsive stats cards
- OrchestratorDashboard.tsx: Responsive table with hidden columns
- PagesTab.tsx: Responsive filters and table

## SEO Pages
- New /admin/seo section with state landing pages
- SEO page generation and management
- State page content with dispensary/product counts

## Click Analytics
- Product click tracking infrastructure
- Click analytics dashboard

## Other Changes
- Consumer features scaffolding (alerts, deals, favorites)
- Health panel component
- Workers dashboard improvements
- Legacy DutchieAZ pages removed

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Kelly
2025-12-07 22:48:21 -07:00
parent 38d3ea1408
commit 3bc0effa33
74 changed files with 12295 additions and 807 deletions

67
backend/src/cli.ts Normal file
View File

@@ -0,0 +1,67 @@
#!/usr/bin/env node
/**
* CLI Entrypoint for CannaIQ Backend
*
* Usage:
* npx tsx src/cli.ts # Start API server
* npx tsx src/cli.ts --worker # Start worker process
* npx tsx src/cli.ts --help # Show help
*
* Environment Variables:
* DATABASE_URL - PostgreSQL connection string (required)
* PORT - API server port (default: 3010)
* WORKER_ID - Worker instance identifier (auto-generated if not set)
*/
const args = process.argv.slice(2);
function showHelp() {
console.log(`
CannaIQ Backend CLI
Usage:
npx tsx src/cli.ts [options]
Options:
--worker Start as a job queue worker (processes crawl jobs)
--api Start as API server (default)
--help Show this help message
Environment Variables:
DATABASE_URL PostgreSQL connection string (required)
PORT API server port (default: 3010)
WORKER_ID Worker instance identifier (auto-generated)
Examples:
# Start API server on default port
DATABASE_URL="postgresql://..." npx tsx src/cli.ts
# Start worker process
DATABASE_URL="postgresql://..." npx tsx src/cli.ts --worker
# Start API on custom port
PORT=3015 DATABASE_URL="postgresql://..." npx tsx src/cli.ts --api
`);
process.exit(0);
}
async function main() {
if (args.includes('--help') || args.includes('-h')) {
showHelp();
}
if (args.includes('--worker')) {
console.log('[CLI] Starting worker process...');
const { startWorker } = await import('./dutchie-az/services/worker');
await startWorker();
} else {
// Default: start API server
console.log('[CLI] Starting API server...');
await import('./index');
}
}
main().catch((error) => {
console.error('[CLI] Fatal error:', error);
process.exit(1);
});