Skip to content

Add comprehensive developer documentation and MCP server#1

Open
ibrahimozkn wants to merge 1 commit into
mainfrom
feat/developer-documentation
Open

Add comprehensive developer documentation and MCP server#1
ibrahimozkn wants to merge 1 commit into
mainfrom
feat/developer-documentation

Conversation

@ibrahimozkn
Copy link
Copy Markdown
Contributor

Summary

  • 39 new MDX documentation pages under docs/06-development/ replacing the placeholder "check our GitHub" page
  • MCP server plugin (docusaurus-plugin-mcp-server) to expose documentation to AI agents via Model Context Protocol
  • Mermaid diagram support (@docusaurus/theme-mermaid) for rendering architecture and flow diagrams
  • "Development" link added to the Learning Center navbar dropdown

Documentation Structure

Section Pages Coverage
Domain Model 4 N-of-1 trial concepts, entity glossary (Study, Intervention, Observation, Subject, etc.), ERD diagrams, Vitamin D walkthrough example
Architecture 6 System overview, monorepo/Melos structure, Provider vs Riverpod patterns, Supabase backend (auth, schema, RLS, storage), offline sync with conflict resolution, full data flow diagrams
App Reference 3 Complete participant app screen flow with file paths, task completion system, reusable widget reference
Designer Reference 4 Researcher app navigation map, all design tabs with controller files, management screens (Test, Recruit, Monitor, Analyze), form auto-save architecture
Local Setup 6 Prerequisites, clone/bootstrap, Docker/Supabase setup, running apps, environment configuration, code generation workflow
Development Workflow 4 Edit-build-test cycle, Conventional Commits format, Android Studio/VS Code setup, troubleshooting guide (13 issues)
Database Reference 3 All 8 tables with column types, Row Level Security policies and security helper functions, migration guide
JSON Schema Reference 8 Complete JSON structure for every model — Study root object, all 10 question types, 6 expression types, 5 report section types, SubjectProgress/Result payloads

Configuration Changes

  • docusaurus.config.js:
    • Added markdown: { mermaid: true } and themes: ['@docusaurus/theme-mermaid']
    • Added docusaurus-plugin-mcp-server plugin (server name: studyu-docs)
    • Changed trailingSlash: falsetrue (required for MCP plugin route discovery)
    • Added "Development" item to Learning Center navbar dropdown
  • package.json: Added docusaurus-plugin-mcp-server and @docusaurus/theme-mermaid dependencies

MCP Server

The MCP plugin generates search artifacts at build time in build/mcp/:

  • docs.json — 73 indexed documents (all docs pages)
  • search-index.json — FlexSearch index for full-text search
  • manifest.json — Build metadata

AI agents can use the docs_search and docs_fetch MCP tools to query the documentation programmatically.

Build Verification

  • npm run build passes cleanly for both EN and DE locales
  • npx docusaurus-mcp-verify passes all checks (73 documents indexed)

Breaking Change Note

trailingSlash changed from false to true. This means URLs change from /docs/overview to /docs/overview/. Docusaurus handles redirects for this, but any hardcoded external links to the old URL format should be verified.

Test plan

  • Run npm run build — verify clean build
  • Run npm run serve — verify docs render with Mermaid diagrams
  • Navigate Learning Center → Development — verify link works
  • Check sidebar navigation through all 8 documentation sections
  • Run npx docusaurus-mcp-verify — verify MCP artifacts
  • Verify existing docs pages still work with trailing slash change

🤖 Generated with Claude Code

Replace the placeholder development page with 39 MDX documentation
pages covering the full StudyU architecture, domain model, setup
guides, and API references. Add MCP server plugin to expose docs
to AI agents, and Mermaid theme for diagram rendering.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant