Reference
Component Registry
Install Memcity components via the shadcn-compatible registry with automatic tier-based access control.
What is the Memcity Registry?
The Memcity registry is a shadcn-compatible component distribution system. Instead of installing a compiled npm package, you install source code directly into your project.
| npm Package | Memcity Registry | |
|---|---|---|
| What you get | Compiled JavaScript | TypeScript source code |
| Customization | Override with props/CSS | Edit the source directly |
| Updates | npm update replaces everything | Re-install to get updates, merge manually |
| Ownership | Dependency in node_modules | Code in your project — you own it |
| Bundle size | Includes everything | Only what you install |
Think of it like copying a well-built component from a recipe book into your kitchen — it's yours to modify however you want.
Setup
Step 1: Configure the Registry
Add the Memcity registry to your components.json (create this file at your project root if it doesn't exist):
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "new-york",
"rsc": true,
"tsx": true,
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
},
"registries": {
"@memcity": {
"url": "https://memcity.dev/r/{name}.json",
"headers": {
"X-License-Key": "${MEMCITY_LICENSE_KEY}"
}
}
}
}Step 2: Set Your License Key
If you have a Pro or Team license, add your key to .env.local:
# .env.local
MEMCITY_LICENSE_KEY=MEMCITY_PRO_xxxx-xxxx-xxxx-xxxxCommunity components don't need a license key.
Step 3: Install a Component
npx shadcn@latest add @memcity/memory-searchThis downloads source files into your project, installs dependencies, and scaffolds Convex files under convex/memcity/.
Memcity registry installs now also scaffold Convex files:
convex/memcity/*for installed blocksconvex/memory.tswith a defaultMemoryclientconvex/memcity/convex.config.snippet.tswith theapp.use(memcity)snippet
Note: shadcn registry does not reliably auto-patch an existing
convex/convex.config.ts. Merge the snippet into your current file.
Available Components
memory-search (Community — Free)
A drop-in search interface with a search input, results list, and relevance scoring.
npx shadcn@latest add @memcity/memory-searchWhat you get:
MemorySearch— Full search UI componentSearchInput— Styled search input with keyboard shortcutsSearchResults— Results list with relevance scores and snippetsuseMemorySearch— React hook for search state management
Usage:
import { MemorySearch } from "@/convex/memcity/memory-search";
function DocsPage() {
return (
<MemorySearch
knowledgeBaseId="kb_xyz"
placeholder="Search documentation..."
maxResults={10}
/>
);
}rag-pipeline (Pro — $79)
A visualization of the full 16-step RAG pipeline with real-time step indicators.
npx shadcn@latest add @memcity/rag-pipelineWhat you get:
RagPipeline— Pipeline visualization componentPipelineStep— Individual step indicator with timingPipelineResults— Results display with confidence bars- Step-by-step animation showing which parts of the pipeline are active
knowledge-graph (Pro — $79)
An interactive graph viewer showing entities and relationships.
npx shadcn@latest add @memcity/knowledge-graphWhat you get:
KnowledgeGraph— Interactive force-directed graph visualizationEntityCard— Entity detail popupRelationshipLine— Styled relationship connectors- Pan, zoom, and click-to-explore interactions
file-uploader (Pro — $79)
Drag-and-drop multi-file upload with processing progress.
npx shadcn@latest add @memcity/file-uploaderWhat you get:
FileUploader— Drag-and-drop upload zoneFileProgress— Per-file processing progress barFileList— List of uploaded/processed files- Automatic file type detection and validation
admin-dashboard (Team — $179)
A complete admin panel for managing ACLs, viewing audit logs, and monitoring quotas.
npx shadcn@latest add @memcity/admin-dashboardWhat you get:
AclManager— Set and view document permissionsAuditLogViewer— Filterable audit log tableQuotaMonitor— Usage bars and quota managementOrgSwitcher— Multi-organization navigation
Authentication Flow
When you run npx shadcn add @memcity/rag-pipeline, here's what happens:
- shadcn reads your
components.jsonregistry configuration - It makes a GET request to
https://memcity.dev/r/rag-pipeline.json - Your
MEMCITY_LICENSE_KEYis sent in theX-License-Keyheader - The Memcity server validates your key and checks your tier
- If valid and your tier has access, the component JSON is returned
- shadcn installs the files into your project
What happens with an invalid key:
Error: 401 Unauthorized
Set MEMCITY_LICENSE_KEY in your .env.local.
Get one at https://memcity.dev/#pricingWhat happens with wrong tier:
Error: 403 Forbidden
'rag-pipeline' requires a Pro license.
Upgrade at https://memcity.dev/#pricingDirect URL Install
You can install community components without configuring the registry:
npx shadcn@latest add https://memcity.dev/r/memory-search.jsonThis works for community (free) components only. Pro/Team components require the registry configuration to pass your license key.
Customizing Installed Components
Since you get source code, you can modify anything:
Styling
Components use Tailwind CSS classes. Change colors, spacing, borders — whatever you want:
// Before (Memcity default)
<div className="border-2 border-dashed border-[#1a1a1a]/20">
// After (your brand)
<div className="border rounded-lg border-blue-200 shadow-sm">Behavior
Add features, remove features, change the search flow:
// Add a "Copy" button to each result
function SearchResult({ result }) {
return (
<div>
<p>{result.text}</p>
<button onClick={() => navigator.clipboard.writeText(result.text)}>
Copy
</button>
</div>
);
}Getting Updates
When Memcity releases a new version of a component, you can re-install to get the update:
npx shadcn@latest add @memcity/memory-searchThis overwrites the files. If you've made customizations, you'll need to merge them manually. We recommend committing your changes before re-installing so you can use git diff to merge.
Troubleshooting
| Problem | Fix |
|---|---|
Cannot find registry "@memcity" | Add the registry to components.json |
401 Unauthorized | Set MEMCITY_LICENSE_KEY in .env.local |
403 Forbidden | Your tier doesn't have access — check the component's tier requirement |
Network error | Check your internet connection; the registry is at memcity.dev |
| Component doesn't render | Make sure you've imported it correctly and have the required Convex setup |
| Type errors after install | Run npx convex dev to regenerate types, then restart your TS server |