{"id":28238813,"url":"https://github.com/hivecom/hivecom.net","last_synced_at":"2026-04-28T12:06:58.045Z","repository":{"id":39707665,"uuid":"496698130","full_name":"hivecom/hivecom.net","owner":"hivecom","description":"Front-end for Hivecom using Nuxt running on Supabase","archived":false,"fork":false,"pushed_at":"2025-06-05T03:55:36.000Z","size":3656,"stargazers_count":0,"open_issues_count":10,"forks_count":1,"subscribers_count":3,"default_branch":"dev","last_synced_at":"2025-06-05T06:44:10.606Z","etag":null,"topics":["community","front-end","nuxt","supabase","website"],"latest_commit_sha":null,"homepage":"https://dev.hivecom.net/","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hivecom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-05-26T16:43:26.000Z","updated_at":"2025-06-05T03:55:39.000Z","dependencies_parsed_at":"2025-01-11T21:30:57.430Z","dependency_job_id":"2af2a126-3faa-4c64-9e37-92f9bf130708","html_url":"https://github.com/hivecom/hivecom.net","commit_stats":null,"previous_names":["hivecom/hivecom.net"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hivecom%2Fhivecom.net","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hivecom%2Fhivecom.net/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hivecom%2Fhivecom.net/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hivecom%2Fhivecom.net/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hivecom","download_url":"https://codeload.github.com/hivecom/hivecom.net/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hivecom%2Fhivecom.net/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259186392,"owners_count":22818550,"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","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":["community","front-end","nuxt","supabase","website"],"created_at":"2025-05-19T02:11:00.174Z","updated_at":"2026-04-28T12:06:58.039Z","avatar_url":"https://github.com/hivecom.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hivecom.net\n\n[![build](https://github.com/hivecom/hivecom.net/actions/workflows/build.yml/badge.svg)](https://github.com/hivecom/hivecom.net/actions/workflows/build.yml)\n\n\u003c!--[![types](https://github.com/hivecom/hivecom.net/actions/workflows/types.yml/badge.svg)](https://github.com/hivecom/hivecom.net/actions/workflows/types.yml)--\u003e\n\n[![deploy](https://github.com/hivecom/hivecom.net/actions/workflows/deploy.yml/badge.svg?branch=main)](https://github.com/hivecom/hivecom.net/actions/workflows/deploy.yml)\n\nMain website for the Hivecom community.\n\nThis is a Nuxt project. As such, look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.\n\n## Setup\n\nMake sure to install the dependencies:\n\n```bash\nnpm install\n```\n\nTo run the Supabase instance locally, you will need to make sure you have [Docker](https://docs.docker.com/get-docker/) installed.\n\nFrom there, link your project via the following command:\n\n\u003e [!NOTE]\n\u003e We have a `supabase` npm command but you can substitute `npm run supabase` with `npx supabase` too for brevity.\n\u003e Make sure to add `--` to the end of the npm command if you want to pass any arguments to the Supabase CLI.\n\n```bash\nnpm run supabase link\n```\n\nYou will probably have to login to your Supabase account via the CLI. You can do so via `npx supabase login`.\n\nAsk your project admin for the necessary database credentials if you should have access to the Supabase instance.\n\nFrom there, it is recommended to configure your Supabase configuration. Add `SUPABASE_URL` and `SUPABASE_KEY` (your publishable key) to your `.env` in the root of the project:\n\n```env\nSUPABASE_URL=\"https://example.supabase.co\"\nSUPABASE_KEY=\"\u003cyour_key\u003e\"\n```\n\n## Development Server\n\nStart the development server on `http://localhost:3000`:\n\n```bash\nnpm run dev\n```\n\nThis automatically start the Supabase instance locally as well if it's not already running. Keep in mind Docker is required for this to function.\n\nTo separately start or stop the Supabase instance, you can use the following commands:\n\n```bash\nnpm run supabase [start/stop]\n```\n\nOnce you have the Supabase instance running, you can access the admin panel at `http://localhost:54323`. To make your local app direct to it, read out the API URL and anon key and replace the values in your `.env` file. Make sure to include the port for the API URL.\n\nIf you'd like to test locally against production, you can invoke `npm run dev:staging`. Make sure the production credentials are defined in `.env.production`.\n\nDon't forget to reset your local database to the latest migrations after starting the Supabase instance (we have a command for this as it also uploads static content to Supabase storage for local development):\n\n```bash\nnpm run reset\n```\n\nThis will ensure your local database is in sync with the latest migrations and schema changes plus seed it with the initial data.\n\n## Edge Functions\n\nOur edge functions are located in the `supabase/functions` directory. Keep in mind they run on Deno, so you will need to install Deno if you haven't already.\n\nThen, install their dependencies:\n\n```bash\ncd supabase/functions\ndeno install\n```\n\nIf you want to run the edge functions locally, you can do so with the following command:\n\n```bash\nnpm run supabase functions serve\n```\n\nThis will start a local server on `http://localhost:54321` where you can test your edge functions. If you ran `supabase start` before, your edge functions _should_ already be running on that port. If you create new edge functions, you will need to restart the server for them to be available.\n\nAdditionally, this command lets you see console logs from the edge functions. This is useful for debugging and testing your functions locally.\n\nYou can then use cURL or any other HTTP client to test your edge functions. For example, to test the `ping` function, you can run:\n\n```bash\ncurl --request POST 'http://localhost:54321/functions/v1/ping' \\\n--header 'Authorization: Bearer SUPABASE_KEY' \\\n--header 'Content-Type: application/json' \\\n--data '{ \"who\":\"me\" }'\n```\n\nTo format your edge functions, you can use the following command:\n\n```bash\ncd supabase/functions\ndeno fmt\n```\n\nIf you want to push your edge functions to the Supabase project, you can do so with:\n\n```bash\nnpm run supabase functions deploy \u003cfunction_name\u003e\n```\n\n## Production\n\nTo build the application for production:\n\n```bash\n# npm\nnpm run build\n```\n\nLocally preview the production build (keep in mind this will run against `.env`):\n\n```bash\n# npm\nnpm run preview\n```\n\nCheck out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.\n\nMake sure your GitHub pages deployment action has the right variables/secrets defined and matches those in the `.env` file.\n\n## Scheduled Deploys\n\nThe `deploy` GitHub Actions workflow also runs once a week to rebuild and deploy the site. This ensures new dynamic content gets captured in the generated static paths even if no one pushes code that week. If you need to change the cadence, update the `schedule` cron in `.github/workflows/deploy.yml`.\n\n## DB Changes / Migrations\n\n### Local development workflow\n\nStart by resetting your local environment and database to the latest migrations:\n\n```bash\nnpm run reset\n```\n\nIf you need to sync your local files with the current production schema, pull the latest remote migrations:\n\n```bash\nnpm run supabase db pull\n```\n\n### Creating migrations\n\nYou can create migrations via SQL files:\n\n```bash\nnpm run supabase migration new \u003cmigration_name\u003e\n```\n\nEdit the new file in `supabase/migrations`, then apply locally:\n\n```bash\nnpx supabase migrations up\n```\n\nOr make changes in Supabase Studio (`http://localhost:54323`) and generate a migration from the diff:\n\n```bash\nnpm run supabase db diff -f \u003cyour_migration_name\u003e\n```\n\n### Verify locally\n\nMake sure your local database resets cleanly:\n\n```bash\nnpm run reset\n```\n\nThen regenerate types:\n\n```bash\nnpx supabase gen types typescript --local --schema public,private \u003e types/database.types.ts\n```\n\n### Pushing to production\n\nOnly after local validation:\n\n```bash\nnpm run supabase db push\n```\n\n\u003e [!WARNING]\n\u003e `npm run supabase db push` applies migrations to **production**. Treat it as a production release step.\n\u003e Always review your migration SQL and confirm it’s safe before pushing.\n\n## DB Triggers\n\nDue to some triggers relying on tables that are built-in Supabase you will have to create these triggers manually and not through migrations. Please refer to [TRIGGERS.md](TRIGGERS.md) for more information.\n\n## RBAC\n\nHivecom utilizes Supabase's setup for role based access control (RBAC). In their guide, they outline the use of auth hooks to inject JWT tokens with additional metadata so the front-end can correctly show what users have access to.\n\nFor more information, please refer to the [official guide](https://supabase.com/docs/guides/database/postgres/custom-claims-and-role-based-access-control-rbac?queryGroups=language\u0026language=plpgsql).\n\n## Vault Secrets\n\nThe application requires several secrets to be configured in Supabase's Vault for proper operation. These secrets need to be manually added to your Supabase project's vault:\n\n### Required Secrets\n\n- `anon_key` - Supabase publishable (anon) key used by cron jobs for authorization\n- `project_url` - Base URL of your Supabase project\n- `system_cron_secret` - Secret token for authenticating system cron job requests\n- `system_trigger_secret` - Secret token for authenticating database trigger requests\n- `system_discord_notification_webhook_url` - Discord webhook URL for notification messages\n\n### Setting Up Vault Secrets\n\n1. Navigate to your Supabase project dashboard\n2. Go to Settings -\u003e Vault\n3. Add each required secret with its corresponding value\n4. For production deployments, ensure all secrets are properly configured\n\n## cron \u0026 Database Triggers\n\nWe use the `pg_cron` extension to schedule jobs in the database. This is a great way to run periodic tasks without needing an external service.\n\nOur migrations should automatically create the necessary tables and invocation functions as well as the associated `system_cron_secret` Supabase Vault secret. This secret is used as an authorization token when invoking our cron edge functions so as to not allow anything but the database to invoke them.\n\nAdditionally, we use database triggers to automatically invoke edge functions when certain database operations occur (like creating/updating/deleting events for Google Calendar sync). These triggers use the `system_trigger_secret` for authentication.\n\nYour Edge Functions will still need to have the `system_cron_secret` and `system_trigger_secret` secrets added to them. Decrypt the secret from the Supabase Vault and add it to the edge function for these to properly work.\n\nOnce these are set, we have helper functions in `_shared/auth.ts` for validating the system cron secret header. The JWT token is automatically validated by Supabase.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhivecom%2Fhivecom.net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhivecom%2Fhivecom.net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhivecom%2Fhivecom.net/lists"}