A modern semantic search interface built with Next.js 16, React, and the Moss Web SDK.
This demo showcases how to use @moss-dev/moss-web to interact with Moss from a web application.
- Sub-10ms Retrieval: Experience Moss's industry-leading speed in a browser.
- Client-side Search: Build, load, query and delete a Moss index directly in the browser.
- Glassmorphism UI: A sleek, responsive dark-mode interface.
- Real-time Stats: View retrieval time and match confidence scores.
-
Install Dependencies:
npm install
-
Configure Credentials: Get your credentials from the Moss Portal, then enter your
MOSS_PROJECT_IDandMOSS_PROJECT_KEYin the app UI after it starts. -
Run Development Server:
npm run dev
Open http://localhost:3000 in your browser.
app/page.tsx: The main UI component (Client Side).app/page.test.tsx: UI behavior tests.app/globals.css: Premium styling and glassmorphism definitions.
To add Moss to your own Next.js app:
- Install the SDK:
npm install @moss-dev/moss-web - Instantiate
MossClientin a client component. - Call it from your React components to create, load, and query indexes.