Skip to content

pip-install-python/pip-documentation

Repository files navigation

Pip Install Python Documentation

A modern, responsive documentation system and package catalogue for custom Dash components, software, and research projects

Dash DMC Python License: MIT

A comprehensive documentation platform showcasing a collection of custom Dash components, software, and research projects maintained by Pip Install Python. This system serves as both a package catalogue and a reusable boilerplate for creating beautiful, interactive documentation with markdown-driven content, live code examples, and automatic theme persistence.

Documentation Preview


πŸ“¦ Package Catalogue

This documentation system showcases 18 custom Dash component libraries with comprehensive documentation, live examples, and download statistics:

Currently Maintained Components (11)

  • dash-summernote - Rich text WYSIWYG Editor
  • dash-insta-stories - Instagram Stories Component
  • dash-image-gallery - Image Gallery Component
  • dash-fullcalendar - Thin wrapper around FullCalendar
  • dash-gauge - Gauge Component
  • dash-emoji-mart - Slack-like Emoji Picker
  • dash-dock - Dynamic dock windows and tabs layout
  • dash-pannellum - 360 Panorama Viewer for Images and Video
  • dash-planet - Interactive orbital menu component
  • dash-model-viewer - 3D Model Viewer
  • dash-excalidraw - Freeform Drawing and Notebook Component

Archived Components (7)

  • dash-credit-cards, dash-charty, dash-nivo, dash-discord, dash-dynamic-grid-layout, dash-swiper, dash-fullcalendar

Total Downloads: Automatically aggregated from PyPI using the pypistats.org API and displayed on the home page.


✨ Features

πŸ“ Markdown-Driven Documentation

  • Write documentation in Markdown with Python integration
  • Custom directives for interactive examples, code highlighting, and component props
  • Automatic page generation from markdown files with frontmatter metadata
  • Table of contents generation for easy navigation

🎨 Modern UI/UX

  • Built with Dash Mantine Components
  • Responsive design for mobile, tablet, and desktop
  • Dark and light theme support with automatic preference persistence
  • Smooth transitions and professional styling
  • Customizable color schemes and theming
  • "Other Apps" menu - Quick navigation to related Pip Install Python projects (Plotly.pro, ai-agent.buzz, GeoMapIndex)

πŸ” Developer Experience

  • Hot reload during development
  • Searchable component navigation with custom page ordering
  • Syntax highlighting for multiple languages
  • Interactive code examples with live callbacks
  • Component props documentation auto-generation

πŸ“Š Package Analytics (NEW!)

  • Automatic download statistics - Real-time PyPI download counters for all packages
  • Total downloads aggregation - Automatically fetches and sums downloads across 18 packages
  • API integration - Uses pypistats.org API for accurate historical data
  • Visual presentation - Professional download counter displayed on home page
  • Smart error handling - Gracefully handles API failures with detailed logging

πŸ€– AI/LLM & SEO Integration (NEW!)

  • Automatic AI-friendly documentation - llms.txt, page.json, architecture.txt
  • SEO optimization - sitemap.xml with intelligent priority inference
  • Bot management - Control which bots can access your app (blocks AI training, allows AI search)
  • Structured data - Schema.org JSON-LD for better search engine understanding
  • Privacy controls - mark_hidden() for sensitive pages
  • Share with AI - Users can share your app URL with ChatGPT/Claude for help
  • Powered by dash-improve-my-llms v0.3.0

πŸ‹ Production Ready

  • Docker and docker-compose support
  • Gunicorn production server included
  • Optimized for deployment
  • Environment-based configuration

πŸš€ Built With Latest Technologies

  • Dash 3.2.0 - Modern Plotly Dash framework
  • DMC 2.4.0 - Dash Mantine Components
  • Mantine 8.3.6 - Beautiful React UI library
  • React 18 - Latest React features
  • Python 3.11+ - Modern Python

πŸ“‹ Requirements

System Requirements

  • Python: 3.11 or higher
  • Node.js: 14+ (for npm dependencies)
  • npm: 6+

Python Dependencies

  • dash >= 3.0.0
  • dash-mantine-components >= 2.4.0
  • flask >= 3.0.0
  • plotly >= 5.0.0
  • pandas >= 1.2.3
  • pydantic >= 2.3.0
  • python-frontmatter >= 1.0.0
  • markdown2dash
  • gunicorn >= 21.2.0 (production)

See requirements.txt for complete list.


πŸš€ Quick Start

1. Clone the Repository

git clone https://github.com/pip-install-python/Dash-Documentation-Boilerplate.git
cd Dash-Documentation-Boilerplate

2. Install Dependencies

Python packages:

pip install -r requirements.txt

Node packages (for DMC frontend components):

npm install

3. Run the Development Server

python run.py

Visit http://localhost:8553 in your browser.

4. Start Documenting!

Create your documentation in the docs folder:

docs/
β”œβ”€β”€ your-component/
β”‚   β”œβ”€β”€ your-component.md     # Markdown documentation
β”‚   └── examples.py           # Python code examples (optional)

πŸ“ Project Structure

dash-documentation-boilerplate/
β”œβ”€β”€ assets/                      # Static assets and CSS
β”‚   β”œβ”€β”€ dash_documentation_boilerplate.png
β”‚   β”œβ”€β”€ intro_img.png
β”‚   β”œβ”€β”€ m2d.css                 # Markdown-to-Dash styling
β”‚   └── main.css                # Custom styles
β”‚
β”œβ”€β”€ components/                  # Reusable UI components
β”‚   β”œβ”€β”€ appshell.py             # Main app layout with MantineProvider
β”‚   β”œβ”€β”€ header.py               # Header with search and theme toggle
β”‚   └── navbar.py               # Navigation sidebar and drawer
β”‚
β”œβ”€β”€ docs/                        # Documentation content
β”‚   └── example/
β”‚       β”œβ”€β”€ example.md          # Example documentation page
β”‚       └── introduction.py     # Example interactive component
β”‚
β”œβ”€β”€ lib/                         # Utility libraries
β”‚   β”œβ”€β”€ constants.py            # App-wide constants
β”‚   └── directives/             # Custom markdown directives
β”‚       β”œβ”€β”€ kwargs.py           # Component props table generator
β”‚       β”œβ”€β”€ source.py           # Source code display directive
β”‚       └── toc.py              # Table of contents directive
β”‚
β”œβ”€β”€ pages/                       # Dash multi-page app pages
β”‚   β”œβ”€β”€ home.md                 # Home page content
β”‚   β”œβ”€β”€ home.py                 # Home page layout
β”‚   β”œβ”€β”€ download_counter.py     # PyPI download statistics aggregator
β”‚   └── markdown.py             # Dynamic markdown page loader
β”‚
β”œβ”€β”€ templates/
β”‚   └── index.html              # Custom HTML template
β”‚
β”œβ”€β”€ .gitignore
β”œβ”€β”€ CHANGELOG.md                # Version history and changes
β”œβ”€β”€ Dockerfile                  # Docker container definition
β”œβ”€β”€ docker-compose.yml          # Docker compose configuration
β”œβ”€β”€ package.json                # Node.js dependencies
β”œβ”€β”€ package-lock.json           # Locked npm versions
β”œβ”€β”€ README.md                   # This file
β”œβ”€β”€ requirements.txt            # Python dependencies
└── run.py                      # Application entry point

πŸ“– Usage Guide

Creating Documentation Pages

  1. Create a new folder in the docs/ directory:

    mkdir -p docs/my-component
  2. Create a markdown file with frontmatter:

    ---
    name: My Component
    description: A description of my component
    endpoint: /components/my-component
    icon: mdi:code-tags
    ---
    
    ## My Component
    
    Your documentation content here...
  3. Add interactive examples (optional):

    # docs/my-component/example.py
    import dash_mantine_components as dmc
    
    component = dmc.Button("Click Me!", id="my-button")
  4. Use directives in your markdown:

    .. toc::
    
    .. exec::docs.my-component.example
    
    .. source::docs/my-component/example.py

Custom Markdown Directives

.. toc::

Generates a table of contents from your markdown headings.

.. exec::module.path.to.component

Renders an executable Python component from a module.

.. source::path/to/file.py

Displays source code with syntax highlighting.

.. kwargs::ComponentName

Generates a props documentation table for a component.

Customizing Themes

Modify lib/constants.py to change the primary color:

PRIMARY_COLOR = "teal"  # Change to any Mantine color

Customize CSS in:

  • assets/main.css - General styling
  • assets/m2d.css - Markdown-specific styling

Theme Persistence

The boilerplate automatically saves user theme preference (light/dark) in localStorage:

  • First visit: Detects browser preference or defaults to light
  • Theme toggle: Saves preference automatically
  • Return visits: Restores saved theme preference

🐳 Docker Deployment

Build the Docker Image

docker build -t dash-docs-boilerplate .

Run with Docker

docker run -p 8550:8550 dash-docs-boilerplate

Visit http://localhost:8550

Using Docker Compose

docker-compose up

The app will be available at http://localhost:8550

Production Deployment

The Docker container uses Gunicorn for production-ready serving:

  • Multiple workers for better performance
  • Automatic worker restart on failure
  • Suitable for production environments

πŸ› οΈ Development

Setting Up Development Environment

  1. Create virtual environment:

    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  2. Install dependencies:

    pip install -r requirements.txt
    npm install
  3. Run in debug mode:

    # Modify run.py
    app.run(debug=True, host='0.0.0.0', port='8553')

Adding New Components

  1. Create your component in a separate module
  2. Add documentation in docs/your-component/
  3. The app automatically discovers and registers pages from markdown files
  4. Restart the server to see your new documentation

Modifying the Layout

Main layout components:

  • Header: components/header.py - Logo, search, theme toggle
  • Navbar: components/navbar.py - Sidebar navigation
  • AppShell: components/appshell.py - Overall layout structure

πŸ”§ Configuration

Environment Variables

Create a .env file (optional):

DASH_DEBUG=False
DASH_HOST=0.0.0.0
DASH_PORT=8553

Customization Points

File Purpose
lib/constants.py App-wide constants (colors, titles)
assets/main.css Custom CSS styles
templates/index.html HTML template (for analytics, meta tags)
components/appshell.py Theme configuration, MantineProvider settings

πŸ“š Documentation

User Documentation

  • Getting Started: This README
  • Changelog: See CHANGELOG.md
  • Examples: Check the /docs/example/ folder

🀝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Test thoroughly: Ensure the app runs without errors
  5. Commit your changes: git commit -m 'Add amazing feature'
  6. Push to the branch: git push origin feature/amazing-feature
  7. Open a Pull Request

Development Guidelines

  • Follow PEP 8 style guide for Python code
  • Add docstrings to functions and classes
  • Test your changes before submitting
  • Update documentation if adding new features
  • Keep commits atomic and well-described

πŸ› Known Issues & Troubleshooting

Common Issues

Issue: ModuleNotFoundError: No module named 'dash_html_components'

  • Solution: You're using an old version. Update to 0.2.0+ which uses Dash 3.x

Issue: Theme doesn't persist

  • Solution: Check browser localStorage is enabled and not blocked

Issue: npm install fails

  • Solution: Update Node.js to 14+ and npm to 6+

Issue: Port already in use

  • Solution: Change port in run.py or stop the conflicting process

For more issues, check GitHub Issues


πŸ“Š Version Information

Current Version: 0.3.0

Component Version
Dash 3.2.0
Dash Mantine Components 2.4.0
Mantine 8.3.6
Python 3.11.8+
React 18.2.0
Flask 3.1.2
dash-improve-my-llms 0.3.0

See CHANGELOG.md for version history.

What's New in 0.3.0

  • ✨ Comprehensive Documentation: 5 detailed guides with 15+ working examples
  • 🎨 Enhanced Theme System: DMC figure templates, theme-aware charts, code blocks
  • 🎯 Production Ready: SEO-optimized HTML template with extensive developer guidance
  • πŸ“Š Better UX: Custom navigation order, improved typography, consistent spacing
  • πŸ”§ All Plotly Charts Theme-Aware: Dynamic template switching in light/dark modes

Recent Additions (Post 0.3.0)

  • πŸ“Š PyPI Download Counter - Real-time aggregation of downloads across all 18 packages via pypistats.org API
  • πŸ“š Enhanced Component Documentation - Comprehensive rewrites for dash-emoji-mart, dash-insta-stories, and dash-dock
  • 🎯 Package Catalogue Home Page - Side-by-side comparison table for active vs. archived components with custom badges
  • πŸ”— "Other Apps" Navigation Menu - Quick access to Plotly.pro, ai-agent.buzz, and GeoMapIndex
  • πŸ› Bug Fixes - Fixed type errors, typos, and improved component property documentation

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

Built With

Inspired By

  • dmc-docs - Documentation framework inspiration

Special Thanks

  • @AnnMarieW for suggested improvements
  • The Dash community for continuous support

πŸ“ž Support & Community

Get Help

Discord Invite

Stay Connected

GitHub: @pip-install-python GitHub Followers

YouTube: Pip Install Python YouTube Subscribers


Want to Contribute?

Check out open issues labeled good first issue


⬆ Back to Top

Made with ❀️ by the Dash community

Pip Install Python LLC @ https://plotly.pro

Star this repo if you find it useful! ⭐

About

Home for https://pip-install-python.com and custom dash components

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •