pgx
PGX — Lightweight Postgres for AI agents. Written in Rust. Thousands of isolated databases in one runtime. 🐘
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證private analytics platform for tracking sports betting cappers
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
Private analytics platform for tracking the sports betting cappers you follow.
• Full Prisma schema (prisma/schema.prisma): Users, Subscriptions, Sports,
Leagues, Cappers, Picks — normalized, indexed for per-user queries.
• Seed script for reference data (sports/leagues only — user data is never
seeded, since it's private).檢視完整 README ↗Private analytics platform for tracking the sports betting cappers you follow.
prisma/schema.prisma): Users, Subscriptions, Sports,
Leagues, Cappers, Picks — normalized, indexed for per-user queries.@supabase/ssr - the app's own users table is populated
directly on first sign-in, matched by email if the row already exists.server/auth.ts + server/data/* layer — every database query goes
through here, always scoped by userId, so no view can accidentally leak
another user's data.Install dependencies
npm install
Set up Supabase
Create a free project at supabase.com (or reuse
an existing one) - copy its Postgres connection string for
DATABASE_URL/DIRECT_URL, and its Project URL + anon key from
Settings > API.
Set up sign-in providers in the Supabase dashboard
Under Authentication > Providers: enable Google (paste your Client
ID/Secret from
Google Cloud Console,
and add Supabase's callback URL -
https://<project-ref>.supabase.co/auth/v1/callback - as an authorized
redirect URI there), and confirm Email is enabled. Under
Authentication > URL Configuration, add http://localhost:3000/** and
your production domain to the allowed redirect URLs.
Configure environment variables
cp .env.example .env
Fill in DATABASE_URL and the two NEXT_PUBLIC_SUPABASE_* values.
Run migrations and seed reference data
npx prisma migrate dev --name init
npm run prisma:seed
Run the dev server
npm run dev
Visit http://localhost:3000, sign in, and you'll land on an empty
dashboard — ready for Milestone 3 (the actual Capper + Pick creation UI).
Verifying a UI change shouldn't require a real Supabase sign-in every time,
so next dev supports an opt-in bypass:
echo "DEV_AUTH_BYPASS=true" >> .env.local
npm run dev
Visiting any page now logs you in automatically as a dedicated local-only
account ([email protected], an address on the .test TLD, which
RFC 2606 reserves so it can never
be a real, reachable address) - a completely ordinary FREE-plan User row,
created the first time it's needed via the same upsertUserFromSupabase()
path a real first sign-in uses, so every page behaves exactly as it would
for a genuine account (starts with zero cappers/picks, same as any new
sign-up). It's entirely separate from your real account and from
production data - nothing here ever touches Supabase Auth or writes to a
deployed database.
If you reset your local database (npx prisma migrate reset or similar),
nothing extra is needed - the bypass account is just a normal row and gets
recreated automatically the next time you load a page.
Why this is inert everywhere except your own local dev server: it
requires NODE_ENV=development, which only next dev sets - any built and
deployed app (next build + next start, what Vercel always runs for both
preview and production) has NODE_ENV=production regardless of what env
vars are set, so there's no configuration that turns this on outside
next dev. .env.local is also gitignored, so the flag itself never leaves
your machine.
Push to a GitHub repo and import it in Vercel — it will build automatically.
Add the same NEXT_PUBLIC_SUPABASE_URL/NEXT_PUBLIC_SUPABASE_ANON_KEY
environment variables in the Vercel project settings, and add your
production domain to Supabase's allowed redirect URLs.
The production build command runs prisma migrate deploy before next build
(via scripts/deploy-migrate.mjs), so any committed migration is applied to
the production database as part of the same deploy that ships the code needing
it. The step is production-only — it keys off VERCEL_ENV and no-ops for
preview builds (which have no DATABASE_URL) and for local npm run build. A
failed migration aborts the build on purpose: shipping code that expects a
column the database doesn't have is worse than a blocked deploy.
This means a schema change only needs its migration committed alongside the
code — do not apply it to production by hand. (Authoring is still local:
npx prisma migrate dev --name <change>.)
server/data/cappers.ts)PickStatus flowcomputeStats()