尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Frontend with vector-based similarity search for finding courses and events.
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗A web application that uses vector-based similarity search to find courses and events that best match a user's provided description. This application uses Next.js, MongoDB Atlas, LangChain, and OpenAI embeddings.
This is a Next.js project bootstrapped with create-next-app.
Copy the env.sample file to .env.local and fill in your MongoDB Atlas connection string and OpenAI API key:
cp env.sample .env.local
Then edit .env.local with your actual credentials:
MONGODB_URI=mongodb+srv://<username>:<password>@<cluster>.mongodb.net/<database>?retryWrites=true&w=majority
OPENAI_API_KEY=your_openai_api_key_here
EVENT_VECTOR_SEARCH_INDEX_NAME=event_vector_index
COURSE_VECTOR_SEARCH_INDEX_NAME=course_vector_index
Create a MongoDB Atlas cluster if you don't have one already
Create a database with the following collections:
events and event_embeddings for event datacourses for course data (includes embedded vectors)Set up vector search indexes with the following configurations:
For Events:
event_vector_index (or whatever you specified in EVENT_VECTOR_SEARCH_INDEX_NAME)event_embeddingsembeddingFor Courses:
course_vector_index (or whatever you specified in COURSE_VECTOR_SEARCH_INDEX_NAME)coursesembeddingInstall the dependencies:
npm install
To populate the database with sample content and generate embeddings:
For Events:
npx ts-node src/scripts/seed-events.ts
For Courses:
npx ts-node src/scripts/seed-courses.ts
To test without touching production, run a local MongoDB with Atlas Vector Search in Docker (docker-compose-local.yml, uses the mongodb/mongodb-atlas-local image).
First, point .env.local at the local database (not your Atlas/production URI):
MONGODB_URI=mongodb://localhost:27018/event-matcher?directConnection=true
Then:
npm run db:up # start the local database (host port 27018, override with MONGODB_LOCAL_PORT)
npm run db:init # create collections and vector search indexes (first time only)
npm run seed # seed local data
npm run db:down # stop (data persists); `npm run db:reset` also deletes the data
The seed scripts delete existing data, so they refuse to run unless MONGODB_URI points to a local host. Set ALLOW_REMOTE_DB=true to override this deliberately.
npm run dev
Open http://localhost:3000 with your browser to see the application.