Professional step-by-step guides for updating files, syncing databases, uploading documents, and managing TM3QSC across all three sovereign nodes
Easiest — open the app in Chrome, go to Uploads page, drag & drop files
Command-line upload — works for any file type, scriptable
1. Open Chrome on your phone
2. Go to tm3qsc.replit.app
3. Login with your access key
4. Navigate to Uploads (from the main menu)
5. Tap "Upload File" or drag and drop
6. Your file is now stored in Replit with sovereign encryption
Step 1 — Login and get session cookie:
ACCESS_KEY=$(python3 -c "import hashlib; print(hashlib.sha256(b'YOUR_ACCESS_KEY_HERE').hexdigest())")
curl -s -X POST "https://tm3quantumsovereigncore.net/api/auth/login" \
-H "Content-Type: application/json" \
-d "{\"method\":\"access_key\",\"access_key\":\"$ACCESS_KEY\"}" \
-c ~/cookies.txt
Step 2 — Upload any file:
curl -X POST "https://tm3quantumsovereigncore.net/api/uploads/upload" \
-b ~/cookies.txt \
-F "file=@/path/to/your/file.json"
Replace /path/to/your/file.json with the actual file path on your phone. For Termux, files are usually in $HOME/TM3QSC/ or $HOME/storage/shared/
To upload text content that auto-trains TM3Brain and creates Crown Lessons:
curl -X POST "https://tm3quantumsovereigncore.net/api/uploads/text" \
-b ~/cookies.txt \
-H "Content-Type: application/json" \
-d '{
"title": "My Sovereign Scroll Title",
"content": "Full text content here...",
"tags": ["sovereign", "codex"]
}'
1. Export your SQLite tables to JSON:
python3 -c "
import sqlite3, json, os
conn = sqlite3.connect(os.path.expanduser('~/TM3QSC/db/tm3_sovereign.db'))
conn.row_factory = sqlite3.Row
tables = [r[0] for r in conn.execute(\"SELECT name FROM sqlite_master WHERE type='table'\").fetchall()]
print(f'Tables found: {tables}')
for t in tables:
try:
rows = [dict(r) for r in conn.execute(f'SELECT * FROM {t}').fetchall()]
path = os.path.expanduser(f'~/{t}_export.json')
with open(path, 'w') as f:
json.dump(rows, f, default=str)
print(f' Exported {t}: {len(rows)} rows -> {path}')
except Exception as e:
print(f' Skip {t}: {e}')
conn.close()
"
2. Upload each export file:
for f in ~/*_export.json; do
echo "Uploading $f..."
curl -X POST "https://tm3quantumsovereigncore.net/api/uploads/upload" \
-b ~/cookies.txt \
-F "file=@$f"
done
Run the built-in sync script that exports all tables and pushes them to Replit:
curl -s "https://tm3quantumsovereigncore.net/api/scripts/raw/phone2_db_sync.sh" -o ~/phone2_sync.sh
bash ~/phone2_sync.sh
Note: The sync script requires the Replit app to be deployed (which it now is). The script auto-authenticates, exports all SQLite tables, and pushes records to Replit's PostgreSQL via the /api/king/db-sync/ingest endpoint.
All scripts in the Replit vault can be downloaded to your phone:
curl -s "https://tm3quantumsovereigncore.net/api/scripts/raw/phone2_db_sync.sh" -o ~/TM3QSC/scripts/phone2_db_sync.sh
curl -s "https://tm3quantumsovereigncore.net/api/scripts/raw/zulu_core.sh" -o ~/TM3QSC/scripts/zulu_core.sh
curl -s "https://tm3quantumsovereigncore.net/api/scripts/raw/watchtower.py" -o ~/TM3QSC/scripts/watchtower.py
curl -s "https://tm3quantumsovereigncore.net/api/scripts/list" -b ~/cookies.txt | python3 -m json.tool
If curl downloads fail, paste the script directly:
cat << 'HEREDOC' > ~/TM3QSC/scripts/my_script.sh
#!/data/data/com.termux/files/usr/bin/bash
echo "Script content goes here"
HEREDOC
chmod +x ~/TM3QSC/scripts/my_script.sh
Termux restriction: No writing to /tmp. Always use $HOME paths. The cat HEREDOC method works when downloads fail.
curl -s "https://tm3quantumsovereigncore.net/api/capabilities/full-report" -b ~/cookies.txt | python3 -c "
import sys, json
d = json.load(sys.stdin)
print(f\"Capabilities: {d['total']} total | {d['operational']} operational | {d['percentage']}%\")
"
curl -X POST "https://tm3quantumsovereigncore.net/api/king/nodes/ZION-PHONE-001/heartbeat" \
-b ~/cookies.txt \
-H "Content-Type: application/json" \
-d '{"status":"online","battery":"'$(termux-battery-status 2>/dev/null | python3 -c "import sys,json; print(json.load(sys.stdin).get('percentage','?'))" 2>/dev/null || echo "N/A")'%"}'
curl -s "https://tm3quantumsovereigncore.net/api/king/control" -b ~/cookies.txt | python3 -c "
import sys, json
d = json.load(sys.stdin)
for op in d['operations']:
print(f\" #{op['id']} {op['name']} -> {op['cmd']}\")
"
curl -X POST "https://tm3quantumsovereigncore.net/api/king/control/execute" \
-b ~/cookies.txt \
-H "Content-Type: application/json" \
-d '{"command":"system_health","device_id":"ZION-PHONE-001"}'
cd ~/TM3QSC && git pull origin main
If you get merge conflicts, use: git fetch origin && git reset --hard origin/main (this overwrites local changes)
| Item | Value |
|---|---|
| Device ID | ZION-PHONE-001 |
| Role | CROWN_NODE |
| OS | Android / Termux |
| DB Path | $HOME/TM3QSC/db/tm3_sovereign.db |
| Scripts | $HOME/TM3QSC/scripts/ |
| Replit URL | https://tm3quantumsovereigncore.net |
| Shell | #!/data/data/com.termux/files/usr/bin/bash |
| No /tmp writes | Use $HOME paths only |
Open tm3qsc.replit.app, login, go to Uploads, drag & drop
Command-line — upload any file with one command
Push code/data changes to GitHub, then pull into Replit
Paste text directly — trains TM3Brain + creates lessons
Step 1 — Login:
ACCESS_KEY=$(python3 -c "import hashlib; print(hashlib.sha256(b'YOUR_ACCESS_KEY_HERE').hexdigest())")
curl -s -X POST "https://tm3quantumsovereigncore.net/api/auth/login" \
-H "Content-Type: application/json" \
-d "{\"method\":\"access_key\",\"access_key\":\"$ACCESS_KEY\"}" \
-c ~/.tm3_cookies
Step 2 — Upload file:
curl -X POST "https://tm3quantumsovereigncore.net/api/uploads/upload" \
-b ~/.tm3_cookies \
-F "file=@/path/to/your/file.json"
cd ~/FLAMECORE
git add -A
git commit -m "Sovereign update: $(date '+%Y-%m-%d %H:%M')"
git push origin main
After pushing to GitHub, the Replit project can pull the latest changes. This is best for code changes and structured data files.
for f in ~/FLAMECORE/data/*.json; do
echo "Uploading $(basename $f)..."
curl -s -X POST "https://tm3quantumsovereigncore.net/api/uploads/upload" \
-b ~/.tm3_cookies \
-F "file=@$f"
done
Export all tables from your laptop SQLite database:
python3 -c "
import sqlite3, json, os
conn = sqlite3.connect(os.path.expanduser('~/FLAMECORE/data/tm3ai.db'))
conn.row_factory = sqlite3.Row
tables = [r[0] for r in conn.execute(\"SELECT name FROM sqlite_master WHERE type='table'\").fetchall()]
print(f'Tables: {tables}')
for t in tables:
try:
rows = [dict(r) for r in conn.execute(f'SELECT * FROM {t}').fetchall()]
path = os.path.expanduser(f'~/{t}_export.json')
with open(path, 'w') as f:
json.dump(rows, f, default=str)
print(f' {t}: {len(rows)} rows -> {path}')
except Exception as e:
print(f' Skip {t}: {e}')
conn.close()
"
Then upload each file:
for f in ~/*_export.json; do
curl -s -X POST "https://tm3quantumsovereigncore.net/api/uploads/upload" \
-b ~/.tm3_cookies -F "file=@$f"
done
curl -s "https://tm3quantumsovereigncore.net/api/scripts/raw/zion001_db_sync.sh" -o ~/zion001_sync.sh
bash ~/zion001_sync.sh
curl -s "https://tm3quantumsovereigncore.net/api/scripts/raw/zion001_db_sync.sh" -o ~/TM3QSC/scripts/zion001_db_sync.sh
curl -s "https://tm3quantumsovereigncore.net/api/scripts/raw/king_control_zion001.sh" -o ~/TM3QSC/scripts/king_control.sh
curl -s "https://tm3quantumsovereigncore.net/api/scripts/raw/watchtower.py" -o ~/TM3QSC/scripts/watchtower.py
chmod +x ~/TM3QSC/scripts/*.sh
cd ~/FLAMECORE && git fetch origin && git pull origin main
cd ~/FLAMECORE && git fetch origin && git reset --hard origin/main
Warning: This overwrites ALL local changes. Only use if you want to match Replit exactly.
cd ~/FLAMECORE
python3 -m venv .venv
source .venv/bin/activate
pip install flask flask-cors stripe requests stellar-sdk fpdf2 openai paypalrestsdk numpy pandas gunicorn psycopg2-binary python-dotenv
cat > ~/FLAMECORE/.env << 'EOF'
STRIPE_SECRET_KEY=sk_live_your_key
STRIPE_PUBLISHABLE_KEY=pk_live_your_key
PAYPAL_CLIENT_ID=your_client_id
PAYPAL_CLIENT_SECRET=your_client_secret
STELLAR_SECRET_KEY=your_stellar_secret
DATABASE_URL=postgresql://localhost/tm3qsc
CORS_ALLOWED_ORIGINS=http://localhost:5000
EOF
cd ~/FLAMECORE
source .venv/bin/activate
python3 main.py
Access at http://localhost:5000
bash ~/TM3QSC/scripts/king_control.sh
This provides a full menu: system health, Replit sync, git operations, quantum validation, and more.
| Item | Value |
|---|---|
| Device ID | ZION-LAPTOP-001 |
| Role | COMMAND_NODE |
| OS | Mac / Linux / Windows WSL |
| DB Path | $HOME/FLAMECORE/data/tm3ai.db |
| Project Dir | $HOME/FLAMECORE/ |
| Replit URL | https://tm3quantumsovereigncore.net |
| Git Remote | GitHub (origin/main) |
| Local Port | http://localhost:5000 |
The app is permanently deployed at:
https://tm3quantumsovereigncore.net
This URL never sleeps. Phone2 and ZION001 can sync to it 24/7.
1. Go to replit.com and login to your account
2. Open the TM3QSC project
3. Use the built-in editor to modify files
4. Changes are auto-saved and deployed
| Directory | Purpose | Examples |
|---|---|---|
routes/ | API backend logic | sovereign_one.py, king_control.py |
public/ | Frontend HTML pages | index.html, wallet.html |
data/ | JSON data storage | sovereign_finances.json |
scripts/ | Bash/Python scripts | phone2_db_sync.sh |
main.py | App entry point | Registers all blueprints |
1. Create public/mypage.html
2. Add <script src="/auth-gate.js"></script> at the top of <head>
3. Add <script src="/tm3-nav.js"></script> for navigation
4. Include <link rel="stylesheet" href="/sovereign-theme.css"> for consistent styling
5. The page is automatically served at /mypage.html
1. Login at tm3qsc.replit.app
2. Go to Document Center (sovereign-docs)
3. Drag & drop files or click "Upload File"
4. Files are encrypted and stored with 9D sovereign dimension tagging
| Endpoint | Method | Purpose |
|---|---|---|
/api/auth/login | POST | Authenticate with access key |
/api/uploads/upload | POST | Upload a file |
/api/uploads/text | POST | Upload text (trains TM3Brain) |
/api/king/db-sync/ingest | POST | Push SQLite records |
/api/king/db-sync/status | GET | Check sync status |
/api/king/control | GET | List all operations |
/api/king/control/execute | POST | Execute an operation |
/api/scripts/raw/<file> | GET | Download a script |
/api/capabilities/full-report | GET | System capabilities status |
/api/sovereign-one | GET | Financial supremacy data |
The app is DEPLOYED at tm3qsc.replit.app — always-on, no sleep, TLS secured.
1. Make changes in the Replit editor
2. The workflow auto-restarts on file changes
3. To push to production: click Publish in Replit
| Item | Value |
|---|---|
| Device ID | REPLIT-BACKUP-001 |
| Role | BACKUP_NODE |
| Production URL | https://tm3quantumsovereigncore.net |
| Database | PostgreSQL (DATABASE_URL) |
| Server | Gunicorn (port 5000) |
| 42+ HTML Pages | All with SEO, auth-gate, sovereign theme |
| 51 Blueprints | 188+ API endpoints |
| 89 Capabilities | 77 operational (86.5%) |