Commit Graph
1474 Commits
Author SHA1 Message Date
john-okeefe d9c6be1429 docs: rename DEVELOPMENT.md to development.md and update links
- Rename docs/contributing/DEVELOPMENT.md to development.md (lowercase)
- Update all references from DEVELOPMENT.md to Development.md (titlecase links)
- Update docs/contributing/contributing.md
- Update docs/index.md
2026-02-03 13:54:11 -05:00
john-okeefe 3cd378bbee feat: apply Tokyo Night theme to documentation pages
- Add theme-tokyo-night class to docs body tags
- Docs now use CSS variables for all colors (bg, text, accent, border)
- Links now render with correct lighter color (#9aa5ce instead of #565f89)
- Consistent theming across docs and application pages
- Fixes darker link color issue from previous hardcoded values
2026-02-03 09:55:52 -05:00
john-okeefe c2cc2361d9 feat: make docs theme-aware using CSS variables
- Update Tailwind config to use CSS variables instead of hardcoded colors
- Colors now reference theme variables: var(--text-primary), var(--text-secondary), etc.
- Fix Tokyo Night theme: text-secondary corrected from #565f89 to #9aa5ce
- Typography plugin now uses var() for theme-aware prose styling
- Enables docs to respect theme system like rest of app
2026-02-03 09:55:51 -05:00
john-okeefe 0c5c7e4e41 fix: enforce local TailwindCSS builds, reject CDN usage
- Update verification script to check for /static/style.css (local build)
- Reject cdn.tailwindcss.com usage (violates production-ready requirement)
- Local builds are faster, have no external dependencies, and are self-contained
- Changes verification from WARNING to ERROR when CDN is detected
- Now passes all 26 checks with 0 warnings, 0 errors
2026-02-03 09:44:39 -05:00
john-okeefe 4d2069abdb fix: replace Tailwind CDN with local CSS in docs templates
- Remove Tailwind CDN dependency from documentation pages
- Load local /static/style.css instead (includes typography plugin)
- Remove inline tailwind.config script (no longer needed)
- Code blocks now use proper dark colors from input.css overrides
- Consistent with other templates (admin, dashboard, analytics)
- Faster loading (no external CDN request)
- Local build includes all needed CSS (typography + custom overrides)
- Add Zed editor configuration for CSS at-rule warnings
2026-02-03 09:40:02 -05:00
john-okeefe 9d775511d3 fix: use valid Zed formatter value 'auto'
- Change formatter from 'none' to 'auto' (valid Zed value)
- Resolves Zed configuration validation error
2026-02-03 09:32:44 -05:00
john-okeefe 79280fbfe0 fix: simplify Zed settings to avoid config error
- Remove invalid formatter configuration
- Keep basic CSS language settings
- Avoids 'FormatterList' enum error in Zed
2026-02-03 09:31:14 -05:00
john-okeefe 28faf9748c feat: add Zed editor config for Tailwind CSS
- Create .zed/settings.json to ignore unknown at-rule warnings
- Configure Zed to ignore Tailwind's @tailwind directives
- Add explanatory comment in input.css for Tailwind directives
- Resolves CSS linter warnings in Zed editor
2026-02-03 09:29:38 -05:00
john-okeefe c7475af75d fix: suppress editor warnings for Tailwind at-rules
- Add eslint-disable comments around @tailwind directives
- Resolves 'Unknown at rule @tailwind' warnings in CSS editors
- Comments clearly mark tailwindcss section for maintainability
2026-02-03 09:29:03 -05:00
john-okeefe 5630dc6196 fix: remove custom CSS from documentation templates
- Remove <style> tags from DocsLayout and DocsLayoutWithExplorer
- Code block styling now handled by input.css (Tailwind @layer)
- Complies with 'no custom CSS in templates' guideline
- Templates now pure HTML/templ with embedded style removed
- Verification passes: 0 errors, 0 warnings
2026-02-03 09:27:55 -05:00
john-okeefe 91cffbbffe fix: add highlight.js color overrides to input.css
- Move code block styling from templates to centralized CSS file
- Add highlight.js overrides in @layer components section
- Use tokyo-night colors: #16161e for pre blocks, #1a1b26 for inline code
- Follows Tailwind best practices: custom CSS in input.css, not templates
- Maintains proper theme-adjustable styling
2026-02-03 09:27:54 -05:00
john-okeefe 737693db60 fix: remove custom CSS, centralize prose styling in tailwind config
- Remove custom CSS <style> tags from docs template (violates guidelines)
- Move prose typography customization to tailwind.config.ts
- Use theme tokens for all colors (adjustable with theme)
- Set code blocks to background.secondary (darker than primary)
- Remove duplicate inline typography config from both templates
- Now uses single source of truth for documentation styling
2026-02-03 09:11:35 -05:00
john-okeefe bac7ba8a75 docs: clarify TypeScript paradigm as pragmatic imperative over OOP 2026-02-03 08:52:42 -05:00
john-okeefe 1657659de7 revert: remove broken typography config attempts
The Tailwind CDN typography plugin doesn't support the theme function syntax
we were trying to use. The site theming is working correctly with the
custom CSS in place, so we're keeping the working solution.

Code blocks have dark backgrounds (#14151f) and the rest of the site uses
the theme colors from Tailwind config (bg-background-primary, text-text-primary, etc.)
2026-02-02 21:32:53 -05:00
john-okeefe e36320bb2c fix: restore dark code blocks with custom CSS
The Tailwind CDN typography plugin configuration wasn't applying correctly
in the browser. Reverted to using custom CSS with !important flags to ensure
dark code block backgrounds are properly applied.

- Code blocks: #14151f (slightly darker than main background)
- Inline code: #1a1b26 (matches main background)
- Text: #c0caf5 (light text for readability)

This is a pragmatic fix that ensures the documentation remains readable while
we investigate the Tailwind CDN typography plugin issue.
2026-02-02 21:28:16 -05:00
john-okeefe e43e1f1f26 chore: add htmx.min.js and update gitignore for doc dependencies
- Added htmx.min.js to git (previously only downloaded during build)
- Updated .gitignore to explicitly allow documentation dependencies
- Clarified compiled vs downloaded JS in gitignore comments
2026-02-02 21:23:19 -05:00
john-okeefe 0fe4a1dacc feat: download documentation dependencies locally for full self-hosting
Replaced CDN dependencies with local downloads for fully self-contained operation:
- Highlight.js (syntax highlighting) - 121KB
- Highlight.js GitHub Dark theme - 1.3KB
- Lunr.js (documentation search) - 29KB
- Lunr-flex (search plugin) - 43KB

Changes:
- Updated package.json postinstall to download all dependencies
- Modified docs templates to use /web/static/ paths
- Updated .gitignore to allow documentation dependencies
- Total added: ~195KB (minimal container impact)

Benefits:
-  Fully self-hosted - no external CDN requests
-  Works offline without internet access
-  No privacy/analytics leaks from CDNs
-  Consistent with project's self-hosting philosophy
-  Improved reliability for air-gapped deployments

Note: Tailwind CSS CDN remains (development-only, production uses compiled CSS)
2026-02-02 21:22:55 -05:00
john-okeefe ed0a41e2d1 refactor: remove templates/ prefix from template error file names
Clean up generated template code to use simpler file paths in error messages by removing the redundant templates/ directory prefix.
2026-02-02 21:18:56 -05:00
john-okeefe 121b955334 refactor: use Tailwind typography config instead of custom CSS
Replaced custom <style> blocks with Tailwind Typography plugin configuration
to set dark theme colors for code blocks. This complies with the project
guideline of no custom CSS - all styling now uses Tailwind utilities.

Changes:
- Removed <style> tags from docs templates
- Added typography.extend.invert.css configuration to tailwind.config
- Code blocks now use #14151f background (slightly darker than main #1a1b26)
- Inline code uses theme colors from Tailwind config
- Copy buttons still work with same functionality
2026-02-02 21:16:46 -05:00
john-okeefe 9b58533a81 fix: apply darker code block background color to DocsLayout
Applied the color change (#14151f instead of #1a1b26 for code blocks)
to the DocsLayout function, making code blocks slightly darker than the
main background for better visual distinction.
2026-02-02 21:11:32 -05:00
john-okeefe 26d427c4b3 style: adjust code block background to be subtly darker
Changed code block backgrounds to be slightly darker than the main background:
- Main background: #1a1b26
- Code blocks (pre): #14151f (slightly darker to stand out)
- Inline code: #1a1b26 (matches main background for subtlety)

This creates a subtle distinction that makes code blocks visually
distinct while maintaining the dark theme aesthetic.
2026-02-02 21:07:25 -05:00
john-okeefe 0b979d698e feat: add dark code blocks and copy buttons to documentation
- Fixed white background in code blocks by adding custom CSS
  - Code blocks now use dark background (#1a1b26 for pre, #16161e for code)
  - Inline code matches theme colors
- Added copy buttons to all code blocks
  - Button appears on hover (top-right corner)
  - Shows 'Copy' → 'Copied!' feedback
  - Uses Clipboard API for copying code
- Copy buttons styled to match documentation theme

This improves the dark mode documentation experience with better
code block visibility and usability.
2026-02-02 21:03:39 -05:00
john-okeefe 7d717e32a2 fix: enable Tailwind Typography plugin in docs template
Added ?plugins=typography to Tailwind CDN script to enable prose classes.
This fixes the 'wall of text' issue in documentation by properly styling:
- Headings, paragraphs, lists with proper spacing
- Line-height and typography improvements
- Code blocks, blockquotes, tables, and links

The prose classes now work correctly with the CDN version of Tailwind.
2026-02-02 20:58:48 -05:00
john-okeefe d102b6f976 style: add Tailwind Typography plugin for proper markdown rendering
Installed @tailwindcss/typography plugin to fix 'wall of text' issue in documentation.
The prose classes now properly style markdown HTML elements with:
- Proper margins and spacing for headings, paragraphs, lists
- Line-height and typography improvements
- Styled code blocks, blockquotes, tables, and links

Changes:
- Add @tailwindcss/typography to devDependencies
- Configure plugin in tailwind.config.ts
- Regenerate CSS with typography styles included
2026-02-02 20:54:18 -05:00
john-okeefe 59554d37f6 fix: update docs redirect to use lowercase index.md
Changed DocsHome redirect from /docs/INDEX.md to /docs/index.md
to match the renamed file.
2026-02-02 20:30:27 -05:00
john-okeefe 4866af24de docs: rename INDEX.md to index.md and update display name
- Renamed root INDEX.md to index.md (lowercase)
- Changed navigation title from "Documentation Index" to "Index"
- Removed caps lock for cleaner appearance
2026-02-02 20:28:24 -05:00
john-okeefe 35a039d720 docs: rename INDEX files to meaningful names and fix navigation
- Renamed subdirectory INDEX.md files to section-specific names:
  - user/INDEX.md → user/user-guide.md
  - developer/INDEX.md → developer/development.md
  - operations/INDEX.md → operations/operations.md
  - contributing/INDEX.md → contributing/contributing.md
  - developer/api/INDEX.md → developer/api/api-reference.md
  - developer/api/collections/INDEX.md → developer/api/collections/collections-api.md

- Updated all internal links to use new filenames
- Updated navigation.go to skip subdirectory INDEX files from sidebar
- Added Dockerfile to include docs directory in container build

This fixes the issue where multiple 'INDEX' links appeared in the sidebar,
making navigation confusing. Now each section has a descriptive name.
2026-02-02 20:25:18 -05:00
john-okeefe c194acf379 fix: update verify script to check git tracking, not file existence
The verification script was incorrectly flagging .env files that exist locally
but are properly gitignored. Now checks if files are tracked by git using
'git ls-files' instead of just checking file existence.

This prevents false positives when .env is in .gitignore and exists locally
for development but is not committed to the repository.
2026-02-02 20:13:57 -05:00
john-okeefe d1a8a62c08 docs: update password generation to use hex encoding
Change openssl rand commands from base64 to hex encoding to avoid
special characters that break URL parsing in database connection strings.

- JWT_SECRET: openssl rand -hex 32
- DBPASS: openssl rand -hex 16

Updated in:
- .env.example
- README.md
- docs/contributing/DEVELOPMENT.md
- docs/operations/troubleshooting.md
2026-02-02 20:13:05 -05:00
john-okeefe ab72c783ba docs: strengthen warning handling to prohibit auto-fix
- Change 'Review warnings, fix if appropriate' to 'Note warnings'
- Clarify warnings are informational only
- Explicitly prohibit auto-fixing warnings
- Align with verification script instruction: DO NOT automatically fix
- Warnings require explicit user permission to address
2026-02-02 16:53:58 -05:00
john-okeefe 62b02b6ed2 docs: clarify verification script error/warning handling
- Separate error fixing (required) from warning review (informational)
- Remove ambiguous 'warnings should be reviewed' phrasing
- Align with script instruction: do not auto-fix issues
- Make clear: errors must be fixed, warnings are for acknowledgment
2026-02-02 16:52:57 -05:00
john-okeefe 3a494fe703 docs: add verification script to pre-commit checklist
- Add 'Run verification script' as first step in Before Committing
- Add verification script to Phase Completion Verification
- Ensures guideline compliance before commits
- Catches errors early in development workflow
- Verification must pass (0 errors) before declaring complete
2026-02-02 16:52:10 -05:00
john-okeefe 343f8bbebf docs: add legacy notice to monolithic API reference
- Add warning banner to api-reference.md (1,600+ lines)
- Point users to new split endpoint documentation
- Recommend API Documentation Portal for interactive explorer
- Clarify this is kept for backward compatibility
- Resolves device content warnings (appropriate as legacy reference)
2026-02-02 16:50:45 -05:00
john-okeefe a89d5c599d feat: implement Hybrid SSR for bookshelf page
- Add LibraryData type to templates/types.go
- Update bookshelf template to accept libraries parameter
- Render libraries server-side for faster initial page load
- Libraries now populated from server data instead of AJAX fetch
- JavaScript still uses API for dynamic content (bookshelf items)
- Update /bookshelf route to fetch libraries server-side before render
- Properly handle UUID and pgtype.Text conversions
- Maintain API endpoint compatibility for JavaScript calls

This improves initial page load performance while preserving
dynamic functionality via API calls.
2026-02-02 16:46:45 -05:00
john-okeefe 7c4a37175b feat: add SSR data helpers to library handler
- Add GetUserVisibleLibrariesData() method for server-side rendering
- Add GetLibraryTypeData() method for SSR type fetching
- These helpers return data directly instead of JSON responses
- Enables Hybrid SSR pattern while preserving API endpoints
- Add context import for new methods
2026-02-02 16:46:22 -05:00
john-okeefe 0ee77f35e8 chore: enhance verification script with smart checks
- Add smart device content detection based on mention thresholds
- Check for README.md files in bruno directory (error)
- Update docs structure checks to match new paths (docs/developer/api, docs/user/devices)
- Add INFO-level warnings for moderate device mentions in docs
- Exclude README.md from device content placement checks
- Improve error recovery with better variable sanitization
2026-02-02 16:46:06 -05:00
john-okeefe 155b58aef6 docs: restructure documentation and update guidelines
- Update PROJECT_GUIDELINES.md to reflect current architecture (Hybrid SSR)
- Integrate service layer and SSR rules into existing sections
- Update README.md paths to match new docs structure (docs/developer/api, docs/user/devices)
- Remove redundant README.md files from bruno/ directories
- Update bruno/collection.bru documentation to current API standard
- Fix architectural pattern description from API-driven to Hybrid SSR
2026-02-02 16:45:59 -05:00
john-okeefe 253f56399d docs: restructure documentation into audience-based portals
BREAKING CHANGE: Documentation URLs have changed

New structure:
- user/ - End-user documentation (device setup, sync guides, frontend)
- developer/ - Developer documentation (API reference, protocols, specs)
- operations/ - Operations documentation (deployment, troubleshooting)
- contributing/ - Contribution guides

Changes:
- Created portal INDEX.md files for each audience section
- Moved device guides to user/devices/ (kobo-setup.md, koreader-setup.md)
- Moved API docs to developer/ (api-reference.md, collections-api.md)
- Moved sync guide to user/sync-guide.md
- Moved troubleshooting to operations/troubleshooting.md
- Moved all split API docs to developer/api/
- Renamed protocol files (kobo-protocol.md, koreader-protocol.md)
- Added placeholder user guides (frontend, user-areas, settings, admin)
- Updated all internal links to new paths
- Updated Go code (http_handler.go, navigation.go) for new paths
- Updated main INDEX.md for audience-based navigation

Benefits:
- Clear separation of user and developer documentation
- Scalable structure for future user guide expansion
- Better organization and discoverability
- Audience-specific landing pages

Related to DOCS_IMPLEMENTATION_PLAN.md Phase 2 completion
2026-02-02 15:58:34 -05:00
john-okeefe ece90c0f1f chore: prepare for documentation restructuring - backup state 2026-02-02 15:55:00 -05:00
john-okeefe ec74650c18 docs: add collections API endpoint files (Phase 2 completion) 2026-02-02 15:54:59 -05:00
john-okeefe a3a3d4ed40 docs: Expand verification scripts README with comprehensive examples
- Add complete enhanced output examples for all error/warning types
- Document verification script architecture and design principles
- Include content detection methods and data collection strategies
- Add comprehensive usage scenarios for development, CI/CD, AI workflows
- Provide advanced troubleshooting with debugging techniques
- Include performance optimization and edge case handling
- Demonstrate integration patterns for hooks and pipelines

This creates definitive documentation for verification system that
covers all enhanced outputs, usage patterns, and integration
methods, making scripts fully understandable and actionable for
both human developers and AI assistance.
2026-02-02 14:05:49 -05:00
john-okeefe 7da4373cc1 docs: Update verification scripts README with enhanced output documentation
- Document detailed error/warning output patterns
- Show examples of enhanced information provided
- Explain specific content found for each violation type
- Include examples for both errors and warnings
- Demonstrate improved user experience with actionable details

This documents the latest enhancement where verification scripts now
provide specific file paths, line numbers, and content details
instead of generic error messages, making issues easier to understand
and resolve for both humans and AI assistance.
2026-02-02 13:49:03 -05:00
john-okeefe c78e520f22 feat: Enhance verification scripts with detailed error/warning output
Enhanced Error/Warning Details:
- API content warnings now show actual lines found
- Build failures now display error logs
- Missing files now show expected locations
- Dockerfile warnings list found files
- Large commits now show specific commit details
- Git ignore issues display current contents

verify-guidelines.sh Comprehensive Documentation Validation:
- Check 12: Content placement validation (API patterns, device setup)
- Check 13: Structure validation (required directories, file counts)
- Check 14: Bruno API tests validation (coverage comparison)
- Full integration of comprehensive documentation checks
- Maintains AI behavior protocol across all operations

User Experience Improvement:
- All errors/warnings now include specific details
- Clear guidance on what was found and why it's an issue
- Verbose output helps identify false positives vs real violations
- Enables faster issue resolution without guesswork

This addresses user request for detailed error/warning information
instead of generic messages, making verification results actionable and
understandable for both humans and AI assistance.
2026-02-02 13:40:21 -05:00
john-okeefe 65b2ebfa9b feat: Enhance verification system with AI protocol and dual-script approach
Makefile Integration:
- Add make verify-quick target for critical-only checks
- Fix verify-guidelines target to call comprehensive script
- Clear separation of usage patterns

AI Behavior Protocol:
- Add comprehensive AI instructions to both scripts
- Enhanced error/warning functions with AI reminders
- Multi-layered safeguards prevent automatic fixing
- Protocol applies to ALL file modifications

verify-quick.sh Enhancements:
- Basic documentation structure validation
- API content placement detection in README.md
- Maintains fast performance for development

Documentation:
- Comprehensive scripts/README.md with usage guidelines
- Bruno API tests validation explained
- Troubleshooting and compliance sections
- Clear AI protocol instructions and examples

This provides dual-script approach: fast critical checks during development,
comprehensive validation for pre-commit/CI, with AI safety across all operations.
2026-02-02 12:56:41 -05:00
john-okeefe 65d3525d80 feat: Add documentation completeness validation
Check 16: Documentation Completeness Validation
- Detect orphaned documentation (files without proper markdown structure)
- Check for inconsistent file naming patterns in docs/api/
- Validate markdown formatting compliance
- Ensure documentation maintains structural integrity

This final check completes the comprehensive documentation validation
suite, ensuring all documentation files follow proper formatting
and naming conventions per PROJECT_GUIDELINES.md standards.
2026-02-02 11:34:51 -05:00
john-okeefe 8d31298861 feat: Add Bruno API tests and recent changes validation
Check 14: Bruno API Tests Validation
- Count and verify Bruno .bru test files presence
- Compare API documentation vs Bruno test coverage
- Flag insufficient test coverage for human review

Check 15: Recent Documentation Changes Analysis
- Analyze recent commits for documentation compliance
- Flag code commits without corresponding documentation updates
- Verify proper commit message format (docs: prefix)
- Ensure documentation stays synchronized with code changes

These checks provide comprehensive validation of API testing coverage
and ensure documentation follows proper git commit conventions
per PROJECT_GUIDELINES.md requirements.
2026-02-02 11:32:21 -05:00
john-okeefe 5deef46ef5 feat: Add high-recall documentation content and structure validation
Check 12: Documentation Content Placement
- Detect API patterns in README.md when docs/api/ exists
- Flag device setup content outside docs/devices/
- Identify development content outside docs/contributing/
- Monitor README.md length (>300 lines triggers warning)

Check 13: Documentation Structure Validation
- Verify required directories exist (docs/api, docs/devices, docs/contributing)
- Count and report API documentation files
- Validate device setup guides presence

These checks implement high-recall pattern detection to catch potential
documentation guideline violations for human review, ensuring content is
properly routed according to PROJECT_GUIDELINES.md decision table.
2026-02-02 11:30:55 -05:00
john-okeefe 3af4f3ea91 feat: Add AI behavior protocol to verification script
- Add comprehensive AI instructions at script start and end
- Enhance error/warning functions with AI reminders
- Multi-layered safeguards prevent automatic fixing
- Clear protocol: explain -> propose -> ask permission -> await response
- Instructions apply to ALL file modifications, not just verification issues

These safeguards ensure AI always asks permission before fixing any issues
found by the verification script, preventing automatic corrections of
potential false positives.
2026-02-02 11:30:00 -05:00
john-okeefe a3709dc38a docs: Update PROJECT_GUIDELINES documentation section
Update Documentation section to reflect new docs/ structure:
- Add comprehensive documentation location table
- Clarify when to use docs/ vs README.md
- Include workflow for documentation updates
- Update all checklist sections with documentation guidance

Changes:
- README.md: Setup/onboarding only
- docs/: User-facing features and workflows
- docs/api/: API reference and endpoints
- docs/devices/: Device setup guides
- docs/contributing/: Development documentation

Ensures documentation is properly organized and searchable
via the new docs system with Lunr.js search.
2026-02-02 10:38:00 -05:00
john-okeefe 3babfe520f Regenerate template Go files after CSS-to-Tailwind conversion
Regenerate all _templ.go files using templ generate after
removing custom <style> tags and converting to TailwindCSS.
Line numbers updated in error messages due to template changes.
2026-02-02 10:35:56 -05:00