A comprehensive whitepaper outlining our advanced multi-tenant SaaS platform that revolutionizes how enterprises deploy, manage, and scale ERP systems with AI-driven automation, seamless provisioning, and enterprise-grade security.
Comprehensive data structure for enterprise management
RESTful API for seamless integration and automation
Automated deployment and management scripts
Enterprise-grade reliability and availability
Our platform is a standalone, multi-tenant SaaS architecture built from the ground up. It serves as the foundation engine that can automatically generate, deploy, and manage complete ERP systems like ERPNext and Odoo as fully isolated tenant instances.
Multi‑tenant management, billing, users, automation
Generates fresh ERP instances (ERPNext, Odoo, etc.)
Fully isolated ERP systems for each customer
The Managely SaaS Platform is a robust, scalable solution designed to manage the complete lifecycle of ERP system deployments with advanced SaaS management capabilities.
Built with modern web technologies, the platform supports multi-tenancy, role-based access control, geo-based access control, and seamless integration with external services. It handles everything from user registration and authentication to subscription management, automated deployment, license validation, add-on marketplace, and maintenance scheduling.
Comprehensive data structure for enterprise management
RESTful API for seamless integration
WebSocket support for live updates
Automated job processing system
This platform consists of three integrated projects:
Allows users to create systems and view project details and packages.
Provides full SaaS management and control with comprehensive features.
Background processing system for automated operations and scheduled tasks.
| Component | Technology |
|---|---|
| Backend Framework | Flask (Python 3.9+) |
| Database | PostgreSQL 13+ |
| Caching | Redis |
| Frontend | Bootstrap 5, JavaScript |
| Real-time | Socket.IO, WebSockets |
| Task Queue | APScheduler |
| Authentication | JWT, OAuth 2.0 |
| Deployment | Automated Deployment Scripts |
Comprehensive security layer with license validation and multiple authentication methods.
def _ensure_license(app, fatal=False):
try:
ok, status, _, msg = _validate_now(app)
_LIC_CACHE["validate"].update({
"ts": time.time(),
"valid": ok,
"status": status,
"expiry": None,
"msg": msg
})
if not ok:
_quiet_log("License invalid or expired.")
if fatal:
time.sleep(0.2)
os._exit(3)
return ok
except Exception:
_quiet_log("License check failed.")
if fatal:
time.sleep(0.2)
os._exit(3)
return False
Flexible billing system supporting multiple payment methods and subscription models.
def process_invoice_payment(invoice):
# Check wallet balance
wallet = Wallet.query.filter_by(user_id=invoice.user_id).first()
if float(wallet.balance or 0.0) < float(invoice.amount or 0.0):
return {"error": "Insufficient wallet balance"}
# Mark invoice paid
invoice.status = 'paid'
# Activate subscription
if invoice.subscription:
subscription.status = 'active'
# Deduct wallet and create transaction
wallet.balance -= invoice.amount
transaction = WalletTransaction(...)
db.session.add(transaction)
db.session.commit()
return {"success": True}
Background job processing system for automated operations and scheduled tasks.
def claim_next_operation(status='pending'):
# Check maintenance status
if is_maintenance_active():
logger.info(f"[{WORKER_ID}] Maintenance active, skipping.")
return None
# Query with row locking for concurrent safety
candidate = (
db.session.query(SaaSOperation)
.filter_by(status=status)
.order_by(priority_order, SaaSOperation.created_at.asc())
.with_for_update(skip_locked=True)
.first()
)
if candidate:
# Update operation status
candidate.status = 'in_progress'
candidate.started_at = datetime.now(timezone.utc)
db.session.commit()
return candidate
return None
Extensible add-on system with installation tracking and availability rules.
def install_app_by_portal():
# Validate add‑on and launch eligibility
addon = AddonApp.query.get_or_404(addon_app_id)
launch = Launch.query.filter_by(domain_url=launch_domain).first_or_404()
# Business rule checks
if addon.requires_paid_subscription and not user_package:
return jsonify({"error": "Paid subscription required"}), 403
# Create installation record
new_install = UserInstalledAddon(
user_id=launch.user_id,
addon_app_id=addon.id,
launch_id=launch.id,
install_session_id=secrets.token_hex(8),
status='inprogress'
)
# Queue SaaS operation
new_op = SaaSOperation(
operation_type='INSTALL_ADDON',
script_name='install_app_by_portal.sh',
status='pending'
)
db.session.add_all([new_install, new_op])
db.session.commit()
return jsonify({"success": True, "message": "Installation queued"})
CREATE TABLE users (
id SERIAL PRIMARY KEY,
email VARCHAR(255) UNIQUE NOT NULL,
google_id VARCHAR(255),
referral_code VARCHAR(50),
is_staff INTEGER DEFAULT 0,
is_active BOOLEAN DEFAULT true,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE saas_operations (
id SERIAL PRIMARY KEY,
operation_type VARCHAR(100),
script_name VARCHAR(255),
arguments TEXT,
status VARCHAR(50) DEFAULT 'pending',
priority VARCHAR(20) DEFAULT 'medium',
assigned_worker_id VARCHAR(50),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE subscriptions (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users(id),
package_id INTEGER REFERENCES packages(id),
status VARCHAR(50) DEFAULT 'waiting_payment',
price DECIMAL(10,2),
start_date TIMESTAMP,
end_date TIMESTAMP,
auto_renew BOOLEAN DEFAULT true
);
# Database Configuration
DATABASE_URL=postgresql://user:pass@localhost/XYZ
SECRET_KEY=XYZ
# Worker Configuration
WORKER_ID=worker-01
WORKER_MODE=public
CHECK_INTERVAL=5
# External Services
LICENSE_VALIDATE_URL=XYZ
GEOIP_DB_PATH=XYZ
# Feature Flags
BLOCK_NEW_USERS_BY_COUNTRY=True
ENABLE_WHATSAPP_VERIFICATION=True
ENABLE_GOOGLE_OAUTH=True
# Cache TTLs (seconds)
LIC_VALIDATE_TTL_SECONDS=604800 # 7 days
USER_SESSION_TTL=86400 # 24 hours
# Performance Settings
MAX_DATABASE_CONNECTIONS=20
BACKGROUND_WORKER_THREADS=4
Experience how our technology deploys a full ERP system in minutes. A real, hands-on preview of the engine powering our SaaS architecture.
If you're developing your core SaaS/ERP platform and need:
The technology you see here is the same foundation we use for custom enterprise solutions