Oracle3
Oracle3: 예측시장 거래 엔진·MCP 서버
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
Stripe revenue leak detection and monitoring for small SaaS teams.
Corvidet connects to a Stripe account, syncs subscription data, calculates core revenue metrics, detects a small set of concrete revenue leak patterns, and exposes that data through authenticated API routes and a Next.js dashboard. This branch is a serious MVP foundation, not a finished production system.README 전문 보기 ↗Stripe revenue leak detection and monitoring for small SaaS teams.
Corvidet connects to a Stripe account, syncs subscription data, calculates core revenue metrics, detects a small set of concrete revenue leak patterns, and exposes that data through authenticated API routes and a Next.js dashboard. This branch is a serious MVP foundation, not a finished production system.
The repository is beyond scaffold stage: authentication, Stripe Connect, sync, metrics snapshots, leak detection, alerts, and insights are implemented in the current branch. At the same time, several route groups and dashboard areas are still placeholders or partial integrations.
Use this README as a branch-accurate status document, not a product promise.
/api/sync-stripe-sessionANTHROPIC_API_KEY is configuredCorvidet is positioned as a revenue operations layer for founders using Stripe as their source of truth. The current MVP is strongest at:
It is not yet a full revenue intelligence platform with mature forecasting, fully automated notifications, or comprehensive recovery operations.
| Layer | Technology |
|---|---|
| App | Next.js 16 App Router, TypeScript, React 19 |
| Styling | Tailwind CSS 4 |
| Auth + Database | Supabase (Auth, Postgres, RLS) |
| Payments + Source Data | Stripe + Stripe Connect OAuth |
| AI | Anthropic API |
| Resend |
stripe_connections./api/sync-stripe-session uses the stored Stripe connection to pull live Stripe data.metrics_snapshots, refreshes revenue_leaks, and generates simple revenue_signals./api/metrics, /api/alerts, and /api/insights expose derived data for the dashboard or other clients.src/
├── app/
│ ├── api/ # Route handlers
│ ├── auth/callback/ # Supabase auth callback
│ ├── dashboard/ # Protected UI
│ ├── login/ # Auth entry page
│ └── page.tsx # Marketing landing page
├── lib/
│ ├── supabase/ # Browser/server/middleware clients
│ ├── encryption.ts # AES-256-GCM helpers
│ ├── stripe-metrics.ts # Stripe -> metrics snapshot logic
│ ├── revenue-leaks.ts # Leak detection logic
│ ├── revenue-signals.ts # MVP signal generation
│ ├── alerts.ts # Alert shaping
│ ├── insights.ts # Insights shaping
│ ├── server-clients.ts # Stripe + Supabase admin clients
│ └── server-error.ts # Standard API error responses
├── proxy.ts # Session refresh / auth guard entrypoint
└── supabase/migrations/ # Database schema
The main operational heartbeat is /api/sync-stripe-session. It:
last_sync_atThe repo currently calculates and stores:
These values are derived in src/lib/stripe-metrics.ts and persisted to metrics_snapshots.
Current leak detection is intentionally narrow and explainable. It detects:
Leak logic lives in src/lib/revenue-leaks.ts.
The current branch includes:
/api/alerts for an authenticated, normalized alert feed backed by leaks and signals/api/insights for a grounded summary of recoverable revenue, top risks, trend summary, and recommended actionsThese routes are MVP-honest and derived from persisted metrics, leaks, and signals rather than opaque analytics.
npm install
.env.localUse the variables below as a starting point. Features that depend on optional providers can remain disabled if their keys are omitted.
# Supabase
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_KEY=
# Stripe
STRIPE_SECRET_KEY=
STRIPE_CLIENT_ID=
STRIPE_CONNECT_REDIRECT_URI=http://localhost:3000/api/stripe/connect
STRIPE_WEBHOOK_SECRET=
STRIPE_BILLING_WEBHOOK_SECRET=
STRIPE_GROWTH_PRICE_ID=
STRIPE_BUSINESS_PRICE_ID=
# AI
ANTHROPIC_API_KEY=
# Email
RESEND_API_KEY=
RESEND_FROM_EMAIL=
# Security / ops
ENCRYPTION_KEY=
CRON_SECRET=
# App
NEXT_PUBLIC_APP_URL=http://localhost:3000
Notes:
ENCRYPTION_KEY must be 64 hex characters.ANTHROPIC_API_KEY is missing, AI routes will not work.Example key generation:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
http://localhost:3000/auth/callbacksupabase/migrations/ (see Database migrations below).http://localhost:3000/api/stripe/connectnpm run dev
Open http://localhost:3000.
npm run dev
npm run build
npm run lint
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_KEYSTRIPE_SECRET_KEYSTRIPE_CLIENT_IDSTRIPE_CONNECT_REDIRECT_URIENCRYPTION_KEYNEXT_PUBLIC_APP_URLSTRIPE_WEBHOOK_SECRET: Stripe Connect webhook verificationSTRIPE_BILLING_WEBHOOK_SECRET: Stripe billing webhook verificationSTRIPE_GROWTH_PRICE_ID: checkout for the Growth planSTRIPE_BUSINESS_PRICE_ID: checkout for the Business planANTHROPIC_API_KEY: AI analyze / copilot routesRESEND_API_KEY: email sending helpersRESEND_FROM_EMAIL: custom sender addressCRON_SECRET: authenticated cron endpointsThis repo contains a mix of implemented routes and placeholder routes.
api/stripe/connectapi/stripe/syncapi/sync-stripe-sessionapi/metricsapi/leaks/actionsapi/leaks/connectionsapi/leaks/run-scanapi/alertsapi/insightsapi/churn/analyzeapi/user/connection-statusapi/create-checkoutapi/create-portalapi/ai/analyzeapi/ai/copilotapi/healthapi/cron/sync-allapi/cron/*api/recoveries/*api/leaks/notificationsapi/leaks/email-reportapi/leaks/streamapi/churn/interveneapi/scenarios/createapi/benchmarks/*api/usage/currentapi/user/profileapi/admin/data-modeThe route tree is broader than the truly finished feature set. Read the implementation before assuming a route group is production-ready.
Key tables in the shipped schema:
| Table | Purpose |
|---|---|
user_profiles | Profile, plan tier, Stripe billing customer mapping |
stripe_connections | Connected Stripe accounts and encrypted OAuth tokens |
metrics_snapshots | Daily revenue metrics per connection |
revenue_leaks | Detected leak records with severity and recoverable revenue |
revenue_signals | Lightweight persisted signals / alerts |
recovery_events | Intended recovery event log, currently not fully aligned with all route usage |
usage_events | Product and operational event logging |
All tables use Supabase Row Level Security. The service-role client is used only in trusted server contexts such as sync, billing, and webhook flows.
The repo uses the Supabase CLI to manage schema as versioned SQL files under supabase/migrations/. The CLI is invoked via npx, no global install needed.
Migrations use a sequential prefix, not the CLI's default <timestamp>_ format. Existing files:
supabase/migrations/001_initial_schema.sql
supabase/migrations/002_update_plan_tiers.sql
supabase/migrations/003_monthly_reports.sql
supabase/migrations/004_audit_requests.sql
New migrations continue the sequence: 005_, 006_, etc. Use a short, lowercase, snake_case name describing the change (e.g. 005_rls.sql, 006_quota_function.sql).
Do not run
supabase db pullagainst the linked project — it would emit a<timestamp>_remote_schema.sqlfile that duplicates the schema already captured in the sequential files.
# Authenticate the CLI with your Supabase account (interactive, opens browser)
npx supabase login
# Link the local repo to the remote project (writes project ref into supabase/config.toml)
npx supabase link --project-ref <YOUR_PROJECT_REF>
# Diff local migrations against the linked remote schema
npx supabase db diff
# Lint migrations locally before opening a PR (CI runs the same check)
npx supabase db lint --level error
# Apply pending local migrations to the linked remote project
npx supabase db push
supabase/migrations/<NNN>_<short_name>.sql with the next sequential number.create table if not exists, create index if not exists, etc.).npx supabase db lint --level error locally — fix any issues before pushing..github/workflows/db.yml) re-runs the lint against your branch.npx supabase db push to apply the migration to the linked Supabase project.If you run a local Supabase instance (npx supabase start), you can reapply all migrations from scratch with:
npx supabase db reset
This drops the local database, replays every migration in order, and runs supabase/seed.sql.
src/app/api and src/lib over relying on historical docs.What this branch is today:
What it is not yet: