mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-06-17 23:09:35 +00:00
ADDED MODULES: - intelligence/icp.py: ICP Builder — 34 Saudi industries, Arabic+English queries - intelligence/discovery.py: Multi-source discovery — web search + 34 seed companies - intelligence/enrichment.py: Company/person enrichment — website data + news - intelligence/scoring.py: 5-dimension scoring — Fit/Intent/Access/Value/Urgency - intelligence/entity_resolution.py: Arabic/English dedup + fuzzy matching - intelligence/outreach.py: Arabic-first outreach — WhatsApp/Email/LinkedIn - intelligence/triggers.py: Trigger alerts — funding/hiring/expansion/IPO - intelligence/pipeline.py: End-to-end orchestrator — ICP→Discovery→Score→Brief - routes/intelligence.py: 15 REST endpoints + audit chain integration - DB: 5 new tables — intelligence_leads/runs/watchlist/triggers/entities ARCHITECTURE: - Layer 1: Signal collection (web + curated Saudi B2B DB of 34 companies) - Layer 2: Enrichment (website data, news, tech stack detection) - Layer 3: 5D scoring — Master = 0.30 Fit + 0.25 Intent + 0.15 Access + 0.20 Value + 0.10 Urgency - Layer 4: Entity resolution — Arabic/English fuzzy dedup - Layer 5: Outreach brief — signal-driven WhatsApp/Email/LinkedIn in Arabic MOTION SUPPORT: B2B sales | partnership | channel | tender
65 lines
2.3 KiB
Python
65 lines
2.3 KiB
Python
"""Dealix Sovereign Revenue, Deal, Growth & Commitment OS — Backend"""
|
|
from flask import Flask, jsonify
|
|
from flask_cors import CORS
|
|
|
|
from app.core.database import init_db
|
|
from app.api.routes.auth import auth_bp
|
|
from app.api.routes.revenue import revenue_bp
|
|
from app.api.routes.pricing import pricing_bp
|
|
from app.api.routes.partnership import partnership_bp
|
|
from app.api.routes.procurement import procurement_bp
|
|
from app.api.routes.renewal import renewal_bp
|
|
from app.api.routes.expansion import expansion_bp
|
|
from app.api.routes.ma import ma_bp
|
|
from app.api.routes.pmo import pmo_bp
|
|
from app.api.routes.executive import executive_bp
|
|
from app.api.routes.intelligence import intelligence_bp
|
|
|
|
app = Flask(__name__)
|
|
CORS(app, resources={r"/*": {"origins": "*"}}, supports_credentials=True)
|
|
|
|
# Register all 9 OS blueprints
|
|
app.register_blueprint(auth_bp)
|
|
app.register_blueprint(revenue_bp)
|
|
app.register_blueprint(pricing_bp)
|
|
app.register_blueprint(partnership_bp)
|
|
app.register_blueprint(procurement_bp)
|
|
app.register_blueprint(renewal_bp)
|
|
app.register_blueprint(expansion_bp)
|
|
app.register_blueprint(ma_bp)
|
|
app.register_blueprint(pmo_bp)
|
|
app.register_blueprint(executive_bp)
|
|
app.register_blueprint(intelligence_bp) # Revenue Intelligence OS — Lead Machine
|
|
|
|
@app.get("/api/health")
|
|
def health():
|
|
from app.core.database import db
|
|
with db() as conn:
|
|
count = conn.execute("SELECT COUNT(*) as c FROM audit_log").fetchone()["c"]
|
|
modules = conn.execute("SELECT COUNT(DISTINCT module) as m FROM audit_log").fetchone()["m"]
|
|
return jsonify({
|
|
"status": "healthy",
|
|
"database": "connected",
|
|
"audit_entries": count,
|
|
"active_modules": modules,
|
|
"modules": [
|
|
"Revenue OS", "Pricing & Margin Control OS", "Partnership & Alliance OS",
|
|
"Procurement & Vendor OS", "Renewal & Expansion OS", "Market Entry OS",
|
|
"M&A Corporate Development OS", "PMI Strategic PMO OS", "Executive Board OS"
|
|
]
|
|
})
|
|
|
|
@app.get("/")
|
|
def root():
|
|
return jsonify({
|
|
"product": "Dealix",
|
|
"tagline": "Sovereign Revenue, Deal, Growth & Commitment OS",
|
|
"version": "2.0.0",
|
|
"modules": 9,
|
|
"docs": "/api/health"
|
|
})
|
|
|
|
if __name__ == "__main__":
|
|
init_db()
|
|
app.run(host="0.0.0.0", port=8000, debug=False)
|