Skip to content

Latest commit

 

History

History
115 lines (82 loc) · 2.35 KB

File metadata and controls

115 lines (82 loc) · 2.35 KB

Contributing to StreamMind AI

Thank you for your interest in contributing to StreamMind AI! This guide will help you get started.


Development Setup

Prerequisites

  • Node.js ≥ 18
  • pnpm ≥ 8
  • Git

Getting Started

# Fork and clone
git clone https://github.com/YOUR_USERNAME/streammind-ai.git
cd streammind-ai

# Install dependencies
pnpm install

# Copy environment config
cp .env.example .env
# Fill in your TMDB_API_KEY

# Build all packages
pnpm build

# Start development
pnpm dev

Project Structure

apps/
  api/            → Backend API (Fastify)
  extension/      → Chrome Extension (React + Vite)

packages/
  shared-types/   → Zod schemas + TypeScript types
  llm-adapter/    → LLM orchestration layer
  catalog-core/   → TMDB integration
  recommendation-core/ → Business logic

Coding Standards

  • TypeScript everywhere — no any types.
  • Strict mode — all compiler checks enabled.
  • Zod schemas — validate all external data at boundaries.
  • SOLID principles — especially Dependency Inversion for providers.
  • Meaningful names — code should read like documentation.
  • Small functions — each function does one thing.

Pull Request Process

  1. Create a feature branch: git checkout -b feature/your-feature
  2. Make your changes
  3. Run checks: pnpm typecheck && pnpm lint && pnpm test
  4. Commit with a clear message: feat: add Anthropic adapter
  5. Push and open a PR against main
  6. Fill out the PR template
  7. Wait for review

Commit Message Convention

We follow Conventional Commits:

feat: add new feature
fix: fix a bug
docs: update documentation
refactor: refactor code without changing behavior
test: add or update tests
chore: maintenance tasks

Adding a New LLM Provider

  1. Create packages/llm-adapter/src/providers/YourAdapter.ts
  2. Implement the LLMProvider interface
  3. Handle provider-specific errors
  4. Register in the provider factory
  5. Add UI option in the extension
  6. Update documentation
  7. Add tests

Security

  • NEVER log API keys
  • NEVER store API keys server-side
  • Validate ALL external input
  • Validate ALL LLM output
  • Test for prompt injection
  • Follow the principle of least privilege

Questions?

Open an issue with the question label. We're happy to help!