{"id":48064593,"url":"https://github.com/hk-dev13/dash-envoyou","last_synced_at":"2026-04-04T14:35:27.448Z","repository":{"id":315585367,"uuid":"1060020431","full_name":"hk-dev13/dash-envoyou","owner":"hk-dev13","description":"dashboard user for envoyou API user","archived":false,"fork":false,"pushed_at":"2025-09-19T12:58:19.000Z","size":112,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-19T13:32:15.243Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hk-dev13.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-19T09:16:37.000Z","updated_at":"2025-09-19T12:58:22.000Z","dependencies_parsed_at":"2025-09-19T13:32:18.024Z","dependency_job_id":"4baa6a86-6311-415f-b323-9460ea1f149c","html_url":"https://github.com/hk-dev13/dash-envoyou","commit_stats":null,"previous_names":["hk-dev13/dash-envoyou"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/hk-dev13/dash-envoyou","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hk-dev13%2Fdash-envoyou","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hk-dev13%2Fdash-envoyou/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hk-dev13%2Fdash-envoyou/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hk-dev13%2Fdash-envoyou/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hk-dev13","download_url":"https://codeload.github.com/hk-dev13/dash-envoyou/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hk-dev13%2Fdash-envoyou/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31402955,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-04T14:35:26.712Z","updated_at":"2026-04-04T14:35:27.440Z","avatar_url":"https://github.com/hk-dev13.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Envoyou Dashboard\n\nA modern SaaS dashboard for environmental data management built with Next.js 15, TypeScript, and Tailwind CSS.\n\n## Theme \u0026 Design System\n\nThe dashboard uses a semantic HSL token system (no hardcoded colors) and a layered component hierarchy (`Card`, `ElevatedCard`, `DepthCard`) for visual priority.\n\n- Theme usage \u0026 hierarchy guide: [THEME_USAGE_GUIDE.md](./THEME_USAGE_GUIDE.md)\n- Live component preview (once added): `/design-system` route\n- Depth components: prefer smallest depth tier that achieves emphasis\n\nTo propose new tokens or patterns, follow the extension workflow in the guide before opening a PR.\n\n## Features\n\n- **Modern UI/UX**: Clean, professional interface with dark/light theme support\n- **Authentication**: Supabase integration with Google OAuth\n- **API Management**: Create and manage API keys for backend integration\n- **Data Visualization**: Interactive charts and analytics for usage tracking\n- **Global Environmental Data**: Access to EPA/EIA emissions, EEA indicators, and more\n- **Real-time Notifications**: Stay updated with account activities\n- **Responsive Design**: Works seamlessly across desktop and mobile devices\n- **Consistent Icons**: SVG-based icon system with unified color scheme\n\n## Tech Stack\n\n- **Framework**: Next.js 15 with App Router\n- **Language**: TypeScript\n- **Styling**: Tailwind CSS with custom design system\n- **Authentication**: Supabase Auth\n- **UI Components**: Custom components with Radix UI patterns\n- **Charts**: Recharts for data visualization\n- **Icons**: Custom SVG icon components\n- **State Management**: React Context (Auth, Theme)\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js 18+\n- npm or yarn\n- Supabase project\n\n### Environment Setup\n\n1. Copy the environment example file:\n\n```bash\ncp .env.local.example .env.local\n```\n\n1. Update the environment variables:\n\n```env\nNEXT_PUBLIC_SUPABASE_URL=your_supabase_url_here\nNEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key_here\nNEXT_PUBLIC_API_BASE_URL=http://localhost:8000\n```\n\n### Installation\n\n1. Install dependencies:\n\n```bash\nnpm install\n```\n\n1. Run the development server:\n\n```bash\nnpm run dev\n```\n\n1. Open [http://localhost:3000](http://localhost:3000) in your browser.\n\n## Project Structure\n\n```text\nsrc/\n├── app/                    # Next.js App Router pages\n│   ├── dashboard/         # Dashboard pages\n│   ├── globals.css        # Global styles\n│   └── layout.tsx         # Root layout\n├── components/            # Reusable components\n│   ├── ui/               # Base UI components\n│   ├── icons/            # SVG icon components\n│   ├── sidebar.tsx       # Navigation sidebar\n│   ├── header.tsx        # Page header\n│   └── theme-provider.tsx # Theme management\n├── hooks/                 # Custom React hooks\n│   └── useAuth.tsx       # Authentication hook\n├── lib/                  # Utility functions\n│   ├── api.ts            # API client\n│   └── utils.ts          # Common utilities\n└── types/                # TypeScript type definitions\n    └── index.ts          # Shared types\n```\n\n## Backend Integration\n\nThis dashboard works with the Envoyou API backend located at `/home/husni/PROJECT-ENVOYOU-API/api-envoyou`.\n\n### Key Endpoints Used\n\n- `/v1/auth/supabase/verify` - Supabase token verification\n- `/v1/user/*` - User profile and settings\n- `/v1/global/*` - Environmental data access\n- `/v1/developer/*` - Usage statistics\n- `/v1/notifications/*` - Notification management\n\n## Development Guidelines\n\n### Code Style\n\n- Use TypeScript for all components\n- Follow React best practices\n- Use Tailwind CSS for styling\n- Implement proper error handling\n- Add loading states for async operations\n\n### Icon System\n\n- Use SVG components from `@/components/icons`\n- Maintain consistent stroke width (2px)\n- Use `currentColor` for stroke\n- Follow the single-color theme approach\n\n## License\n\n## Visual Regression Tests\n\nPlaywright is configured to capture light + dark snapshots of the design system showcase.\n\n### Install Browsers (first time)\n```bash\nnpx playwright install --with-deps\n```\n\n### Run Visual Tests\n```bash\npnpm run test:visual\n```\n\n### Update Baselines\n```bash\npnpm run test:visual:update\n```\n\nBaseline snapshots are stored under `tests/visual/__screenshots__/`. Commit updated baselines only when intentional UI changes occur and reference them in the PR description.\n\nPrivate project - All rights reserved.\n\n## Daily Summaries \u0026 Retention\n\nAutomated daily development summaries are generated via a GitHub Action (`.github/workflows/daily-summary.yml`). Each run creates or appends a file named `DAILY_SUMMARY_YYYY-MM-DD.md` in the repository root of the dashboard.\n\n### Manual Generation\n\n```bash\nnpm run daily:summary\n```\n\n### Scheduled Generation\n\nThe workflow runs daily at `23:50 UTC` (see `cron` line). Adjust schedule by editing the `cron` expression:\n\n```yaml\nschedule:\n    - cron: '50 23 * * *'\n```\n\n### Retention Cleanup\n\nOld summary files are pruned automatically after generation using `scripts/cleanup-daily-summaries.mjs`.\n\nRun manually:\n\n```bash\nRETENTION_DAYS=45 npm run daily:cleanup\n```\n\nDefault retention: `30` days. Configure via the `RETENTION_DAYS` environment variable. To preview deletions without removing files:\n\n```bash\nDRY_RUN=1 RETENTION_DAYS=60 npm run daily:cleanup\n```\n\n### Workflow Steps Overview\n\n1. Install dependencies\n1. Generate (or update) today's summary file\n1. Cleanup old summaries (`RETENTION_DAYS=30` by default in workflow)\n1. Commit + push if changes exist\n\n### Customizing\n\n- Change retention: edit `RETENTION_DAYS` env in workflow step\n- Disable cleanup: remove or comment out the cleanup step\n- Extend content: modify `scripts/generate-daily-summary.mjs`\n\n### Notes\n\n- Files are only committed when content changes\n- Filenames must match `DAILY_SUMMARY_YYYY-MM-DD.md` pattern for cleanup\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhk-dev13%2Fdash-envoyou","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhk-dev13%2Fdash-envoyou","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhk-dev13%2Fdash-envoyou/lists"}