Skip to content

Developer Setup Guide

This guide helps developers set up their local environment to work on FinFocus documentation.

  • Git
  • Node.js 20+ (for Astro)
  • Make
Terminal window
git clone https://github.com/rshade/finfocus
cd finfocus
Terminal window
cd docs
npm install
cd ..
Terminal window
# Check Node/npm
node --version
npm --version
# Check Astro
cd docs && npx astro --version && cd ..
# Test build
make docs-build
make docs-serve

Serve documentation locally on http://localhost:4321/finfocus/:

Terminal window
make docs-serve

Or directly with npm:

Terminal window
cd docs
npm run dev
cd ..

Check markdown formatting and links:

Terminal window
make docs-lint

Or use npm:

Terminal window
npm run docs:lint

Auto-format all markdown files:

Terminal window
npm run docs:format

Ensure documentation is complete:

Terminal window
make docs-validate
Terminal window
git checkout -b docs/my-feature
Terminal window
# Edit documentation files
nano docs/guides/my-guide.md
# Preview locally
make docs-serve
# Lint changes
make docs-lint
Terminal window
# Build static site
make docs-build
# Run validation
make docs-validate
Terminal window
git add docs/
git commit -m "docs: Add my new guide"
Terminal window
git push origin docs/my-feature
# Create PR on GitHub (via web interface)
  1. Create file in appropriate directory:

    Terminal window
    touch docs/guides/my-guide.md
  2. Add frontmatter:

    ---
    title: My Guide Title
    description: Brief description for search
    ---
  3. Write content using Google style guide

  4. Test locally:

    Terminal window
    make docs-serve
  5. Lint and validate:

    Terminal window
    make docs-lint
    make docs-validate
  1. Create directory:

    Terminal window
    mkdir -p docs/my-section/
  2. Create README.md:

    Terminal window
    cat > docs/my-section/README.md << 'EOF'
    # My Section
    Overview of this section.
    ---
    **Status:** 🔴 Not Started
    EOF
  3. Update docs/plan.md to reference new section

  4. Update docs/llms.txt:

    Terminal window
    ./scripts/update-llms-txt.sh

Fix formatting automatically:

Terminal window
npm run docs:format

Or manually:

Terminal window
# Check what prettier wants to fix
npm run docs:check-format
# Fix all issues
npm run docs:format
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 config

Issue: Node version too old or dependency conflicts

Solution:

Terminal window
# Update Node
nvm install 20
nvm use 20
# Clear cache and reinstall
cd docs
rm -rf node_modules package-lock.json
npm install
cd ..

Issue: Port already in use or build errors

Solution:

Terminal window
# Try different port
cd docs && npx astro dev --port 5000
# Clear Astro cache
rm -rf docs/.astro docs/dist
cd docs && npm run dev

Issue: Markdownlint or prettier finding errors

Solution:

Terminal window
# Show what needs fixing
npm run docs:check-format
# Fix automatically
npm run docs:format
# Or fix manually based on linter output
  • Use proper markdown headings (# not bold)
  • Code blocks with language: ```bash
  • Links relative to docs directory
  • Line length: 120 characters (soft limit)

All content pages should have:

---
title: Page Title
description: Short description for search results
---
Terminal window
# Documentation
make docs-lint # Lint docs
make docs-build # Build static site
make docs-serve # Serve locally
make docs-validate # Validate structure
# NPM tasks
npm run docs:lint # Lint with markdownlint
npm run docs:format # Format with prettier
npm run docs:check-format # Check formatting
npm run lint # Run all linting
# Git
git status # Check changes
git diff # View changes
git add docs/ # Stage docs
git commit -m "msg" # Commit

Last Updated: 2025-10-29