A Flask-based web application for viewing and browsing Jupyter notebooks from a JupyterHub shared directory. Features a responsive web interface with directory navigation, notebook preview, and download capabilities.
Features
📁 Directory Navigation - Browse through nested directories with breadcrumb navigation
📄 Notebook Viewing - Convert and display Jupyter notebooks as HTML in the browser
⬇️ Download Support - Direct download of notebook files
🎨 Responsive Design - Bootstrap-based UI that works on desktop and mobile
🔒 Security - Path traversal protection and configurable access controls
🛠️ Configurable - All settings configurable via environment variables
🐳 Docker Support - Ready-to-use Docker containers and compose files
❄️ Nix Development - Complete Nix flake for reproducible development
Quick Start
Using Nix (Recommended)
bash
# Enter development environment
nix develop
# Set up the environment (first time only)
setup-dev
# Start development server
dev-server
Using Docker
bash
# Copy and configure environment
cp .env.example .env
# Edit .env with your settings
# Start with Docker Compose
docker-compose up
Manual Installation
bash
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env with your settings
# Start the application
python app.py
Configuration
All configuration is done via environment variables, typically in a .env file:
Core Settings
JUPYTERHUB_SHARED_DIR - Path to the shared notebook directory (default: /shared)
APP_TITLE - Application title shown in the interface
Flask Settings
FLASK_HOST - Host to bind to (default: 0.0.0.0)
FLASK_PORT - Port to run on (default: 5000)
FLASK_DEBUG - Enable debug mode (default: True)
FLASK_SECRET_KEY - Secret key for sessions (change in production!)
File Handling
MAX_FILE_SIZE - Maximum file size in bytes (default: 16777216 = 16MB)
NOTEBOOKS_PER_PAGE - Maximum notebooks to show per directory (default: 50)
ALLOWED_EXTENSIONS - Comma-separated list of allowed file extensions (default: .ipynb,.py,.md)