diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 0000000..6f03149 --- /dev/null +++ b/.pylintrc @@ -0,0 +1 @@ +disable=missing-function-docstring \ No newline at end of file diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index c1850b4..0000000 --- a/Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM python:3.9-slim - -WORKDIR /app - -COPY requirements.txt . - -RUN pip install --no-cache-dir -r requirements.txt - -COPY site /app/site - -EXPOSE 5000 - -CMD ["python", "site/app.py"] \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..88de493 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,12 @@ +{ + "name": "say", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "say", + "version": "1.0.0" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..eb9294b --- /dev/null +++ b/package.json @@ -0,0 +1,7 @@ +{ + "name": "say", + "version": "1.0.0", + "main": "server.js", + "scripts": { "start": "node server.js" }, + "dependencies": {} +} \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 2e4f29c..0000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -Flask==2.0.1 -Werkzeug==2.3.7 diff --git a/server.js b/server.js new file mode 100644 index 0000000..17c91e8 --- /dev/null +++ b/server.js @@ -0,0 +1,19 @@ +const http = require('http'); +const PORT = process.env.PORT || 3000; + +http.createServer((req, res) => { + if (req.url === '/healthz') { + res.writeHead(200, { 'Content-Type': 'application/json' }); + res.end('{"status":"ok"}'); + } else if (req.url === '/api/profiles') { + res.writeHead(200, { 'Content-Type': 'application/json' }); + res.end(JSON.stringify([ + {"id": "ddm", "name": "DDM-120", "desc": "Быстрая модель"}, + {"id": "qwen", "name": "Qwen", "desc": "Мощная модель"}, + {"id": "deepseek", "name": "DeepSeek", "desc": "Глубокая аналитика"}, + ])); + } else { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.end('Say OK'); + } +}).listen(PORT, () => console.log(':' + PORT)); \ No newline at end of file diff --git a/site/app.py b/site/app.py deleted file mode 100644 index e69e43d..0000000 --- a/site/app.py +++ /dev/null @@ -1,33 +0,0 @@ -from flask import Flask, render_template, jsonify - - -class SayApp: - def __init__(self): - self.app = Flask(__name__, template_folder="templates", static_folder="static") - self.add_routes() - - def add_routes(self): - self.app.add_url_rule("/", "index", self.index) - self.app.add_url_rule("/healthz", "healthz", self.health) - self.app.add_url_rule("/api/profiles", "profiles", self.profiles) - - def index(self): - return render_template("index.html") - - def healthz(self): - return jsonify({"status": "ok"}) - - def profiles(self): - return jsonify([ - {"id": "ddm", "name": "DDM-120", "desc": "Быстрая модель"}, - {"id": "qwen", "name": "Qwen", "desc": "Мощная модель"}, - {"id": "deepseek", "name": "DeepSeek", "desc": "Глубокая аналитика"}, - ]) - - def run(self): - self.app.run(host="0.0.0.0", port=5000, debug=True) - - -if __name__ == "__main__": - SayApp().run() - diff --git a/site/static/favicon.png b/site/static/favicon.png deleted file mode 100644 index f171012..0000000 Binary files a/site/static/favicon.png and /dev/null differ diff --git a/site/static/nubes-logo.svg b/site/static/nubes-logo.svg deleted file mode 100644 index 1a7aed4..0000000 --- a/site/static/nubes-logo.svg +++ /dev/null @@ -1,2 +0,0 @@ -Forbidden -Transaction ID: bdd7fbca-219a-4dbf-95ca-a27cc8bdecd9 diff --git a/site/static/style.css b/site/static/style.css deleted file mode 100644 index 9a5690f..0000000 --- a/site/static/style.css +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Say — Голосовой ассистент - * Дизайн-система Nubes (как в ipwhitelist-app) - */ - -/* ========================================================================== - CSS Variables — точь-в-точь ipwhitelist-app - ========================================================================== */ -:root { - --bg: #f5f5f5; - --card: #ffffff; - --text: #1a1a1a; - --muted: #6b7280; - --border: #d1d5db; - --grey-light: #f3f4f6; - --blue: #2563eb; - --blue-h: #1d4ed8; - --red: #dc2626; - --red-h: #b91c1c; - --green: #16a34a; - --amber: #d97706; -} - -/* ========================================================================== - Reset & Base - ========================================================================== */ -* { box-sizing: border-box; margin: 0; padding: 0; } - -body { - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; - background: var(--bg); - color: var(--text); - font-size: 14px; - line-height: 1.5; -} - -/* ========================================================================== - Topbar (header) — 48px, белый, как в ipwhitelist-app - ========================================================================== */ -.topbar { - background: #fff; - border-bottom: 1px solid var(--border); - height: 48px; - display: flex; - align-items: center; - padding: 0 1.5rem; -} -.topbar-inner { - display: flex; - align-items: center; - gap: 0.75rem; - width: 100%; -} -.topbar-logo { - display: flex; - align-items: center; - text-decoration: none; -} -.topbar-logo img { - display: block; -} -.topbar-sep { - color: var(--muted); - font-size: 1rem; - user-select: none; -} -.topbar-title { - font-size: 0.9rem; - color: var(--muted); -} - -/* ========================================================================== - Page Container - ========================================================================== */ -.page { - max-width: 900px; - margin: 1.5rem auto; - padding: 0 1rem; -} - -/* ========================================================================== - Cards — точь-в-точь ipwhitelist-app - ========================================================================== */ -.card { - background: var(--card); - border: 1px solid var(--border); - border-radius: 12px; - box-shadow: 0 1px 2px rgba(0,0,0,.04); - margin-bottom: 1rem; - overflow: hidden; -} -.card-header { - background: var(--grey-light); - padding: .75rem 1rem; - font-weight: 600; - font-size: 1rem; - border-bottom: 1px solid var(--border); -} -.card-body { - padding: 1rem; -} - -/* ========================================================================== - Alerts — точь-в-точь ipwhitelist-app - ========================================================================== */ -.alert { - padding: .75rem 1rem; - border-radius: 8px; - margin-bottom: 1rem; - border: 1px solid; -} -.alert-error { - background: #fecaca; - color: #991b1b; - border-color: #fca5a5; -} -.alert-success { - background: #dcfce7; - color: #166534; - border-color: #bbf7d0; -} - -/* ========================================================================== - Buttons — точь-в-точь ipwhitelist-app - ========================================================================== */ -.btn { - display: inline-flex; - align-items: center; - gap: .35rem; - padding: .5rem 1rem; - border: 1px solid var(--border); - border-radius: 6px; - font-size: .85rem; - font-weight: 500; - background: #fff; - cursor: pointer; - transition: background .15s; - white-space: nowrap; -} -.btn:hover { background: var(--grey-light); } - -.btn-primary { - background: var(--blue); - color: #fff; - border-color: var(--blue); -} -.btn-primary:hover { background: var(--blue-h); } -.btn-primary:disabled { - background: #93c5fd; - border-color: #93c5fd; - cursor: not-allowed; -} - -/* ========================================================================== - LLM Cards — список моделей - ========================================================================== */ -.llm-card { - display: flex; - align-items: center; - gap: 1rem; - padding: .75rem 0; - border-bottom: 1px solid var(--border); -} -.llm-card:last-child { border-bottom: none; } - -.llm-info { - flex: 1; - min-width: 0; -} -.llm-name { - font-weight: 600; - font-size: .95rem; -} -.llm-desc { - font-size: .8rem; - color: var(--muted); - margin-top: .15rem; -} -.rec-status { - font-size: .8rem; - color: var(--muted); - min-width: 80px; - text-align: right; -} - -/* Кнопка в режиме записи */ -.record-btn.recording { - background: var(--red); - border-color: var(--red); - animation: pulse-rec 1.2s infinite; -} -.record-btn.recording:hover { - background: var(--red-h); -} - -@keyframes pulse-rec { - 0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.4); } - 50% { box-shadow: 0 0 0 6px rgba(220,38,38,0); } -} - -/* ========================================================================== - Result Section - ========================================================================== */ -.result-section { - margin-bottom: 1rem; -} -.result-section:last-child { margin-bottom: 0; } - -.result-label { - font-size: .8rem; - font-weight: 500; - color: var(--muted); - text-transform: uppercase; - letter-spacing: .5px; - margin-bottom: .35rem; -} -.result-text { - font-size: 1rem; - line-height: 1.6; - white-space: pre-wrap; - word-break: break-word; -} - -/* ========================================================================== - Loading - ========================================================================== */ -.loading { - color: var(--muted); - font-size: .9rem; - padding: 1rem 0; -} - -/* ========================================================================== - Footer — точь-в-точь ipwhitelist-app - ========================================================================== */ -.footer { - text-align: center; - font-size: .72rem; - color: var(--muted); - padding: 1rem; -} diff --git a/site/templates/index.html b/site/templates/index.html deleted file mode 100644 index ffb940c..0000000 --- a/site/templates/index.html +++ /dev/null @@ -1,283 +0,0 @@ - - -
- - -