Thanks for your interest in contributing! Here's how to get started.
- Read STYLE_GUIDE.md for code style & organization
- Check existing issues & discussions
- Review AGENTS.md for design principles
git clone https://github.com/yourusername/sigint.git
cd sigint
npm install
# Create env files
cp packages/server/.env.example packages/server/.env
cp packages/client/.env.example packages/client/.env
# Optional: Add your NEWS_API_KEY to packages/server/.env for real data# Both server + client
npm run dev
# Frontend only
npm run dev:client
# Backend only
npm run dev:server- Frontend: http://localhost:5173
- Backend: http://localhost:3333
# Check code style
npm run lint
# Fix style issues
npm run lint:fix
# Format with Prettier
npm run format
# Check formatting without changing
npm run format:checkRun these before committing. ESLint and Prettier are configured in .eslintrc.json and .prettierrc.json.
# Check types (server)
npm --workspace=@sigint/server run buildMust pass strict mode. No any types allowed.
npm run build # Build all packagesMust succeed with no errors before PR.
JavaScript/TypeScript:
- No comments (code should be self-documenting)
- Early returns (guard clauses)
constby default,letonly when needed- Arrow functions for callbacks, named for exports
- Destructure parameters when > 2 args
- Named exports for components
React Components:
- Keep under 100 lines (extract to hooks/utils)
- Destructure props in function signature
- Use shadcn/ui components
- Memoize expensive computations
- Use hooks, not inline side effects
File Organization:
components/ # React components
ui/ # shadcn/ui components
sections/ # Page sections
charts/ # Data visualizations
hooks/ # Custom React hooks
lib/ # Utilities & helpers
types.ts # Shared types
Naming:
- Components: PascalCase (
SignalCard, notsignal-card) - Files: Match component name or utility purpose
- Variables: camelCase (
bullishSignals, notpositive) - Constants: UPPERCASE (
API_TIMEOUT,MARKETS) - CSS classes: kebab-case (Tailwind)
Colors:
- Use CSS variables:
--primary,--border,--background - Semantic colors:
--bullish,--bearish,--neutral - No hardcoded hex values
Spacing:
- Use Tailwind scale:
space-2,space-4,space-6 - Padding: 16px (cards), 24px (sections)
- Gaps: 12px (components), 8px (elements)
Typography:
- Headlines: System sans-serif, semibold
- Body: System sans-serif, regular
- Data: Monospace (JetBrains Mono or fallback)
- No custom fonts
Charts:
- Dark backgrounds (#0f172a)
- Semantic colors (green/red/yellow)
- Gradients with opacity
- No 3D effects
- Use shadcn/ui components
- Keep < 100 lines (split if larger)
- Export as named exports
- Prop types documented via TypeScript
// ✅ Good
export function SignalCard({ signal }) {
return (
<Card>
<CardHeader>
<h3 className="text-sm font-semibold">{signal.title}</h3>
</CardHeader>
<CardContent>
<p className="text-xs text-muted-foreground">{signal.source}</p>
</CardContent>
</Card>
)
}- Type all function parameters
- Handle errors explicitly
- Use descriptive logging:
[service] message - Keep functions pure & testable
- Cache when appropriate
export async function acquireSignals(query: string): Promise<Signal[]> {
try {
const signals = await fetchFromAPI(query)
logger.info(`[signals] acquired ${signals.length}`)
return signals
} catch (error) {
logger.error(`[signals] fetch failed`, { query, error })
return []
}
}npm run test # Run tests (coming soon)When tests are added:
- Add tests for new features
- Update tests for changes
- Aim for 80%+ coverage
- Test behavior, not implementation
describe('SignalCard', () => {
it('displays signal title', () => {
const signal = { title: 'Bitcoin surges' }
const { getByText } = render(<SignalCard signal={signal} />)
expect(getByText('Bitcoin surges')).toBeInTheDocument()
})
})feature/signal-filtering # New feature
fix/websocket-reconnect # Bug fix
docs/add-api-reference # Documentation
refactor/component-cleanup # Refactoring
Use conventional commits:
feat(dashboard): add sentiment distribution chart
fix(socket): reconnect on connection loss
docs: improve deployment guide
refactor: organize chart components
Format: type(scope): description
Types:
feat:New featurefix:Bug fixdocs:Documentationstyle:Code formatting (no logic change)refactor:Code restructureperf:Performance improvementtest:Adding/updating testschore:Dependencies, setup
Rules:
- Lowercase, no period
- Imperative mood (add, fix, not adds, fixed)
- Specific scope when applicable
- Reference issues:
Closes #123
feat(charts): add impact level breakdown
Implement bar chart showing signal distribution by impact level.
Uses Recharts with dark theme colors matching design system.
Closes #42
- Fork the repository
- Create feature branch:
git checkout -b feat/your-feature - Make changes in logical commits
- Run linting & tests:
npm run lint:fix && npm run build - Push to your fork
- Open PR using template (.github/PULL_REQUEST_TEMPLATE.md)
PR Requirements:
- Clear title & description
- Links related issues
- Passes all checks (lint, build, tests)
- Code review approved
- Follows style guide
Check existing issues first. Use templates:
Bug Report:
- Clear description
- Steps to reproduce
- Expected vs actual behavior
- Environment info (OS, browser, Node version)
- Screenshots if applicable
Feature Request:
- Problem statement
- Proposed solution
- Why it's needed
- Alternatives considered
Use discussions for:
- Questions about features
- Design feedback
- Best practices
- Ideas (before opening issue)
Link discussions in related PRs/issues.
- More signal sources (Twitter, TradingView, Bloomberg)
- Improve sentiment analysis (ML models, custom keywords)
- Error handling & retry logic
- Performance optimization
- User authentication & accounts
- Saved searches & alerts
- Signal filtering & sorting
- Historical data tracking
- Admin dashboard
- Mobile app (React Native)
- Real-time notifications (email, Slack, push)
- Export to CSV/JSON
- Custom market definitions
- Browser extensions
- API documentation
- Video tutorials
- Architecture diagrams
- Troubleshooting guides
- Correctness — Does it work as intended?
- Style — Follows STYLE_GUIDE.md?
- Performance — Any regressions?
- Tests — Adequate coverage?
- Docs — Updated if needed?
- Design — Follows design system?
- Acknowledge feedback
- Ask questions if unclear
- Make changes in new commits (don't force-push)
- Request re-review after changes
Maintainers periodically:
- Review & merge PRs
- Manage issues & discussions
- Update dependencies
- Monitor performance
- Plan releases
- Update version:
package.json& tags - Update
CHANGELOG.md - Run full test suite
- Build:
npm run build - Tag:
git tag v1.2.3 - Push:
git push origin main --tags - Deploy to production
- Setup issues? Open an issue or ask in Discussions
- Design questions? Check AGENTS.md, DESIGN.md, STYLE_GUIDE.md
- Code style? See STYLE_GUIDE.md
- Need help? Comment on an issue or open a Discussion
Thanks for contributing! 🚀