Thank you for your interest in contributing to GraphChat! This document provides guidelines and instructions for contributing.
Before creating bug reports, please check existing issues. When creating a bug report, include:
- Clear title and description
- Steps to reproduce the behavior
- Expected vs actual behavior
- Screenshots if applicable
- Environment details (OS, Node version, browser)
Example:
**Bug**: Intent matching fails for multi-word phrases
**Steps to Reproduce:**
1. Start customer-support-escalation scenario
2. Type "I am really frustrated with this"
3. See incorrect intent detection
**Expected:** Should detect "express-frustration" intent
**Actual:** Detects generic inquiry
**Environment:** Node 20, Chrome 120Feature suggestions are welcome! Please provide:
- Use case: Why is this feature needed?
- Proposed solution: How should it work?
- Alternatives considered: What other approaches exist?
- Additional context: Screenshots, mockups, etc.
- Fork the repository
- Create a branch from
main:git checkout -b feature/amazing-feature
- Make your changes
- Run tests and ensure they pass
- Commit with clear messages:
git commit -m "feat: add amazing feature" - Push to your fork:
git push origin feature/amazing-feature
- Open a Pull Request
We follow Conventional Commits:
feat:New featuresfix:Bug fixesdocs:Documentation changesstyle:Code style changes (formatting, etc.)refactor:Code refactoringtest:Test additions/changeschore:Build process, tooling, etc.
Examples:
feat: add emotion detection to intent engine
fix: resolve graph viewer zoom issue in Safari
docs: update API reference documentation
refactor: simplify dialogue generator logic- Node.js 18+
- npm 9+
- Git
# Fork and clone
git clone https://github.com/YOUR_USERNAME/graphchat.git
cd graphchat
# Install dependencies
npm install
# Start development servers
npm run dev# All tests
npm test
# With coverage
npm run test:coverage
# Specific workspace
npm run test --workspace @conversation-trainer/api# Build all packages
npm run build
# Build specific package
npm run build --workspace @conversation-trainer/apiWhen creating new scenarios:
- Define clear learning objectives
- Create distinct personas with backstories
- Write diverse intent examples (5+ per intent)
- Add dialogue variations to avoid repetition
- Test thoroughly with different inputs
- Document difficulty and estimated duration
- Personas have clear goals and pain points
- Intents have 5+ diverse examples
- Dialogue variations (2+) per bot node
- Emotions specified for key nodes
- Learning objectives documented
- All edges have appropriate triggers
- Scenario validates successfully
- Use strict mode
- Define explicit types (avoid
any) - Use interfaces for object shapes
- Export types from
packages/types
- Use functional components with hooks
- Prefer composition over inheritance
- Keep components small and focused
- Use TypeScript for props and state
- Files: PascalCase for components, camelCase for utilities
- Components: PascalCase (e.g.,
ChatContainer) - Functions/Variables: camelCase (e.g.,
sendMessage) - Constants: UPPER_SNAKE_CASE (e.g.,
MAX_RETRIES) - Types/Interfaces: PascalCase (e.g.,
ConversationNode)
When adding features, please update:
- README.md: Feature overview and usage
- API Reference: New endpoints or changes
- TypeScript types: Update
packages/types - Comments: Complex logic should be documented
Releases are managed by maintainers. The process:
- Version bump in
package.jsonfiles - Update CHANGELOG.md
- Create git tag
- Publish to npm (for packages)
- Create GitHub release
- Discord: Join our server
- Twitter: @GraphChat
- Email: contributors@graphchat.dev
Please be respectful and constructive. We're committed to providing a welcoming environment for all contributors.
Thank you for contributing to GraphChat! 🎉