172 lines
6.6 KiB
Python
Executable file
172 lines
6.6 KiB
Python
Executable file
#!/usr/bin/env python3
|
||
# -*- coding: utf-8 -*-
|
||
"""
|
||
Prepare Master JSON Database for Hamed & Mohadese Executive Cockpit
|
||
"""
|
||
|
||
import json
|
||
import os
|
||
|
||
BASE_DIR = "/workspace/hameds_executive_cockpit"
|
||
DATA_FILE = os.path.join(BASE_DIR, "data_store.json")
|
||
|
||
# 1. Load Extracted Investment
|
||
with open('/workspace/mindroo_data/extracted_investment.json', 'r', encoding='utf-8') as f:
|
||
inv_data = json.load(f)
|
||
|
||
# 2. Load existing data_store.json to preserve game4 tasks and branches
|
||
with open(DATA_FILE, 'r', encoding='utf-8') as f:
|
||
existing = json.load(f)
|
||
|
||
existing_mindroo = existing.get("mindroo", {})
|
||
|
||
master_store = {
|
||
"system_meta": {
|
||
"title": "Executive Operations Cockpit",
|
||
"subtitle": "مرکز فرماندهی عملیات و مدیریت اجرایی مدیرعامل | محدثه معصومی و حامد فلاحی",
|
||
"version": "2.1.0",
|
||
"theme_mode": "dark",
|
||
"last_sync": "2026-09-20T19:30:00Z"
|
||
},
|
||
"auth": {
|
||
"users": {
|
||
"mohadese": {
|
||
"username": "mohadese",
|
||
"name": "محدثه معصومی",
|
||
"role": "دستیار ارشد اجرایی مدیرعامل (Chief Executive Assistant)",
|
||
"avatar": "👩💼",
|
||
"password": "Mohadese@1404",
|
||
"workspace": "mohadese"
|
||
},
|
||
"hamed": {
|
||
"username": "hamed",
|
||
"name": "حامد فلاحی",
|
||
"role": "مدیرعامل و همبنیانگذار (CEO & Co-Founder)",
|
||
"avatar": "👨💼",
|
||
"password": "Hamed@1404",
|
||
"workspace": "hamed"
|
||
}
|
||
},
|
||
"finance_pin": "4311",
|
||
"telegram_bot": {
|
||
"token": "8808629942:AAE2enGoLit6DX4jJs4SWQzTrgGs1lt_pa4",
|
||
"bot_username": "assistant_hf_bot",
|
||
"bot_name": "Hamed Assistant",
|
||
"is_active": True,
|
||
"subscribers": {
|
||
"mohadese_chat_id": "",
|
||
"hamed_chat_id": ""
|
||
}
|
||
}
|
||
},
|
||
"audit_trail": [
|
||
{
|
||
"id": "aud-1",
|
||
"timestamp": "1404/06/30 - 18:45",
|
||
"actor": "محدثه معصومی",
|
||
"action": "راهاندازی ریدیزاین مدرن",
|
||
"details": "بازطراحی جامع سیستم بر مبنای استانداردهای دستیاران اجرایی کلاس جهانی (Linear/Raycast Vibe)",
|
||
"changed_by_hamed": False
|
||
},
|
||
{
|
||
"id": "aud-2",
|
||
"timestamp": "1404/06/30 - 19:10",
|
||
"actor": "سیستم",
|
||
"action": "اتصال بات تلگرام",
|
||
"details": "بات تلگرام assistant_hf_bot متصل شد و گیت هشدارها آماده فعالیت است.",
|
||
"changed_by_hamed": False
|
||
}
|
||
],
|
||
"adhd_coping_system": {
|
||
"checkin_prompts": [
|
||
{
|
||
"id": "chk-1",
|
||
"meeting_title": "جلسه با مدیریت نیایش مال",
|
||
"scheduled_time": "14:00",
|
||
"status": "pending_checkin",
|
||
"prompt_text": "جلسه ساعت ۱۴:۰۰ در نیایش مال تشکیل شد؟",
|
||
"response": None,
|
||
"notes": "در صورت عدم تشکیل، وضعیت به استعلام محدثه تغییر مییابد."
|
||
}
|
||
],
|
||
"buffer_settings": {
|
||
"default_buffer_minutes": 20,
|
||
"max_daily_focus_hours": 5.5,
|
||
"warn_back_to_back": True
|
||
}
|
||
},
|
||
"telegram_triage": {
|
||
"quick_ack": [],
|
||
"holding_queue": [],
|
||
"escalate_to_ceo": []
|
||
},
|
||
"calendar_events": [],
|
||
"calls_log": [],
|
||
"ekeepa": {
|
||
"tasks": []
|
||
},
|
||
"houshyar24": {
|
||
"hamed_board": [],
|
||
"mohadese_board": []
|
||
},
|
||
"gamification_events": {
|
||
"projects": []
|
||
},
|
||
"blue_bank": {
|
||
"account_holder": "حامد فلاحی",
|
||
"card_number_masked": "۶۲۱۹-۸۶۱۰-****-****",
|
||
"balance": 0,
|
||
"monthly_spent": 0,
|
||
"transactions": []
|
||
},
|
||
"loans": [],
|
||
"cloud_drive_vault": {
|
||
"api_integration": {
|
||
"status": "فضای تعبیهشده جهت دریافت API Key یا Service Account گوگل",
|
||
"client_id": "",
|
||
"service_account_email": "",
|
||
"is_connected": False
|
||
},
|
||
"folders": [
|
||
{
|
||
"id": "f-digishahr",
|
||
"title": "پرونده وام دیجیشهر",
|
||
"gdrive_url": "https://drive.google.com/drive/folders/1kPIdJWuAPknXAHJPinfolK6Uot5UKr-z",
|
||
"category": "بانک و تسهیلات",
|
||
"description": "مدارک هویتی، سفته الکترونیک، گواهی کسر از حقوق و پرینت حساب",
|
||
"files_count": 0
|
||
},
|
||
{
|
||
"id": "f-rasalat",
|
||
"title": "پرونده وام قرضالحسنه رسالت",
|
||
"gdrive_url": "https://drive.google.com/drive/folders/1kPIdJWuAPknXAHJPinfolK6Uot5UKr-z",
|
||
"category": "بانک و تسهیلات",
|
||
"description": "نتیجه رتبهبندی اعتباری مرآت، فرم افتتاح حساب و سفته آیکاپ",
|
||
"files_count": 0
|
||
},
|
||
{
|
||
"id": "f-mindroo-sheets",
|
||
"title": "پوشه شیتهای حسابداری و سرمایهگذاری مایندرو",
|
||
"gdrive_url": "https://drive.google.com/drive/folders/1kPIdJWuAPknXAHJPinfolK6Uot5UKr-z",
|
||
"category": "مایندرو",
|
||
"description": "فایلهای اکسل حقوق پرسنل، هزینههای جاری، مدارس، شیفتها و سرمایهگذاری",
|
||
"files_count": 7
|
||
}
|
||
]
|
||
},
|
||
"mindroo": {
|
||
"investors": inv_data["investors"],
|
||
"monthly_p_and_l": inv_data["p_and_l"],
|
||
"game4_launch": existing_mindroo.get("game4_launch", {}),
|
||
"branches": existing_mindroo.get("branches", {}),
|
||
"supervisors": existing_mindroo.get("supervisors", {}),
|
||
"salaries_sample": existing_mindroo.get("salaries_sample", []),
|
||
"expenses_sample": existing_mindroo.get("expenses_sample", []),
|
||
"schools_sample": existing_mindroo.get("schools_sample", [])
|
||
}
|
||
}
|
||
|
||
with open(DATA_FILE, "w", encoding="utf-8") as f:
|
||
json.dump(master_store, f, ensure_ascii=False, indent=2)
|
||
|
||
print(f"Successfully generated {DATA_FILE} (size: {len(json.dumps(master_store))} bytes)")
|