{"id":48185692,"url":"https://github.com/zhyd1997/callytics","last_synced_at":"2026-04-04T17:48:45.315Z","repository":{"id":319446440,"uuid":"1075840374","full_name":"zhyd1997/callytics","owner":"zhyd1997","description":"A Simple Analytics Dashboard for Cal.com Users","archived":false,"fork":false,"pushed_at":"2026-04-02T05:04:57.000Z","size":6987,"stargazers_count":0,"open_issues_count":14,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-02T07:23:45.382Z","etag":null,"topics":["hacktoberfest","nextjs","prisma","shadcn-ui","tailwindcss"],"latest_commit_sha":null,"homepage":"https://callytics.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/zhyd1997.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":".github/CODE_OF_CONDUCT.md","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":"zhyd1997","buy_me_a_coffee":"zhyd1997","patreon":null,"open_collective":"softmaple","polar":"softmaple","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2025-10-14T04:10:09.000Z","updated_at":"2026-04-02T05:04:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"b5150632-e07a-4ee0-b510-7cb3ed3925b5","html_url":"https://github.com/zhyd1997/callytics","commit_stats":null,"previous_names":["zhyd1997/callytics"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zhyd1997/callytics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhyd1997%2Fcallytics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhyd1997%2Fcallytics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhyd1997%2Fcallytics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhyd1997%2Fcallytics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhyd1997","download_url":"https://codeload.github.com/zhyd1997/callytics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhyd1997%2Fcallytics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31407654,"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":["hacktoberfest","nextjs","prisma","shadcn-ui","tailwindcss"],"created_at":"2026-04-04T17:48:44.835Z","updated_at":"2026-04-04T17:48:45.294Z","avatar_url":"https://github.com/zhyd1997.png","language":"TypeScript","funding_links":["https://github.com/sponsors/zhyd1997","https://buymeacoffee.com/zhyd1997","https://opencollective.com/softmaple","https://polar.sh/softmaple"],"categories":[],"sub_categories":[],"readme":"![Callytics Logo](./public/logo/callytics-logo-wordmark-dark.png#gh-dark-mode-only)\n![Callytics Logo](./public/logo/callytics-logo-wordmark-light.png#gh-light-mode-only)\n\n# Callytics ✨\n\nLightweight analytics for Cal.com workspaces. Callytics gives teams instant visibility into meetings, event types, and booking trends without maintaining a bespoke reporting stack. 📊\n\n## Features 💡\n- OAuth 2.0 flow for Cal.com accounts with stateful callback handling 🔐\n- Postgres-backed waitlist capture powered by Prisma Accelerate 📨\n- Interactive landing hero styled to mirror Cal.com's product aesthetic and OAuth CTA ⚡️\n- Analytics dashboard refreshed with the Cal.com palette, motion charts, and dark-mode friendly glows 📈\n- Turbopack-enabled Next.js 16 app router with Tailwind CSS v4 styling ⚡️\n\n## Tech Stack 🛠️\n- Next.js 16 (App Router, React 19, Turbopack)\n- Tailwind CSS v4 with custom design tokens\n- Prisma ORM + Accelerate extension targeting PostgreSQL\n- Vercel Analytics snippet for production telemetry 📈\n\n## Prerequisites ✅\n- Node.js 18.18 or newer (Next.js 16 requirement)\n- pnpm 8.x or newer\n- PostgreSQL database for the waitlist table 🐘\n- Cal.com OAuth client credentials for the token exchange flow 🔑\n\n## Quick Start 🚀\n1. Install dependencies: `pnpm install`\n2. Duplicate `.env.example` (or create `.env.local`) and set the required variables listed below\n3. Run database migrations: `pnpm prisma migrate dev`\n4. Start the dev server: `pnpm dev` and visit [http://localhost:3000](http://localhost:3000) 🎯\n\nThe `preinstall` script runs `prisma generate` so the generated client is always in sync. Turbopack handles hot reloading during development.\n\n### Environment Variables 🌱\n| Variable | Required | Description | Default |\n| --- | --- | --- | --- |\n| `DATABASE_URL` | Yes | PostgreSQL connection string used by Prisma | – |\n| `CAL_OAUTH_CLIENT_ID` | Yes | OAuth client ID from your Cal.com developer app | – |\n| `CAL_OAUTH_CLIENT_SECRET` | Yes | OAuth client secret from Cal.com | – |\n| `CAL_OAUTH_REDIRECT_URI` | Optional | Explicit redirect URI to override the auto-detected callback | `http://localhost:3000/api/cal/oauth/callback` |\n| `CAL_OAUTH_TOKEN_ENDPOINT` | Optional | Alternate Cal.com token endpoint (sandbox/self-hosted) | `https://api.cal.com/v2/oauth/token` |\n\nOptional variables only need to be set when you diverge from the default local flow.\n\n### Cal.com OAuth Setup 🤝\n- Register a **Confidential OAuth App** inside the Cal.com developer portal.\n- Configure the redirect URI to `http://localhost:3000/api/cal/oauth/callback` (or your deployed domain).\n- Copy the client ID and secret into your `.env.local`.\n- During the auth redirect the callback verifies the `state` cookie and exchanges the code for access/refresh tokens at `CAL_OAUTH_TOKEN_ENDPOINT`. Tokens are returned to the caller and should be persisted securely (e.g., server-side store).\n\n#### Automatic Token Refresh 🔄\nCallytics automatically refreshes expired Cal.com access tokens:\n- When server actions request an access token, the system checks if it's expired or within 5 minutes of expiry\n- If expired, it automatically calls Cal.com's refresh token endpoint (`POST https://app.cal.com/api/auth/oauth/refreshToken`)\n- The database is updated with new tokens transparently\n- No manual intervention required - your API calls just work!\n\nThe refresh logic is implemented in `lib/auth/refresh-token.ts` and integrated into server actions via `getValidAccessToken(userId)`.\n\n### Database \u0026 Prisma 🗄️\n- Prisma schema lives in `prisma/schema.prisma` and generates the client under `app/generated/prisma`.\n- Migrations are stored in `prisma/migrations`. Apply them with `pnpm prisma migrate dev` for local development or `pnpm prisma migrate deploy` in CI/CD.\n- The waitlist module writes to the `waitlist_entries` table via `lib/dal/waitlist.ts`.\n\n## Available Scripts 🧰\n- `pnpm dev` – start the Next.js dev server with Turbopack\n- `pnpm build` – run Prisma migrations (via `prebuild`) then build for production\n- `pnpm start` – serve the production build\n- `pnpm lint` – execute the repository ESLint configuration\n- `pnpm prisma \u003ccommand\u003e` – forward arbitrary Prisma CLI commands (generate, migrate, studio, etc.)\n\n## Project Structure 🧭\n- `app/` – Next.js route handlers, layouts, API routes, and generated Prisma client\n- `modules/` – UI modules\n- `components/` – shared UI primitives (buttons, cards, theming controls)\n- `lib/` – Prisma client factory, waitlist data access layer, and schemas\n- `prisma/` – schema and migrations for the Postgres database\n- `.agent/` – onboarding docs, Cal.com OpenAPI excerpt, and shared conventions\n\n## Deployment ☁️\n- Optimized for Vercel; environment variables must be defined in the project settings\n- Ensure your production database and Cal.com OAuth redirect URIs match the deployed domain\n- Replace or configure `@vercel/analytics` if you use a different analytics provider\n\n## Useful Links 🔗\n- [Cal.com OAuth 2.0 Docs](https://cal.com/docs/api-reference/v2/oauth-clients/)\n- [Next.js App Router Docs](https://nextjs.org/docs/app)\n- [Prisma Documentation](https://www.prisma.io/docs)\n- [AGENTS.md](./AGENTS.md) – living brief for contributor onboarding\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhyd1997%2Fcallytics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhyd1997%2Fcallytics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhyd1997%2Fcallytics/lists"}