Initial commit: Quantum Terminal — Free & Open Source Trading Platform

This commit is contained in:
Quantum Terminal
2026-05-21 01:44:50 +03:00
commit b7ea418678
68 changed files with 16826 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
{
"files": {
"main.css": "/static/css/main.64fab706.css",
"main.js": "/static/js/main.be9bfbf6.js",
"index.html": "/index.html",
"main.64fab706.css.map": "/static/css/main.64fab706.css.map",
"main.be9bfbf6.js.map": "/static/js/main.be9bfbf6.js.map"
},
"entrypoints": [
"static/css/main.64fab706.css",
"static/js/main.be9bfbf6.js"
]
}
+1
View File
@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>MK.TRADES Terminal</title><style>*{margin:0;padding:0;box-sizing:border-box}body{background:#000;overflow:hidden}</style><script defer="defer" src="/static/js/main.be9bfbf6.js"></script><link href="/static/css/main.64fab706.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
+10
View File
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>MK.TRADES Analytical Terminal</title>
<style>body{margin:0;padding:0;background:#000;overflow:hidden;}</style>
</head>
<body><div id="root"></div></body>
</html>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,2 @@
.styles_page__b0DNw{background:#06060e;min-height:100%}.styles_cardBg__Dprkb{background:#09091a;border-radius:8px;padding:12px}.styles_borderDefault__63iOJ{border:1px solid #e8b84b14}.styles_borderHigh__0Thra{border:1px solid #dc3c3c4d}.styles_borderMed__7cBgD{border:1px solid #e8b84b38}.styles_borderLow__aw5uJ{border:1px solid #466e462e}.styles_brandSmall__8m128{color:#e8b84b;font:10px monospace;letter-spacing:5px;text-transform:uppercase}.styles_title__v9zrC{color:#ffd875;font-family:monospace;font-size:13px;font-weight:700;letter-spacing:5px;text-transform:uppercase}.styles_muted__uUsPK{color:#4a3c28}.styles_dim__UW4rx{color:#9a7830}.styles_white__PIvc3{color:#fff}.styles_topBar__lY3HL{align-items:center;background:#06060e;border-bottom:1px solid #e8b84b1f;display:flex;height:44px;justify-content:space-between;padding:0 16px}.styles_liveDot__gb6L2{animation:styles_pulse__SsdTc 1.4s ease-in-out infinite;background:#50c878;border-radius:50%;height:8px;width:8px}@keyframes styles_pulse__SsdTc{0%{opacity:0}50%{opacity:1}to{opacity:0}}.styles_liveText__QU6Tj{color:#50c878;margin-left:6px}.styles_liveText__QU6Tj,.styles_scannerOff__xct80{font:9px monospace;letter-spacing:1.5px;text-transform:uppercase}.styles_scannerOff__xct80{color:#4a3c28}.styles_scoreHigh__ayJlz{background:#dc3c3c1a;color:#e04040}.styles_scoreMed__2CyFx{background:#e8b84b14;color:#e8b84b}.styles_scoreLow__a\+3FK{background:#50785012;color:#507050}.styles_scoreBadge__1jsGg{border-radius:3px;font:11px monospace;font-weight:700;letter-spacing:1px;padding:2px 8px}.styles_tagQB__Olltu{background:#e8b84b1a;border:.5px solid #e8b84b40;color:#e8b84b}.styles_tagCO__uOmNR{background:#64a0dc1a;border:.5px solid #64a0dc40;color:#80b8e0}.styles_tag__EDr2T{border-radius:3px;font:8px monospace;letter-spacing:.5px;padding:2px 5px;text-transform:uppercase}.styles_grid__v5R95{grid-gap:8px;display:grid;gap:8px;grid-template-columns:repeat(3,1fr);padding:12px}.styles_alertStrip__Skiwe{padding:10px 14px}.styles_alertHeader__qyKjd{color:#9a7830;font:9px monospace;letter-spacing:4px;margin-bottom:8px;text-transform:uppercase}.styles_alertCrit__ACC1X{background:#dc3c3c0d;border-left:2px solid #e04040;min-height:36px;padding:8px 10px}.styles_alertWarn__7EynK{background:#e8b84b0a;border-left:2px solid #e8b84b;min-height:36px;padding:8px 10px}.styles_alertAsset__OUKUM{color:#fff;font:10px monospace;font-weight:700;letter-spacing:2px;min-width:56px}.styles_alertBody__pt4jk{color:#60503a;font:9px monospace}.styles_statsBar__SEvBO{align-items:center;border-top:1px solid #e8b84b12;display:flex;gap:18px;height:36px;padding:8px 16px}.styles_statLabel__ZHEhS{color:#3a3020;font:8px monospace;letter-spacing:2px;text-transform:uppercase}.styles_statValue__i5m8r{color:#e8b84b;font:10px monospace;font-weight:700;margin-left:6px}.styles_statValueImpact__AEpRP{color:#e04040}.styles_sep__MXc4n{background:#e8b84b12;height:14px;width:1px}.styles_staleBanner__HJc\+d{align-items:center;background:#e8b84b0f;border-bottom:1px solid #e8b84b2e;color:#e8b84b;display:flex;font:10px monospace;justify-content:space-between;letter-spacing:1px;padding:8px 16px}.styles_calcOverlay__edps3{align-items:center;background:#06060ec7;color:#e8b84b;display:flex;font:11px monospace;inset:0;justify-content:center;letter-spacing:3px;position:absolute;text-transform:uppercase;z-index:50}.styles_originNow__6HDzO{color:#fff}.styles_originCurrentWeek__J3qxS{color:#80b8e0}.styles_originPrevWeek__snrh3{color:#5c8cb0}.styles_originWeekPrev2__IHP51{color:#3a6080}.styles_originCurrentMonth__jPJOb{color:#80e0a0}.styles_originPrevMonth__bM7yU{color:#5ca070}.styles_originPrevMonth2__jcnEL{color:#4a7e58}.styles_originExtremeHigh__jODcD{color:#ff80b0}.styles_originExtremeLow__hRBvN{color:#ffa060}.styles_originBands__g7kwV{color:#e8b84b}.styles_swatch__aWIbc{border-radius:2px;display:inline-block;height:8px;margin-right:6px;vertical-align:middle;width:8px}.styles_elementList__lsO6Z{display:flex;flex:1 1;flex-direction:column;font-family:monospace;font-size:9px;gap:2px;max-height:154px;min-width:0;overflow-y:auto}.styles_elementRow__9g31h{align-items:center;display:flex;gap:6px;overflow:hidden;white-space:nowrap}.styles_elementLabel__qQVri{color:#fff;flex:1 1;overflow:hidden;text-overflow:ellipsis}.styles_elementDist__ZUtS-{color:#9a7830;flex-shrink:0;font-size:8px}.styles_elementApex__bPLem{color:#ffd875;font-size:8px;font-weight:700;letter-spacing:1px}.styles_cardBody__ZPNha{align-items:flex-start;display:flex;gap:8px;margin:8px 0}
/*# sourceMappingURL=main.64fab706.css.map*/
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,87 @@
/*!
* @license
* TradingView Lightweight Charts™ v5.1.0
* Copyright (c) 2025 TradingView, Inc.
* Licensed under Apache License 2.0 https://www.apache.org/licenses/LICENSE-2.0
*/
/*! decimal.js-light v2.5.1 https://github.com/MikeMcl/decimal.js-light/LICENCE */
/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* use-sync-external-store-shim/with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* @license React
* use-sync-external-store-with-selector.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
File diff suppressed because one or more lines are too long
+244
View File
@@ -0,0 +1,244 @@
// version: v1
// mk_debug_telemetry.js — disposable diagnostic harness.
//
// Loaded as a raw <script> tag from public/index.html (gated by
// REACT_APP_MK_DEBUG=1 at build time). Runs BEFORE the React bundle so
// the monkey-patches on global timers see all subsequent allocations.
//
// Public API:
// window.__mkDebug
// .longTasks [] { ts, duration, name }
// .memorySnaps[] { ts, usedJS, totalJS, jsLimit }
// .counters [] { ts, intervals, timeouts, rafs, observers,
// assetsMapSize, barsArrLen, signalsLen }
// .syncEvents [] { ts, type, detail? }
// .notes [] { ts, text }
// .config {} { sampleIntervalMs, maxLongTasks, maxCounters }
// .note(text) push a free-form timestamped note
// .dump() copy capture to clipboard as JSON
// .reset() clear all arrays
//
// After the diagnostic session, run __mkDebug.dump() in DevTools and
// paste into a file `frontend_capture.json`.
//
// Disposable — see spec §8 (Removal procedure):
// docs/specs/2026-05-05-debug-telemetry-harness-design.md
(function () {
"use strict";
if (typeof window === "undefined") return;
function nowIso() {
return new Date().toISOString();
}
// ----- Config + buffers -----
const CFG = { sampleIntervalMs: 30000, maxLongTasks: 10000, maxCounters: 500 };
const dbg = {
startedAt: nowIso(),
longTasks: [],
memorySnaps: [],
counters: [],
syncEvents: [],
notes: [],
config: CFG,
note(text) {
try {
dbg.notes.push({ ts: nowIso(), text: String(text == null ? "" : text) });
} catch (e) {
console.error("[mkDebug] note() failed:", e);
}
},
dump() {
const payload = JSON.stringify({
startedAt: dbg.startedAt,
capturedAt: nowIso(),
longTasks: dbg.longTasks,
memorySnaps: dbg.memorySnaps,
counters: dbg.counters,
syncEvents: dbg.syncEvents,
notes: dbg.notes,
config: dbg.config,
userAgent: (typeof navigator !== "undefined") ? navigator.userAgent : "",
}, null, 2);
dbg.lastDump = payload;
try {
navigator.clipboard.writeText(payload).then(
() => console.info(
"[mkDebug] capture (%d KB) copied to clipboard",
Math.round(payload.length / 1024)
),
(err) => console.error(
"[mkDebug] clipboard failed:", err,
"— payload also in __mkDebug.lastDump"
)
);
} catch (e) {
console.error(
"[mkDebug] clipboard not available; payload in __mkDebug.lastDump"
);
}
return payload.length;
},
reset() {
dbg.longTasks = [];
dbg.memorySnaps = [];
dbg.counters = [];
dbg.syncEvents = [];
dbg.notes = [];
},
};
window.__mkDebug = dbg;
// ----- Long-task observer -----
try {
const po = new PerformanceObserver((list) => {
const entries = list.getEntries();
for (let i = 0; i < entries.length; i++) {
const e = entries[i];
if (dbg.longTasks.length >= CFG.maxLongTasks) break;
dbg.longTasks.push({
ts: nowIso(),
duration: Math.round(e.duration),
name: e.name || "self",
});
}
});
po.observe({ entryTypes: ["longtask"] });
} catch (e) {
console.warn("[mkDebug] longtask observer not supported:", e);
}
// ----- Memory snapshots -----
function snapMemory() {
if (!performance || !performance.memory) return;
if (dbg.memorySnaps.length >= 200) return; // cap
dbg.memorySnaps.push({
ts: nowIso(),
usedJS: performance.memory.usedJSHeapSize,
totalJS: performance.memory.totalJSHeapSize,
jsLimit: performance.memory.jsHeapSizeLimit,
});
}
setInterval(snapMemory, CFG.sampleIntervalMs);
snapMemory(); // initial baseline
// ----- Active counter monkey-patches -----
// setInterval / clearInterval
const _origSetInterval = window.setInterval.bind(window);
const _origClearInterval = window.clearInterval.bind(window);
const _activeIntervals = new Set();
window.setInterval = function (handler, timeout) {
const args = Array.prototype.slice.call(arguments);
const id = _origSetInterval.apply(window, args);
_activeIntervals.add(id);
return id;
};
window.clearInterval = function (id) {
_activeIntervals.delete(id);
return _origClearInterval(id);
};
// setTimeout / clearTimeout
const _origSetTimeout = window.setTimeout.bind(window);
const _origClearTimeout = window.clearTimeout.bind(window);
const _activeTimeouts = new Set();
window.setTimeout = function (handler, timeout) {
const args = Array.prototype.slice.call(arguments);
const id = _origSetTimeout.apply(window, args);
_activeTimeouts.add(id);
// self-cleanup: when the timer fires it's no longer active
return id;
};
window.clearTimeout = function (id) {
_activeTimeouts.delete(id);
return _origClearTimeout(id);
};
// requestAnimationFrame: track rate of scheduling over the last 30s.
// RAFs self-fire and self-clear, so "active count" doesn't fit; instead
// record a sliding window of timestamps.
const _origRAF = window.requestAnimationFrame.bind(window);
const _rafTimes = [];
window.requestAnimationFrame = function (cb) {
_rafTimes.push(Date.now());
return _origRAF(cb);
};
function rafsInLastWindow() {
const cutoff = Date.now() - CFG.sampleIntervalMs;
while (_rafTimes.length && _rafTimes[0] < cutoff) _rafTimes.shift();
return _rafTimes.length;
}
// ResizeObserver count
let _activeObservers = 0;
if (typeof window.ResizeObserver === "function") {
const _OrigRO = window.ResizeObserver;
window.ResizeObserver = function PatchedResizeObserver(cb) {
const ro = new _OrigRO(cb);
_activeObservers++;
const origDisconnect = ro.disconnect.bind(ro);
ro.disconnect = function () {
_activeObservers = Math.max(0, _activeObservers - 1);
return origDisconnect();
};
return ro;
};
// Preserve prototype for `instanceof` checks
window.ResizeObserver.prototype = _OrigRO.prototype;
}
// ----- Counter snapshot loop -----
function snapCounters() {
if (dbg.counters.length >= CFG.maxCounters) return;
let assetsMapSize = null;
let barsArrLen = null;
let signalsLen = null;
try {
const h = window.__mkDebugHandle;
if (h) {
if (h.assets && typeof h.assets.size === "number") assetsMapSize = h.assets.size;
else if (h.assets && Array.isArray(h.assets)) assetsMapSize = h.assets.length;
if (typeof h.barsLen === "number") barsArrLen = h.barsLen;
if (typeof h.signalsLen === "number") signalsLen = h.signalsLen;
}
} catch (e) { /* swallow */ }
dbg.counters.push({
ts: nowIso(),
intervals: _activeIntervals.size,
timeouts: _activeTimeouts.size,
rafs: rafsInLastWindow(),
observers: _activeObservers,
assetsMapSize: assetsMapSize,
barsArrLen: barsArrLen,
signalsLen: signalsLen,
});
}
setInterval(snapCounters, CFG.sampleIntervalMs);
snapCounters(); // initial baseline
// ----- Sync-event tap -----
try {
window.addEventListener("mk:data-sync-complete", function (e) {
if (dbg.syncEvents.length >= 5000) return;
dbg.syncEvents.push({
ts: nowIso(),
type: "mk:data-sync-complete",
detail: (e && e.detail) ? e.detail : null,
});
});
} catch (e) {
console.warn("[mkDebug] sync-event tap install failed:", e);
}
console.info(
"[mkDebug] harness installed at %s — call __mkDebug.dump() to capture",
dbg.startedAt
);
})();