Thank you for your interest in contributing to OrderFlowMap! This document provides guidelines and information for contributors.
- Code of Conduct
- Getting Started
- Architecture Constraints
- Development Workflow
- Code Style
- Submitting Changes
- Reporting Bugs
- Feature Requests
This project follows the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior by opening an issue.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/OrderFlowMap.git cd OrderFlowMap - Open
index.htmlin your browser — no build step needed - Make your changes and test by refreshing the browser
OrderFlowMap is intentionally designed as a single HTML file with zero build tooling. This is a core design principle, not a limitation.
- Single file: All HTML, CSS, and JavaScript must remain in
index.html - No build tools: No webpack, vite, rollup, or any bundler
- No frameworks: No React, Vue, Angular, etc.
- Minimal dependencies: The only external dependency is Lightweight Charts (loaded via CDN). New dependencies require strong justification.
- No npm/node: The project should work by simply opening the HTML file
- Zero friction: Anyone can use it by opening a file
- Portable: Works offline, on any OS, no installation
- Auditable: The entire application is readable in a single file
- No supply chain risk: No
node_modules, no build artifacts
Since there is no test framework, testing is manual:
- Simulation mode: Verify the simulator generates realistic data and all overlays render correctly
- UI controls: Test every slider, checkbox, and preset
- Keyboard shortcuts: Verify all hotkeys work
- Browser compatibility: Test in Chrome, Firefox, and Safari
- Live mode (if applicable): Test WebSocket connection flow
- Open browser DevTools (F12)
- Watch the console for errors
- Use the footer stats (Bars, Trades, Snapshots, FPS) to monitor performance
- The
bars,depth,trades, andcvdBarsarrays are global and inspectable in the console
- Semicolons: Always use semicolons
- Quotes: Single quotes for strings
- Indentation: 2 spaces
- Line length: Keep lines reasonable (~120 chars max)
- Comments: Use
/* Section Header */for major sections,//for inline
- Variables:
camelCase(e.g.,tradeVolByPrice,liveMsgCount) - Constants:
UPPER_SNAKE_CASE(e.g.,TICK,SPREAD_PT,DEPTH_LEVELS) - Classes:
PascalCase(e.g.,HeatmapPrimitive,BubblesRenderer) - CSS classes:
kebab-case(e.g.,stat-card,mode-badge) - DOM IDs:
camelCase(e.g.,lastPrice,hmIntensity)
- Use CSS custom properties (variables) defined in
:root - Keep selectors shallow (max 2 levels)
- Group related styles with section comment headers
- Use
constby default,letwhen reassignment is needed, nevervar - Arrow functions for callbacks and short expressions
- Use template literals for string interpolation
- Prefer
forloops over.forEach()in hot paths (rendering)
-
Create a feature branch from
main:git checkout -b feature/your-feature-name
-
Make your changes in
index.html -
Test thoroughly in at least Chrome and Firefox
-
Commit with a clear, descriptive message:
git commit -m "Add: configurable depth levels (3/5/10)" -
Push to your fork and open a Pull Request
<type>: <short description>
<optional body with more detail>
Types:
Add— New featureFix— Bug fixRefactor— Code restructuring without behavior changeStyle— CSS/visual changesDocs— Documentation onlyPerf— Performance improvement
- Works in simulation mode
- Works in live mode (if touching data flow)
- No console errors or warnings
- All existing keyboard shortcuts still work
- FPS remains stable (>30 FPS at 4× speed with 600s history)
- Description explains what and why
Open an issue with:
- Browser and version (e.g., Chrome 120, Firefox 115)
- Mode (Simulate or Live)
- Steps to reproduce
- Expected behavior
- Actual behavior
- Screenshot or screen recording (if visual)
- Console errors (if any)
Open an issue with the enhancement label. Include:
- Use case: Why is this feature needed?
- Proposed behavior: What should it do?
- Alternatives considered: Are there existing workarounds?
- Mockup (optional): A sketch or description of the UI
Here are some areas where contributions would be especially welcome:
- Add tooltip descriptions to UI controls
- Improve mobile/responsive layout
- Add a "copy to clipboard" button for connection settings
- WebSocket reconnection with exponential backoff
- Session export/import (JSON format)
- Additional colormap options
- Configurable depth levels (currently fixed at 5)
- Multi-symbol tabbed interface
- Additional exchange adapters (Binance, Zerodha Kite)
- WebGL-accelerated heatmap rendering
- Order flow imbalance stacking visualization
If you have questions about contributing, feel free to open a Discussion on GitHub. We're happy to help!