Development Setup & Contributions - BigBossBoolingB/DashAIBrowser GitHub Wiki
Development Setup & Contribution 🛠️ Forging the AI-Native Future We welcome and encourage contributions to DashAIBrowser! By contributing, you help us sculpt the future of human-computer interaction and build a truly intelligent, secure, and personalized web experience. This guide outlines how to set up your development environment and contribute to the project, adhering to The Architect's Mandate and the Expanded KISS Principle.
- Our Guiding Principles All contributions must align with the core philosophies of Josephis K. Wade, The Architect:
- The Expanded KISS Principle:
- Keep it Clear: Code must be readable, well-commented, and self-documenting. Designs should be transparent.
- Iterate Intelligently: Build in small, verifiable increments. Avoid over-engineering.
- Systematize for Scalability: Design for massive scale from day one.
- Synchronize for Synergy: Ensure components work together seamlessly.
- Law of Constant Progression: We are always moving forward, continuously improving and evolving.
- Precision In, Prowess Out: Meticulous attention to detail in code leads to robust, high-quality outcomes.
- Battle-Tested Mentality: Assume failure and corruption are inevitable; build resilient systems.
- No Magic: Solutions must be deterministic and understandable.
- QRASL Code of Conduct: All interactions and contributions must adhere to the QRASL Code of Conduct (conceptual link).
- Prerequisites
- Git: For version control.
- Python 3.9+: For AI-vCPU and other Python-based ASOL components.
- pip: Python package installer.
- Node.js (LTS recommended): For frontend development (if a separate frontend exists).
- npm (or yarn): Node.js package manager.
- Rust (with Cargo): For Substrate pallets (if any are directly integrated into browser, or for related ecosystem projects).
- Install Rust: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Add wasm32-unknown-unknown target: rustup target add wasm32-unknown-unknown
- C++ Toolchain: A modern C++ compiler (e.g., Clang, GCC) compatible with Chromium's build system.
- Chromium Build Dependencies: Follow Chromium's official documentation for installing build dependencies for your OS (e.g., depot_tools, various libraries). This is a significant prerequisite.
- Docker & Docker Compose: For running local development services or containerized components.
- Getting Started 3.1. Clone the Repository: git clone [YOUR_DASHAI_BROWSER_REPO_URL] cd DashAIBrowser # Or your specific project root directory
3.2. Chromium/Browser Core Setup:
- Initialize Chromium Fork: Follow Chromium's depot_tools instructions to fetch and gclient sync the Chromium source code into browser_core/chromium_src/.
- Build Chromium: Compile a vanilla Chromium browser to ensure your environment is correctly set up. cd browser_core/chromium_src/ gn gen out/Default autoninja -C out/Default chrome
3.3. ASOL (AI Services Orchestration Layer) Setup:
-
Install Python Dependencies: python3 -m venv venv_asol_py source venv_asol_py/bin/activate pip install -r asol/requirements.txt # Adjust path if needed
-
Generate Protobuf & Mojo Bindings:
- Ensure protoc is installed.
- Run Chromium's build system (GN/Ninja) to generate C++ Protobuf and Mojo bindings from .proto and .mojom files. This is typically handled by the overall autoninja build.
- Conceptual: autoninja -C out/Default asol_proto_target asol_mojo_target
-
Build ASOL C++ Components:
- ASOL C++ components are built as part of the Chromium build system.
- Conceptual: autoninja -C out/Default asol_service_target
- Contribution Workflow
- Fork & Branch: Fork the repository and create a feature/bugfix branch from main.
- Develop with Test-Driven Development (TDD):
- Write Tests First: For any new functionality, write unit and/or integration tests that define the expected behavior before writing the implementation code.
- Red, Green, Refactor: See the test fail (Red), write code to make it pass (Green), then refactor for clarity and efficiency.
- Adhere to Code Style & Linting:
- Python: Run black . and flake8 . (configured via pyproject.toml and .flake8).
- C++: Adhere to Chromium's C++ style guide. Use clang-format.
- JavaScript/TypeScript (if applicable): Use ESLint and Prettier.
- Run All Tests: Before submitting a Pull Request, ensure all existing backend and frontend tests pass successfully.
- C++ (ASOL/Browser): autoninja -C out/Default asol_tests browser_tests (conceptual).
- Python (AI-vCPU/Prometheus): pytest -vv (from relevant module roots).
- Note: Be aware of potential sandbox limitations for complex builds/tests and verify locally if needed.
- Write Clear Commit Messages: Use concise and descriptive commit messages following conventional commits (e.g., feat: Implement AI Summarization UI, fix: Resolve ASOL routing bug).
- Pull Request (PR) Process
- Open a Pull Request: Submit your changes via a Pull Request to the main branch.
- Describe Your Changes: Clearly explain what problem your PR solves, how it solves it, and any relevant technical details.
- Link to Issues: Reference any related issues (e.g., Closes #123).
- Code Review: Your PR will be reviewed by maintainers. Be open to feedback and iterative improvements.
- Code of Conduct All participants are expected to adhere to the QRASL Code of Conduct (conceptual link). Violations will not be tolerated.
- Reporting Issues If you find a bug or have a feature request, please open an issue on our GitHub repository. Thank you for contributing to DashAIBrowser! Together, we will sculpt the future of human-computer interaction.