Building the Documentation¶
This guide explains how to build and maintain the FlowState documentation system using Sphinx.
Building Documentation¶
Prerequisites¶
Python dependencies:
python -m pip install --upgrade pip
pip install pipenv
pipenv install
Viewing Documentation¶
After building, open _build/html/index.html in your browser to view the documentation.
Documentation Structure¶
/docs/: Main documentation sourceindex.rst: Main entry point for documentationconf.py: Sphinx configuration fileMakefile: Build automationbuild_docs.sh: Documentation build scriptfix_rst_underlines.py: RST formatting utility/api/: API Documentationindex.rst: API documentation entry point/python/: Python API documentationadaptive_audio_engine.rst: Audio engine documentationai_advisor.rst: AI advisor systemflow_state_detector.rst: Flow state detectionhealth_tracking.rst: Health tracking system/attention/: Attention system documentationattention_maximizer.rst: Attention optimization
/biometric/: Biometric trackingtobii_tracker.rst: Eye trackingwhoop_client.rst: Whoop integration
/eeg/: EEG processingrealtime_processor.rst: Real-time EEG processing
/flow/: Flow state algorithmschaos_system.rst: Chaos systemrecovery_system.rst: Recovery systemstability_system.rst: Stability system
/hardware/: Hardware integrationstrobe_glasses.rst: Strobe glasses control
/research/: Research systemresearch_system.rst: Research framework
/visual/: Visual processingvisual_processor.rst: Visual processing system
/architecture/: System architectureindex.rst: Architecture overviewalgorithm_design.md: Algorithm specificationsapi_integration.md: API integration detailsdata_flow.mermaid: Data flow diagramsentropy-chaos-algorithm.md: Entropy systemflow_system_diagram.mermaid: System architecture diagramsflowstate_optimization_algorithms.md: Optimization algorithmshealth_tracking.rst: Health tracking architectureinitial_feedback_loop.md: Feedback systemquantum.md: Quantum computing integrationvariables.md: System variables
/development/: Development guidesindex.rst: Development documentation entrycompleted.md: Completed featuresFEATURES.md: Feature specificationsimplementation_status.md: Implementation statusin-line-docs-template.md: Documentation templatesllm_workflow.md: LLM integration workflowplanned.md: Planned featurespriority_queue.md: Development prioritiespriority_queue_2.md: Additional priorities
/research/: Research documentationindex.rst: Research overview/findings/: Research findingsindex.rst: Findings overview
/papers/: Research papers
/inspo/: Design inspiration assetsVarious image assets (*.jpg)
/_static/: Static assets/_build/: Generated documentation
Linking to Documentation Pages¶
In Markdown Files (.md)¶
<!-- Link to a page in the same directory -->
[Implementation Status](implementation_status.md)
<!-- Link to a page in another directory -->
[API Documentation](api/index.rst)
[Flow State Detection](api/python/flow_state_detector.rst)
<!-- Link to the deployed version (GitHub Pages) -->
[Online Documentation](https://kvnloo.github.io/FlowState/)
[Architecture Overview](https://kvnloo.github.io/FlowState/architecture/index.html)
In RST Files (.rst)¶
.. Link to another RST file
:doc:`/api/index`
.. Link with custom text
:doc:`API Documentation </api/index>`
.. Link to a section in any document
:ref:`implementation-status`
.. External link
`FlowState Online Docs <https://kvnloo.github.io/FlowState/>`_
Quick Links¶
Contributing¶
Follow the established documentation format for both Python and JavaScript files
Update implementation status with dates
Include dependencies and integration points
Provide clear examples
Run
make alllocally to verify changes
Automated Building¶
Documentation is automatically built and deployed to GitHub Pages when changes are pushed to the main branch. See .github/workflows/docs.yml for details.