尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證RAG chatbot for a youth sports association's rulebooks and policies. Built for OYSA; MIT-licensed, fork-friendly. Next.js + Pinecone + Claude.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗A retrieval-augmented chatbot that answers members' questions from an organization's own documents: rulebooks, policies, and web pages. Members use it through a chat widget embedded in the organization's website. Administrators manage the documents through a web admin page; no command line is needed after setup.
It was built for the Oregon Youth Soccer Association (OYSA), where it runs at footy.oregonyouthsoccer.org as "Footy," a Sasquatch mascot. The code is MIT-licensed and you are welcome to fork it for your own organization. The OYSA branding is not licensed; see Rebranding a fork.
<iframe>. Multi-turn conversation, answers cite their source documents, and users can rate answers thumbs-up/down with an optional comment./admin):
.docx) files, add up to 10 web page URLs at a time, refresh a web page, delete a source, and see how often each source has been cited.your-org.example
└── <iframe src="https://chat.your-org.example">
└── Next.js app on Vercel
├── / public chat UI
├── /admin admin UI (emailed-code sign-in)
└── /api/* serverless routes
├── OpenAI text-embedding-3-small embeddings
├── Pinecone serverless vector search
├── Anthropic Claude answer generation
├── Neon Postgres admins, sources, chat log, audit
└── Resend sign-in code email
Ingest. Text is extracted from the file or web page, split into ~400-token chunks with 50-token overlap, embedded, and stored in Pinecone. The source is registered in Neon.
Chat. The latest question is embedded and the 5 closest chunks are retrieved. Those chunks and the full conversation go to Claude, which answers using only that context. The reply and the documents it drew on are returned to the widget and logged.
| Service | Used for |
|---|---|
| Vercel | Hosting |
| OpenAI | Embeddings only |
| Anthropic | Answer generation (the main per-use cost) |
| Pinecone | Vector database |
| Neon | Postgres |
| Resend | Sign-in code email |
All are required for a working deployment; free tiers are enough for a small organization except OpenAI and Anthropic, which bill per use. Chat runs without Neon, but nobody can sign in to add documents.
DEPLOY.md walks through setup end to end: accounts, database, local run, Vercel deployment, embedding the widget, and troubleshooting.
Reference:
End users are anonymous. The chat page generates a session ID in browser memory when it loads; it is not stored in a cookie or browser storage and resets on refresh.
Every chat turn is stored in your Neon database: the question, the answer, the documents cited, the session ID, response time, and any rating and comment. IP addresses are not stored. There is no switch to turn chat logging off. Questions are also sent to OpenAI (to embed the question) and Anthropic (to generate the answer), and are subject to their data policies.
For administrators, the database stores email, name, phone number, sign-in times, and the audit trail of their source changes.
The chat page links to a privacy policy at /privacy (app/privacy/page.tsx). It is written for OYSA; rewrite it for your organization, including the effective date. The contact address comes from the PRIVACY_CONTACT_EMAIL env var.
/api/chat and /api/rate are public by design, and every chat call costs OpenAI and Anthropic credit. Add a rate limit (for example a Vercel Firewall rule) before linking the widget from a public page.ADMIN_ALLOWLIST. The URL ingest feature fetches any URL an admin enters, so keep the allowlist tight.next.config.ts.npm install
npm run dev # http://localhost:3000 and /admin
npm run lint
npm run build
npm run smoke # checks OpenAI, Pinecone, and Anthropic credentials
Scripts read .env.local. Without Resend configured, sign-in codes are printed to the dev server log.
app/
page.tsx chat widget
admin/page.tsx, AdminLogin.tsx admin UI and sign-in screens
api/chat, api/rate public chat and rating
api/ingest, api/ingest/url file and URL ingest (admin)
api/admin/... documents, log, audit, auth, profile (admin)
privacy/page.tsx privacy policy linked from the chat footer
lib/
prompt.ts system prompt and bot persona
clients.ts OpenAI, Anthropic, Pinecone clients and index
embed.ts embeddings
chunk.ts token chunking
extract.ts PDF, DOCX, and HTML text extraction
ingest-url.ts URL ingest pipeline
db.ts Neon queries
auth.ts sign-in codes, sessions, allowlist, requireAdmin()
audit.ts source audit helper
email.ts Resend email
scripts/
create-index.mjs create the Pinecone index
migrate-admin-auth.mjs create admin and audit tables
sync-sources.mjs rebuild the Neon sources table from Pinecone
smoke-*.mjs credential checks
Branding is plain strings and image files; there is no configuration layer.
| File | What to change |
|---|---|
lib/prompt.ts | Persona, tone, and the "contact OYSA" fallback |
app/page.tsx | Heading, mascot image and alt text, greeting, input placeholder, footer disclaimer |
app/admin/page.tsx, app/admin/AdminLogin.tsx | "OYSA Document Admin" heading; CSV download filenames in page.tsx |
app/api/admin/log/route.ts, app/api/admin/audit/route.ts | CSV download filenames |
app/privacy/page.tsx | Whole policy: organization, domain, date, data practices (contact address is the PRIVACY_CONTACT_EMAIL env var) |
app/layout.tsx | Page title and description |
lib/email.ts | "Ask Footy" in the sign-in email subject and body |
lib/extract.ts | OYSABot/1.0 user agent for URL ingest |
next.config.ts | frame-ancestors: the sites allowed to embed the widget |
lib/clients.ts, lib/pinecone-readiness.ts, scripts/*.mjs | The "oysa-docs" fallback index name |
app/icon.png, app/favicon.ico, public/footy.png | OYSA shield logo and mascot image |
Searching for OYSA, oysa, Oregon, and Footy finds all of them.
The OYSA name and shield logo belong to the Oregon Youth Soccer Association. The Footy mascot image and persona are also not covered by the license. Replace all of them in a fork.
MIT. Copyright (c) 2026 William Kayser. The license covers the code only, not the OYSA or Footy branding.