Thank you for your interest in contributing to Flow Profile! This document provides guidelines and information for contributors.
- Bun v1.1.0 or higher
- Node.js 20+ (for compatibility testing)
- Git
# Clone the repository
git clone https://github.com/yuan-cloud/flow-profile.git
cd flow-profile
# Install dependencies
bun install
# Run tests
bun run test
# Start development server (web app)
bun run devflow-profile/
├── packages/
│ ├── core/ # Core parsing and analysis library
│ ├── cli/ # Command-line interface
│ ├── ui/ # Shared UI components
│ └── ai/ # AI provider adapters
├── apps/
│ └── web/ # Vue 3 web application
├── testdata/ # Test fixtures and factories
└── docs/ # Documentation
We use Biome for linting and formatting.
# Check linting
bun run lint
# Auto-fix issues
bun run lint:fix
# Format code
bun run format- Use TypeScript strict mode
- Prefer functional patterns over classes
- Keep functions small and focused
- Add JSDoc comments for public APIs
- Avoid
anytypes - use proper typing orunknown
We follow Conventional Commits:
<type>(<scope>): <description>
[optional body]
[optional footer]
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, etc.)refactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
feat(core): add circular subflow detection
fix(web): resolve flaky E2E selectors
docs: add CONTRIBUTING guide
- Fork the repository
- Create a branch from
master:git checkout -b feat/my-feature - Make your changes following the code style guidelines
- Write tests for new functionality
- Run the test suite:
bun run test - Commit using conventional commits
- Push to your fork
- Open a PR against
master
- Tests pass (
bun test) - Linting passes (
bun run lint) - Build passes (
bun run build) - Changes are documented if needed
- PR description explains the changes
# Run all tests
bun run test
# Run with coverage
bun run test:coverage
# Watch mode
bun run test:watch# Run Playwright tests (requires dev server)
cd apps/web
bun run dev &
bun run test:e2e- Use the test factories in
testdata/factories/for creating test data - Prefer real implementations over mocks
- Test edge cases and error conditions
- Keep tests focused and readable
We generate API docs with TypeDoc for each package.
# Generate API docs for all packages
bun run docs:apiDocs are written to docs/api/ (generated output; do not commit).
Some VPS setups are sensitive to concurrent build/test runs (Vite/Vitest/esbuild service mode). To keep builds stable:
- Run only one build or test at a time.
- Prefer a real TTY session (avoid background or overlapping runs).
- If a build/test hangs, stop and capture the error and process list before retrying.
- If repeated hangs occur, run builds/tests locally or in CI.
Optional workaround for VPS stability:
GOMAXPROCS=1 bun run build
GOMAXPROCS=1 bun run testFor Playwright on headless VPS, use the project wrapper (bun run test:e2e). If Chromium sandboxing fails, run E2E tests and screenshots on a machine with full browser support.
Major architecture decisions are documented in the codebase. When proposing significant changes:
- Open an issue first to discuss the approach
- Consider backwards compatibility
- Document the rationale in code comments or PR description
- Open an issue for bugs or feature requests
- Check existing issues before creating new ones
- Provide reproduction steps for bugs
By contributing, you agree that your contributions will be licensed under the MIT License.