A comprehensive wiki and knowledge management system designed for IT Managed Service Providers (MSPs) to manage multiple organizations.
- Multi-Organization Support: Manage multiple client organizations from a single platform
- Role-Based Access Control (RBAC):
- Global Admin: Full system access
- Account Manager / IT Admin: Organization-level admin access
- IT Basic: Limited read/write access within organization
- Documentation Module: Markdown-based wiki with live preview, image paste support, and PDF export
- Contacts Management: Store and manage organization contacts with emergency contact flagging
- Password Manager: Encrypted password storage with 2FA secret support and QR code parsing
- Global Search: Real-time search across documents, contacts, and passwords with contextual results
- Activity Logging: 90-day audit trail with IP address tracking
- Database Backups: Automatic weekly backups (configurable) with manual backup/restore capabilities
- Auto-Migrations: Automatic schema migration on startup
- Google reCAPTCHA v2: Optional reCAPTCHA protection for login page
- IP Whitelist: Optional IP-based access control
- Recent Visits: Quick access to recently viewed items
- Backend: Flask (Python)
- Database: MySQL 8.0
- Frontend: Bootstrap 5, Modern JavaScript (ES6+)
- Markdown Editor: EasyMDE
- PDF Export: WeasyPrint
- Encryption: Fernet (cryptography library)
- Containerization: Docker Compose
-
Clone the repository
git clone <repository-url> cd infogarden
-
Set up environment variables
Create a
.envfile in the project root with the following variables:Required:
SECRET_KEY: A random secret key for Flask sessionsENCRYPTION_KEY: A Fernet encryption key (generate with:python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())")
Database Connection (choose one method):
Option 1: Full connection string
DATABASE_URL=mysql+pymysql://user:password@host:port/database
Option 2: Individual components (recommended for Docker)
DB_HOST=localhost # or 'db' when using docker-compose DB_PORT=3306 DB_USER=infogarden DB_PASSWORD=your_password DB_NAME=infogardenOptional:
FLASK_ENV: Set toproductionfor production deploymentsFLASK_PORT: Port for the web service (default: 5000)BACKUP_ENABLED: Enable/disable automatic backups (default: true)BACKUP_DAY: Day of week for backups (default: sunday)BACKUP_HOUR: Hour for backups (default: 0)BACKUP_MINUTE: Minute for backups (default: 0)BACKUP_RETENTION_DAYS: Days to keep backups (default: 30)
-
Start with Docker Compose
docker-compose up -d
-
Access the application
- Open http://localhost:5000
- Create a global admin user via database or initial setup script
For detailed Docker deployment instructions, including running without docker-compose, see DOCKER.md.
infogarden/
├── app/
│ ├── core/ # Core functionality (auth, models, encryption, etc.)
│ ├── modules/ # Feature modules (orgs, users, docs, contacts, passwords, search)
│ ├── templates/ # Jinja2 templates
│ ├── static/ # Static files (CSS, JS, uploads)
│ └── backups/ # Database backups
├── docker-compose.yml
├── Dockerfile
└── requirements.txt
The application uses a modular architecture where each feature module has its own:
models.py: SQLAlchemy modelsroutes.py: Flask route handlers- Templates in
templates/modules/<module_name>/
Modules are dynamically loaded on application startup.
The system includes automatic migration detection and application on startup. It will:
- Detect new columns in models and add them to the database
- Safely handle schema changes
- Only drop columns if explicitly removed from models (safety measure)
- Automatic Backups: Configurable weekly backups (default: Sunday at midnight)
- Manual Backups: Create backups on-demand from Settings
- Backup Management: View, download, and restore backups from the Settings page
- Retention: Configurable backup retention period (default: 30 days)
- Password encryption using Fernet
- CSRF protection (Flask-WTF)
- SQL injection prevention (SQLAlchemy parameterized queries)
- XSS prevention (Jinja2 auto-escaping)
- Activity logging with IP addresses
- Role-based access control at route and template level
- Google reCAPTCHA v2 support for login protection
- IP whitelist for restricted access control
To run in development mode:
python run.py[Your License Here]