This guide will help you set up your local development environment for working with the bamr87 monorepo.
-
Git: Version 2.13+ (for submodule support)
git --version
-
GitHub CLI (recommended): For repository management
gh --version
Depending on which submodule you're working with:
- Node.js: 18.x or higher
- npm: 9.x or higher
node --version
npm --version- Python: 3.8 or higher
- pip: Latest version
python3 --version
pip3 --version- Bash: 4.0+ (macOS users may need to upgrade)
- zsh: 5.x+ (standard on macOS)
bash --version
zsh --versionClone with all submodules:
git clone --recurse-submodules https://github.com/bamr87/bamr87.git
cd bamr87Or clone then initialize submodules:
git clone https://github.com/bamr87/bamr87.git
cd bamr87
git submodule update --init --recursiveCheck that all submodules are properly initialized:
git submodule statusYou should see:
366375a6e5ac66ab484157b222054ad6c233a0c1 README (heads/main)
b93ddfa12750f79fe4a207a92c5307f1b6088731 cv (heads/main)
fecf16b07f6f8a75a8ab52783b6ef7cc062e018c scripts (heads/master)
Use the provided setup script:
./tools/setup-dev.shCV Builder:
cd cv
npm install
cd ..Documentation System:
cd README
pip3 install -r requirements.txt
cd ..MkDocs (Root):
pip3 install -r requirements-docs.txtScripts:
cd scripts
# Scripts are standalone, but check individual script requirements
chmod +x *.sh
cd ..cd cv
npm run devAccess at: http://localhost:5173
Build and serve MkDocs documentation:
mkdocs serveAccess at: http://localhost:8000
If using the Wiki.js documentation system:
cd README
docker-compose up -dAccess at: http://localhost:3000
-
Create a branch:
git checkout -b feature/your-feature-name
-
Make changes in the root or submodules
-
Test your changes:
# For CV Builder cd cv && npm run build && npm run preview # For Documentation mkdocs build --strict # For Scripts shellcheck scripts/*.sh
-
Commit changes:
git add . git commit -m "feat: your descriptive message"
-
Push and create PR:
git push origin feature/your-feature-name
-
Navigate to submodule:
cd cv # or README, or scripts
-
Create branch in submodule:
git checkout -b feature/new-feature
-
Make and commit changes:
git add . git commit -m "feat: add new feature"
-
Push to submodule repo:
git push origin feature/new-feature
-
Return to parent and update pointer:
cd .. git add cv git commit -m "chore: update cv submodule" git push
JavaScript/TypeScript (CV Builder):
cd cv
npm run lintPython (Documentation):
cd README
pylint scripts/*.pyShell Scripts:
shellcheck scripts/*.shPrettier (Markdown, JSON):
npx prettier --write "**/*.{md,json}"Black (Python):
black README/scripts/Install pre-commit hooks:
pip install pre-commit
pre-commit installRun manually:
pre-commit run --all-filescd cv
npm run testcd README
pytest tests/Run all tests:
./tools/run-all-tests.shCreate cv/.env.local:
VITE_FIREBASE_API_KEY=your-api-key
VITE_FIREBASE_AUTH_DOMAIN=your-domain
VITE_FIREBASE_PROJECT_ID=your-project-id
VITE_FIREBASE_STORAGE_BUCKET=your-bucket
VITE_FIREBASE_MESSAGING_SENDER_ID=your-sender-id
VITE_FIREBASE_APP_ID=your-app-idCreate README/.env:
XAI_API_KEY=your-xai-key
OPENAI_API_KEY=your-openai-keyProblem: Submodule not initialized
git submodule update --init --recursiveProblem: Submodule detached HEAD
cd <submodule>
git checkout main
cd ..Problem: Submodule changes not showing
git submodule foreach git pull origin mainProblem: Node modules not found
cd cv
rm -rf node_modules package-lock.json
npm installProblem: Python dependencies conflicts
cd README
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtProblem: MkDocs build fails
pip install --upgrade -r requirements-docs.txt
mkdocs build --cleanProblem: Scripts not executable
chmod +x scripts/*.sh
chmod +x tools/*.shRecommended extensions:
- ESLint
- Prettier
- Python
- GitLens
- Markdown All in One
- YAML
Workspace settings are in .vscode/settings.json.
- Enable ESLint for cv/
- Enable Python plugin for README/
- Configure Prettier for code formatting
Use shallow clones for testing:
git clone --depth 1 --recurse-submodules --shallow-submodules https://github.com/bamr87/bamr87.gitgit submodule foreach --recursive git pull origin mainFor CV Builder:
npm run dev # Uses Vite's fast HMRFor Documentation:
mkdocs serve --dirtyreload # Only rebuilds changed files- MONOREPO.md - Repository organization
- ARCHITECTURE.md - System design
- CONTRIBUTING.md - Contribution guidelines
- Issues: https://github.com/bamr87/bamr87/issues
- Discussions: https://github.com/bamr87/bamr87/discussions
- Email: amr.abdel@gmail.com
# Update all submodules
git submodule update --remote --merge
# Check submodule status
git submodule status
# Reset submodule to parent's version
git submodule update --init --force
# Build documentation
mkdocs build
# Run CV builder
cd cv && npm run dev
# Run all tests
./tools/run-all-tests.sh
# Format all code
npx prettier --write "**/*.{md,json,yml,yaml}"- Review the CONTRIBUTING.md guide
- Check open issues for good first contributions
- Join discussions to connect with other contributors
- Read submodule-specific documentation in each folder
Happy coding! 🚀