Thank you for your interest in contributing to supermemory! We welcome contributions from developers of all skill levels. This guide will help you get started with contributing to our AI-powered memory layer API.
Before you begin, ensure you have the following installed:
- Bun (>= 1.2.17) - Our preferred package manager
- Git for version control
-
Fork and Clone the Repository
git clone https://github.com/supermemoryai/supermemory.git cd supermemory -
Install Dependencies
bun install
-
Set Up Environment Variables
# Copy the example environment file cp .env.example .env.local # Edit the file with your configuration # You'll need to add your API keys and database URLs
-
Change proxy for local development
Add this in your
proxy.ts(apps/web) before retrieving the cookie (getSessionCookie(request)):if (url.hostname === "localhost") { return NextResponse.next(); }
-
Start the Development Server
bun run dev
This will start all applications in the monorepo. The web app will be available at
http://localhost:3000.
supermemory is organized as a monorepo using Turbo:
supermemory/
├── apps/
│ ├── web/ # Next.js web application
│ ├── browser-extension/ # Browser extension (WXT-based)
│ ├── docs/ # Documentation site
│ └── raycast-extension/ # Raycast extension
├── packages/
│ ├── ui/ # Shared UI components
│ ├── lib/ # Shared utilities and logic
│ ├── hooks/ # Shared React hooks
│ ├── validation/ # Zod schemas and validation
│ ├── ai-sdk/ # AI SDK for memory operations
│ ├── tools/ # Development tools and utilities
│ ├── openai-sdk-python/ # Python SDK for OpenAI integration
│ ├── openai-sdk-ts/ # TypeScript SDK for OpenAI integration
│ ├── eslint-config/ # ESLint configurations
│ └── typescript-config/ # TypeScript configurations
├── turbo.json # Turbo configuration
├── biome.json # Biome configuration
└── package.json # Root package configuration
bun run dev- Start development servers for all appsbun run build- Build all applicationsbun run format-lint- Format and lint code using Biomebun run check-types- Type check all packages
We use several tools to maintain code quality:
- Biome for linting and formatting
- TypeScript for type safety
- Turbo for build optimization
Before submitting a PR, ensure your code passes all checks:
bun run format-lint
bun run check-types
bun run build- Frontend: Next.js 15, React 19, TypeScript
- Styling: Tailwind CSS, Radix UI components
- State Management: Zustand, TanStack Query
- Build Tool: Turbo (monorepo)
- Package Manager: Bun
- Deployment: Cloudflare (OpenNext.js)
We welcome various types of contributions:
- 🐛 Bug fixes
- ✨ New features
- 🎨 UI/UX enhancements
- ⚡ Performance optimizations
- Check our Issues page
- Look for issues labeled
good first issuefor beginners - Issues labeled
help wantedare great for contributors - Feel free to propose new features by opening an issue first
-
Create a Branch
git checkout -b feature/your-feature-name # or git checkout -b fix/your-bug-fix -
Make Your Changes
- Follow our coding standards (see below)
- Write clear, concise commit messages
- Add tests if applicable
- Update documentation if needed
-
Test Your Changes
bun run dev # Test locally bun run build # Ensure it builds bun run format-lint # Check formatting bun run check-types # Check types
- Use TypeScript for all new code
- Follow the existing code style and patterns
- Write self-documenting code with clear variable names
- Add JSDoc comments for complex functions
- Keep functions small and focused
- Use functional components with hooks
- Prefer composition over inheritance
- Extract reusable logic into custom hooks
- Use proper TypeScript types for props
- Use
kebab-casefor file names - Use
PascalCasefor component files - Use
camelCasefor utility functions
// 1. React and Next.js imports
import React from 'react';
import { NextPage } from 'next';
// 2. Third-party libraries
import { clsx } from 'clsx';
import { motion } from 'motion';
// 3. Internal packages
import { Button } from '@repo/ui';
import { useAuth } from '@repo/lib';
// 4. Relative imports
import { Header } from './header';
import { Footer } from './footer';- Ensure your branch is up to date with
main - Run all quality checks
- Test your changes thoroughly
- Update documentation if needed
-
Title: Use a clear, descriptive title
- ✅
feat: add semantic search to memory graph - ✅
fix: resolve authentication redirect loop - ❌
update stuff
- ✅
-
Description: Include:
- What changes you made and why
- Screenshots for UI changes
- Any breaking changes
- Related issue numbers
-
Size: Keep PRs focused and reasonably sized
- Prefer multiple small PRs over one large PR
- Each PR should address a single concern
- All PRs require at least one review
- Address feedback promptly and professionally
- Be open to suggestions and improvements
- Maintain a collaborative attitude
When reporting bugs, please include:
- Environment: OS, Node.js version, browser
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- Screenshots if applicable
- Error messages or console logs
For feature requests, please provide:
- Problem statement: What problem does this solve?
- Proposed solution: How should it work?
- Alternatives considered: Other approaches you've thought of
- Additional context: Any relevant information
- Use Zustand for global state
- Use TanStack Query for server state
- Keep state as local as possible
- Use proper TypeScript types for state
- Use the existing API client patterns
- Handle loading and error states properly
- Implement proper error boundaries
- Use optimistic updates where appropriate
- Use React.memo() for expensive components
- Implement proper loading states
- Optimize images and assets
- Use code splitting where beneficial
- Be respectful and inclusive
- Welcome newcomers and help them learn
- Focus on constructive feedback
- Maintain professionalism in all interactions
- Discord: Join our Discord server
- GitHub Discussions: For questions and ideas
- Issues: For bug reports and feature requests
- Email: support@supermemory.ai
By contributing to supermemory, you agree that your contributions will be licensed under the same license as the project.
All contributors will be recognized in our README and release notes. We appreciate every contribution, no matter how small!
Thank you for contributing to supermemory! Together, we're building the future of AI-powered knowledge management. 🚀