Thank you for your interest in contributing to Convo! This guide will help you get started with contributing to our codebase.
Convo is a Next.js application built by the Kernel Community that helps plant the kernel of conversations. It uses modern web technologies and follows a server-first approach with feature flags for gradual rollouts.
- Framework: Next.js 14 with App Router
- Authentication: Dynamic Labs
- Database: PostgreSQL with Prisma ORM
- Styling: Tailwind CSS
- State Management: React Query
- Feature Flags: Vercel Flags
- Real-time: PartyKit
- UI Components: Radix UI
- Type Safety: TypeScript
- Fork and clone the repository
- Install dependencies:
npm install
- Set up your environment variables (copy
.env.exampleto.env.local) - Start the development server:
npm run dev
We use Prisma with PgBouncer for connection pooling. Important configuration:
DATABASE_DATABASE_URL="postgresql://user:pass@host:6543/db?pgbouncer=true&connection_limit=1&pool_timeout=20&statement_cache_size=0"
DIRECT_URL="postgresql://user:pass@host:5432/db"After making schema changes:
npm run data # Format, generate, and push schema
npm run data-reset # Reset database (caution!)/src/app- Next.js app router pages and API routes/src/components- Reusable React components/src/lib- Core utilities and business logic/src/context- React context providers/src/utils- Helper functions and utilities
We use feature flags for gradual rollouts:
- Beta features are enabled for
@kernel.communityemails - Flags are evaluated server-side
- Define new flags in
/src/lib/flags.ts
- User authenticates with Dynamic Labs SDK
- JWT token is verified server-side
- Session cookie is set with user info
- Feature flags use session data for targeting
- Use TypeScript for all new code
- Define interfaces for component props
- Use Zod for API request/response validation
- Use Tailwind CSS for styling
- Follow the existing class order convention
- Use the shadcn/ui component patterns
-
Linting:
npm run lint
-
Formatting:
npm run format # Check formatting npm run format:fix # Fix formatting
We use a structured commit message format to automatically generate our changelog. Each commit message should have a type, a description, and optionally a detailed body.
feat:- A new feature or significant enhancementfix:- A bug fiximprove:- Improvements to existing featuresbeta:- Experimental features or changeschore:- Changes to the build process or infrastructure
`type`(`scope`): `description`
`body`
# Feature with details
feat(user-profile): Add user profile page
- Added profile information section
- Implemented avatar upload
- Added settings panel
- Connected to user API
# Simple fix
fix(user-profile): Correct button alignment on mobile
# Improvement with context
improve(search): Enhance search performance
- Added debouncing to search input
- Implemented result caching
- Optimized API queries
# Beta feature
beta(chat): Test new chat interface
- Experimental UI layout
- Real-time message preview
- New emoji pickerThese commit messages will automatically appear in our changelog page with appropriate categorization and formatting.
- Create a feature branch from
main - Naming convention:
your-identifier/your-feature-name - Make your changes following the guidelines
- Ensure your commits follow the convention above
- Run tests and formatting checks
- Add as much information in your PR as possible with screenshots for both mobile and desktop
- Create a PR against
main - Wait for review and address feedback
- Screenshots included
- Feature flag added (if required)
- vercel checks pass (build successful)
- Commit messages are clear
main- Production branch- Feature branches from
main
- Never commit sensitive data or API keys
- Use environment variables for secrets
- JWT tokens are verified server-side
- Session cookies are HTTP-only
We follow the Kernel Community Code of Conduct. Please be respectful and constructive in all interactions.
- Use GitHub Issues for bug reports
- Include clear reproduction steps
- Mention relevant feature flags
- Add
betalabel if related to beta features
Reach out on X: @probablyangg or Telegram: @probablyangg