Contributing to QuantIQ
Thank you for your interest in contributing to QuantIQ! We welcome developers of all backgrounds to help us build a premium quantitative research terminal.
This document details the project architecture, developer setup, code guidelines, and deployment workflows.
π Project Structure Map
backend/β FastAPI core server. Exposes GraphQL/REST APIs and WebSocket channels.frontend/β React / TypeScript client built with Vite and Tailwind CSS.worker/β Tick ingestion service. Periodically polls Yahoo Finance and dispatches ticks to Redpanda Cloud.alembic/β Database migrations for watchlists, strategy records, and user targets.assets/β UI mockups, database schemas, and documentation images.train.pyβ Offline model training script that generates indicator features and exportsmodel.onnx.deploy_hf.ps1β Automated deployment pipeline script for Hugging Face Spaces.
π οΈ Local Development Setup
1. Ingest Ingestion & Backend Setup
Prerequisites: Make sure you have uv and Docker Desktop installed.
# Sync python virtual environment and lock file
uv sync
# Copy the environment template and configure keys
cp .env.example .env
# Spin up local PostgreSQL (NeonDB replica) and Redis containers
docker-compose up -d
# Execute database migrations
uv run alembic upgrade head
# Start the local FastAPI server
uv run uvicorn backend.app.main:app --reload
2. Start Background Services
# Start the ingestion worker (fetches stock ticks every 5 seconds)
uv run python worker/worker.py
# Start Celery worker with beat enabled (logs ML predictions and outcomes)
uv run celery -A backend.app.services.celery_app worker --beat --loglevel=info
3. Frontend Dashboard Setup
cd frontend
npm install
npm run dev
π Deployment Workflow (Hugging Face Spaces & GitHub)
Hugging Face Spaces hosting requires a custom metadata block (YAML frontmatter) at the very top of README.md. To keep the GitHub repository clean while pushing updates to Hugging Face, you must use the automated deployment script:
Hugging Face Deployment Procedure:
- Ensure your changes are committed on your local branch.
- In PowerShell, execute the deployment script from the project root:
.\deploy_hf.ps1 - What this script does automatically:
- Prepends the YAML frontmatter configuration block to
README.md. - Commits the change (
chore: add HF Space config for deployment). - Pushes the commit to the Hugging Face space repository (
git push hf main). - Automatically restores the clean
README.mdfile back to its default state. - Commits the cleanup (
chore: restore clean README for GitHub).
- Prepends the YAML frontmatter configuration block to
- Finally, push your clean branch changes directly to GitHub:
git push origin main
π§Ό Code Quality & Style Guidelines
To keep the pipeline green, verify the following standards locally before opening a pull request:
π Python (Backend / Worker)
- Linter & Formatter: We use
ruff. Run the check locally:uv run ruff check .
βοΈ TypeScript & React (Frontend)
- Formatters: Ensure typescript compiling (
tsc) and Vite bundling compile cleanly:cd frontend npm run build
π― Open Development Goals
Check out our active GitHub Issues page or pick one of these tasks to start:
- [Backend] Model Metadata Endpoint: Expose
GET /api/v1/ml/metadatato parse and return properties from the loadedmodel.onnx. - [Frontend] RSI Reference Boundaries: Use the Lightweight Charts API to draw Overbought (70) and Oversold (30) reference price lines.
- [Backend] Discord/Slack webhook price alerts: Build a dispatcher service sending real-time stock crossings directly to webhook endpoints.