{"id":31763382,"url":"https://github.com/supabase/smart-office-demo","last_synced_at":"2025-10-09T23:20:14.601Z","repository":{"id":316602411,"uuid":"1064033550","full_name":"supabase/smart-office-demo","owner":"supabase","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-02T23:01:26.000Z","size":4093,"stargazers_count":3,"open_issues_count":0,"forks_count":4,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-02T23:30:35.311Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://smart-office-demo.vercel.app","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/supabase.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":"AGENTS.md","dco":null,"cla":null},"funding":{"github":["supabase"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2025-09-25T12:58:03.000Z","updated_at":"2025-10-02T23:01:29.000Z","dependencies_parsed_at":"2025-09-25T16:08:51.210Z","dependency_job_id":"153c3d53-c740-4eef-aba4-34fad95fe1a7","html_url":"https://github.com/supabase/smart-office-demo","commit_stats":null,"previous_names":["supabase/smart-office-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/supabase/smart-office-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fsmart-office-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fsmart-office-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fsmart-office-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fsmart-office-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supabase","download_url":"https://codeload.github.com/supabase/smart-office-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fsmart-office-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002343,"owners_count":26083340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-10-09T23:20:13.229Z","updated_at":"2025-10-09T23:20:14.597Z","avatar_url":"https://github.com/supabase.png","language":"TypeScript","funding_links":["https://github.com/sponsors/supabase"],"categories":[],"sub_categories":[],"readme":"# Smart Office Dashboard 🏢\n\nA comprehensive conference room utilization and analytics platform built for **Dewey, Cheatham \u0026 Howe Law Firm**. This Next.js application demonstrates enterprise-grade IoT sensor data processing, real-time monitoring, and advanced analytics capabilities using Supabase as the backend.\n\nFor more information, please refer to the [FEATURES.md](FEATURES.md) file.\n\n## 📋 Prerequisites\n\n- **Node.js 18+**\n- **npm/yarn/pnpm**\n- **Supabase account** with project setup\n- **Environment variables** (see configuration below)\n\n## 🚀 Quick Start\n\n1. **Clone and Install**\n\n   ```bash\n   git clone git@github.com:supabase/smart-office-demo.git\n   cd smart-office-dashboard\n   npm install\n   ```\n\n2. **Environment Configuration**\n\n   ```bash\n   # Configure your Supabase project specific variables\n   cp .env.example .env.local\n\n   # add a functions .env.local file, add an OPENAI_API_KEY to it\n   cp supabase/functions/.env.example supabase/functions/.env\n   ```\n\n3. **Start a local Supabase dev environment**\n\n   ```bash\n   npx supabase start\n   ```\n\n4. **Start the Next.js dev server**\n\n   ```bash\n   npm run dev\n   ```\n\n5. **Access Application**\n   Open [http://localhost:3000](http://localhost:3000)\n\n## Generate demo data\n\n1. Run the following command to generate rooms, users, tickets and associated images\n\n   ```bash\n   npm run generate:all\n   ```\n\n2. Serve all the functions:\n\n   ```bash\n   npm run functions:serve-all\n   ```\n\n3. Load some initial sensor data simulator:\n\n   ```bash\n   npm run simulate:sensors\n   # Run it every time you want to simulate new sensor data for the real-time floorplan viewer\n   ```\n\n4. Load some initial booking data simulator:\n   ```bash\n   npm run simulate:bookings\n   ```\n\n## 🌊 pgflow Workflow Engine\n\nThis project includes [pgflow](https://pgflow.dev), a workflow engine for Supabase that helps with background jobs and queue processing. See [PGFLOW.md](./PGFLOW.md) for local development setup and examples.\n\n# 🚀 Deploy your project!\n\n## Deploy the website to Vercel\n\n### Step 1: Create a GitHub Repository\n\n1. **Fork this repository** on GitHub\n2. **Clone your fork** locally:\n   ```bash\n   git clone https://github.com/YOUR_USERNAME/smart-office-demo.git\n   cd smart-office-demo\n   ```\n\n### Step 2: Connect to Vercel\n\n1. **Go to [vercel.com](https://vercel.com)** and sign up/login\n2. **Click \"New Project\"**\n3. **Import your GitHub repository**\n4. **Vercel will auto-detect Next.js** - click \"Deploy\"\n\n### Step 3: Add Environment Variables\n\n1. **In your Vercel project dashboard**, go to **Settings** → **Environment Variables**\n2. **Add these variables**:\n   ```\n   NEXT_PUBLIC_SUPABASE_URL=your_supabase_url\n   NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key\n   SUPABASE_SERVICE_ROLE_KEY=your_service_role_key\n   OPENAI_API_KEY=your_openai_api_key\n   NEXT_PUBLIC_UNSPLASH_ACCESS_KEY=your_unsplash_access_key\n   ```\n3. **Click \"Redeploy\"** to apply the new variables\n\n### Step 4: Deploy Supabase Functions\n\n```bash\nnpm run functions:deploy-all\n```\n\n## Deploy the local Supabase project to hosted one\n\n### Step 1: Create a Supabase Project\n\n1. **Go to [supabase.com](https://supabase.com)** and sign up/login\n2. **Click \"New Project\"**\n3. **Choose your organization** and enter project details\n4. **Wait for the project to be created** (takes a few minutes)\n\n### Step 2: Link Your Local Project\n\n1. **In your terminal**, run:\n   ```bash\n   npx supabase link --project-ref YOUR_PROJECT_REF\n   ```\n   (Find your project ref in the Supabase dashboard URL)\n\n### Step 3: Push Your Database Schema\n\n1. **Push migrations and seed data**:\n   ```bash\n   npx supabase db push\n   ```\n\n### Step 4: Add vault secrets\n\nIn the SQL Editor of your project, run:\n\n```sql\n-- pg_net environment secrets\nselect vault.create_secret('https://[PROJECT-REF].supabase.co', 'supabase_url');\nselect vault.create_secret('[PROJECT-ANON-KEY]', 'supabase_anon_key');\n```\n\n### Step 5: Update Edge Function secrets\n\nDeploy the secrets in your `.env` file\n\n```bash\nnpx supabase secrets set --env-file .env\n```\n\n### Step 5: Update Environment Variables\n\n1. **Copy your new Supabase credentials** from the project dashboard\n2. **Update your Vercel environment variables** with the new hosted URLs and keys\n3. **Redeploy your Vercel project**\n\n**That's it!** Your Smart Office Dashboard is now live on Vercel with a hosted Supabase backend.\n\nFor pgflow workflows in production, see [Deploy to Supabase.com](https://www.pgflow.dev/how-to/deploy-to-supabasecom/).\n\n### Environment Variables for Production\n\nEnsure all environment variables are configured in your deployment platform with production Supabase credentials.\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create feature branches (`feature/analytics-enhancement`)\n3. Follow TypeScript best practices\n4. Add tests for new features\n5. Submit pull request with detailed description\n\n## 📄 License\n\nMIT License - see LICENSE file for details\n\n## 🏢 About Dewey, Cheatham \u0026 Howe\n\nThis application is built for the fictional law firm \"Dewey, Cheatham \u0026 Howe,\" serving as a sophisticated demonstration of modern office technology solutions. The firm's 57 conference rooms across multiple floors provide an ideal scenario for showcasing enterprise-scale IoT monitoring and analytics capabilities.\n\n---\n\n**Built with ❤️ for enterprise IoT demonstrations**\n**Showcasing: Next.js 15, Supabase, Analytics Buckets, Real-time Data Processing**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase%2Fsmart-office-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupabase%2Fsmart-office-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase%2Fsmart-office-demo/lists"}