Thank you for your interest in contributing to Flashonic! This document provides guidelines and information for contributors.
-
Clone the repository
git clone https://github.com/flashonic/flashonic.git cd flashonic -
Install dependencies
bun install bun run install:all
-
Build the project
bun run build
-
Run tests
bun test -
Start development
cd examples/react-app bun run dev
flashonic/
├── packages/
│ ├── cli/ # Command-line interface
│ ├── server/ # Development server
│ ├── transform/ # Rust transformation engine
│ ├── cache/ # Persistent caching
│ └── plugin/ # Plugin system
├── examples/
│ └── react-app/ # Example React application
├── scripts/ # Build and utility scripts
└── docs/ # Documentation
- TypeScript: Use strict TypeScript with proper typing
- Rust: Follow standard Rust conventions with
cargo fmt - Formatting: Use Prettier for TypeScript/JavaScript files
- Linting: Use ESLint for code quality
Follow the Conventional Commits specification:
type(scope): description
feat(server): add WebSocket HMR support
fix(transform): resolve SWC parsing error
docs(readme): update installation instructions
- Write unit tests for new features
- Ensure all tests pass before submitting PR
- Add integration tests for complex features
- Test performance improvements with benchmarks
When contributing, keep these performance targets in mind:
- Cold start: <200ms on small projects
- HMR latency: <10ms for typical module edits
- Production build: <5s for medium React app
- Cache hit rate: >95% on restart
The development server is built with Bun and handles:
- HTTP serving with ESM module resolution
- WebSocket-based HMR
- File watching and change detection
- Plugin integration
Key files:
packages/server/src/index.ts- Main server implementationpackages/server/src/hmr.ts- HMR logic
The transform engine uses Rust with SWC and LightningCSS:
- JavaScript/TypeScript compilation
- CSS processing and optimization
- AST-based transformations
Key files:
packages/transform/src/lib.rs- Rust transform implementationpackages/transform/index.ts- TypeScript bindings
The caching system provides persistent storage:
- Content-based cache keys
- RocksDB for persistence
- Memory-first with disk fallback
Key files:
packages/cache/src/index.ts- Cache manager implementation
The plugin system allows extensibility:
- Rollup-compatible API
- WASM plugin support
- Hot-swappable plugins
Key files:
packages/plugin/src/index.ts- Plugin manager and API
When reporting bugs, please include:
-
Environment information
- Operating system and version
- Bun version
- Node.js version (if applicable)
- Rust version (if building from source)
-
Reproduction steps
- Minimal code example
- Configuration files
- Command that triggers the bug
-
Expected vs actual behavior
- What you expected to happen
- What actually happened
- Error messages or logs
For new features, please:
- Check existing issues to avoid duplicates
- Describe the use case and motivation
- Provide examples of how the feature would be used
- Consider performance impact on our goals
Help improve our documentation:
- Fix typos and unclear explanations
- Add examples and use cases
- Improve API documentation
- Translate documentation to other languages
Contributors will be recognized in:
- README.md contributors section
- Release notes for significant contributions
- Special thanks in documentation
- Discord: Join our Discord server
- GitHub Discussions: Use GitHub Discussions for questions
- Issues: Create an issue for bugs and feature requests
By contributing to Flashonic, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to Flashonic! 🚀