Repository navigation
feat: self-hosting, stats API, Next.js package, docs and README (Phases 6, 8, 9) - #9
Merged
Merged
Conversation
Adds a Dockerfile and docker-compose.yml for simple mode, a read-only stats API with per-project tokens, @copper-analytics/next, a public /docs page, docs/SELF_HOSTING.md and the launch README. Claude-Session: https://claude.ai/code/session_01X2rqistoob3eewaQAJVwr3
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
It takes about 6 s on a hosted runner and failed main at vitest's 5 s default. Claude-Session: https://claude.ai/code/session_01X2rqistoob3eewaQAJVwr3
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The public-repo parts of Phase 6 (self-host mode and integrations), Phase 8 (Google sign-in) and Phase 9 (README and docs).
Scope
Dockerfile,docker-compose.yml,scripts/start.sh: migrate, optionally seed, serve.docs/SELF_HOSTING.mdcovers both modes, a Deploy to Vercel button, Next.js, Astro and plain HTML snippets, and the proxy recipe.GET /api/v1/stats?site=&range=with per-project bearer tokens (rotateApiToken; only the SHA-256 is stored).packages/next:@copper-analytics/nextwith<CopperAnalytics siteKey host api dev />./docsin the web app, linked from the header.GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET.Verification
pnpm verifypasses.docker compose upitself was not run. In its place, a fresh clone ran the container's exact steps (HUSKY=0 pnpm install --frozen-lockfile,pnpm turbo run build --filter=@copper/web,sh scripts/start.shwithCOPPER_SEED=1) against an empty Postgres: serving after 18 s on a warm package store, with 5 seeded projects visible after signing in as the demo account.200with 7 daily points forrange=7d;401for a wrong token, for another project's site key and for an unknown site;400for a bad range; after replacing the token the old one returned401and the new one200.POST /api/auth/sign-in/socialreturnedhttps://accounts.google.com/o/oauth2/v2/authwith the callback/api/auth/callback/google. The round trip needs real credentials and a person.https://claude.ai/code/session_01X2rqistoob3eewaQAJVwr3