Developer Setup Guide
This guide helps developers set up their local environment to work on FinFocus documentation.
Prerequisites
Section titled “Prerequisites”- Git
- Node.js 20+ (for Astro)
- Make
Quick Setup
Section titled “Quick Setup”1. Clone Repository
Section titled “1. Clone Repository”git clone https://github.com/rshade/finfocuscd finfocus2. Install Documentation Tools
Section titled “2. Install Documentation Tools”Node Dependencies (for Astro)
Section titled “Node Dependencies (for Astro)”cd docsnpm installcd ..3. Verify Setup
Section titled “3. Verify Setup”# Check Node/npmnode --versionnpm --version
# Check Astrocd docs && npx astro --version && cd ..
# Test buildmake docs-buildmake docs-serveWorking with Documentation
Section titled “Working with Documentation”Local Preview
Section titled “Local Preview”Serve documentation locally on http://localhost:4321/finfocus/:
make docs-serveOr directly with npm:
cd docsnpm run devcd ..Lint Documentation
Section titled “Lint Documentation”Check markdown formatting and links:
make docs-lintOr use npm:
npm run docs:lintFormat Documentation
Section titled “Format Documentation”Auto-format all markdown files:
npm run docs:formatValidate Structure
Section titled “Validate Structure”Ensure documentation is complete:
make docs-validateDevelopment Workflow
Section titled “Development Workflow”1. Create Feature Branch
Section titled “1. Create Feature Branch”git checkout -b docs/my-feature2. Make Changes
Section titled “2. Make Changes”# Edit documentation filesnano docs/guides/my-guide.md
# Preview locallymake docs-serve
# Lint changesmake docs-lint3. Test Build
Section titled “3. Test Build”# Build static sitemake docs-build
# Run validationmake docs-validate4. Commit Changes
Section titled “4. Commit Changes”git add docs/git commit -m "docs: Add my new guide"5. Push and Create PR
Section titled “5. Push and Create PR”git push origin docs/my-feature
# Create PR on GitHub (via web interface)Common Tasks
Section titled “Common Tasks”Add a New Guide
Section titled “Add a New Guide”-
Create file in appropriate directory:
Terminal window touch docs/guides/my-guide.md -
Add frontmatter:
---title: My Guide Titledescription: Brief description for search--- -
Write content using Google style guide
-
Test locally:
Terminal window make docs-serve -
Lint and validate:
Terminal window make docs-lintmake docs-validate
Add Documentation to New Directory
Section titled “Add Documentation to New Directory”-
Create directory:
Terminal window mkdir -p docs/my-section/ -
Create README.md:
Terminal window cat > docs/my-section/README.md << 'EOF'# My SectionOverview of this section.---**Status:** 🔴 Not StartedEOF -
Update
docs/plan.mdto reference new section -
Update
docs/llms.txt:Terminal window ./scripts/update-llms-txt.sh
Fix Linting Issues
Section titled “Fix Linting Issues”Fix formatting automatically:
npm run docs:formatOr manually:
# Check what prettier wants to fixnpm run docs:check-format
# Fix all issuesnpm run docs:formatFile Structure
Section titled “File Structure”docs/├── package.json # Node.js dependencies├── astro.config.mjs # Astro/Starlight configuration├── tsconfig.json # TypeScript configuration├── public/ # Static assets (images, etc.)│ └── screenshots/ # UI screenshots├── src/│ └── content/│ └── docs/ # Documentation content│ ├── getting-started/ # Quick start guides│ ├── guides/ # Audience guides│ ├── architecture/ # Architecture docs│ ├── plugins/ # Plugin docs│ ├── reference/ # API reference│ ├── deployment/ # Operations│ └── support/ # Help & community└── .markdownlint-cli2.jsonc # Markdown linting configTroubleshooting
Section titled “Troubleshooting”npm Install Fails
Section titled “npm Install Fails”Issue: Node version too old or dependency conflicts
Solution:
# Update Nodenvm install 20nvm use 20
# Clear cache and reinstallcd docsrm -rf node_modules package-lock.jsonnpm installcd ..Astro Dev Server Not Working
Section titled “Astro Dev Server Not Working”Issue: Port already in use or build errors
Solution:
# Try different portcd docs && npx astro dev --port 5000
# Clear Astro cacherm -rf docs/.astro docs/distcd docs && npm run devLinting Errors
Section titled “Linting Errors”Issue: Markdownlint or prettier finding errors
Solution:
# Show what needs fixingnpm run docs:check-format
# Fix automaticallynpm run docs:format
# Or fix manually based on linter outputDocumentation Guidelines
Section titled “Documentation Guidelines”- Follow Google Developer Style Guide
- Use clear, concise language
- Use active voice
- Provide examples for complex topics
Formatting
Section titled “Formatting”- Use proper markdown headings (# not bold)
- Code blocks with language:
```bash - Links relative to docs directory
- Line length: 120 characters (soft limit)
Testing
Section titled “Testing”- Test all code examples
- Verify all links work
- Preview on http://localhost:4321/finfocus/
Frontmatter
Section titled “Frontmatter”All content pages should have:
---title: Page Titledescription: Short description for search results---Useful Commands
Section titled “Useful Commands”# Documentationmake docs-lint # Lint docsmake docs-build # Build static sitemake docs-serve # Serve locallymake docs-validate # Validate structure
# NPM tasksnpm run docs:lint # Lint with markdownlintnpm run docs:format # Format with prettiernpm run docs:check-format # Check formattingnpm run lint # Run all linting
# Gitgit status # Check changesgit diff # View changesgit add docs/ # Stage docsgit commit -m "msg" # CommitGetting Help
Section titled “Getting Help”- Markdown issues: Check CommonMark spec
- Astro issues: See Astro docs and Starlight docs
- Google Style: Check Google Developer Style Guide
- Questions: Open GitHub Discussion
Last Updated: 2025-10-29