diff --git a/.serena/cache/typescript/document_symbols_cache_v23-06-25.pkl b/.serena/cache/typescript/document_symbols_cache_v23-06-25.pkl
index 6dc5422..c63c390 100644
Binary files a/.serena/cache/typescript/document_symbols_cache_v23-06-25.pkl and b/.serena/cache/typescript/document_symbols_cache_v23-06-25.pkl differ
diff --git a/YOUTUBE_SETUP.md b/YOUTUBE_SETUP.md
deleted file mode 100644
index 598048d..0000000
--- a/YOUTUBE_SETUP.md
+++ /dev/null
@@ -1,70 +0,0 @@
-# YouTube Authentication Setup
-
-Чтобы обойти блокировку YouTube "Sign in to confirm you're not a bot", нужно использовать cookies из вашего авторизованного браузера.
-
-## Шаг 1: Получение cookies
-
-1. Откройте Chrome/Firefox и зайдите на [youtube.com](https://youtube.com)
-2. Убедитесь что вы авторизованы в своем аккаунте
-3. Нажмите F12 чтобы открыть Developer Tools
-4. Перейдите на вкладку **Application** (Chrome) или **Storage** (Firefox)
-5. В левом меню найдите **Cookies** → **https://www.youtube.com**
-6. Найдите и скопируйте значения следующих cookies:
-
-### Обязательные cookies:
-- `__Secure-1PSID`
-- `__Secure-3PSID`
-- `__Secure-1PAPISID`
-- `__Secure-3PAPISID`
-
-### Дополнительные (рекомендуемые):
-- `VISITOR_INFO1_LIVE`
-- `YSC`
-
-## Шаг 2: Настройка файла
-
-1. Откройте файл `youtube-cookies.json` в корне проекта
-2. Замените `your_*_value_here` на реальные значения из браузера:
-
-```json
-{
- "comment": "Replace these values with your actual YouTube cookies from browser",
- "__Secure-1PSID": "СКОПИРОВАННОЕ_ЗНАЧЕНИЕ_ЗДЕСЬ",
- "__Secure-3PSID": "СКОПИРОВАННОЕ_ЗНАЧЕНИЕ_ЗДЕСЬ",
- "__Secure-1PAPISID": "СКОПИРОВАННОЕ_ЗНАЧЕНИЕ_ЗДЕСЬ",
- "__Secure-3PAPISID": "СКОПИРОВАННОЕ_ЗНАЧЕНИЕ_ЗДЕСЬ",
- "VISITOR_INFO1_LIVE": "СКОПИРОВАННОЕ_ЗНАЧЕНИЕ_ЗДЕСЬ",
- "YSC": "СКОПИРОВАННОЕ_ЗНАЧЕНИЕ_ЗДЕСЬ"
-}
-```
-
-## Шаг 3: Перезапуск сервера
-
-После настройки cookies перезапустите сервер:
-
-```bash
-yarn start
-```
-
-В логах вы должны увидеть:
-```
-YouTube cookies loaded successfully
-```
-
-## Примечания
-
-- Cookies периодически истекают, и их нужно обновлять
-- Файл `youtube-cookies.json` добавлен в `.gitignore` для безопасности
-- Если cookies не работают, попробуйте обновить их из браузера
-- В случае проблем сервер автоматически переключится на анонимный доступ
-
-## Альтернативный способ
-
-Если cookies не помогают, можно установить системный `yt-dlp`:
-
-```bash
-# macOS
-brew install yt-dlp
-
-# Затем использовать через exec в Node.js
-```
\ No newline at end of file
diff --git a/package.json b/package.json
index f6badff..432c840 100644
--- a/package.json
+++ b/package.json
@@ -2,13 +2,17 @@
"name": "quixotic",
"version": "1.0.0",
"description": "Telegram miniapp for YouTube music search and MP3 conversion",
- "main": "src/server.js",
+ "main": "dist/server.js",
"scripts": {
- "start": "node src/server.js",
- "dev": "nodemon src/server.js",
- "lint": "eslint src/ public/",
- "lint:fix": "eslint src/ public/ --fix",
- "validate": "npm run lint && node -c src/server.js && echo '✅ All checks passed!'",
+ "build": "tsc && tsc -p tsconfig.frontend.json",
+ "build:backend": "tsc",
+ "build:frontend": "tsc -p tsconfig.frontend.json",
+ "start": "node dist/server.js",
+ "dev": "ts-node src/server.ts",
+ "dev:watch": "nodemon --exec ts-node src/server.ts",
+ "lint": "eslint src/ public/ --ext .ts,.js",
+ "lint:fix": "eslint src/ public/ --ext .ts,.js --fix",
+ "validate": "npm run lint && npm run build && echo '✅ All checks passed!'",
"pretest": "npm run validate"
},
"packageManager": "yarn@1.22.19",
@@ -22,8 +26,14 @@
"sqlite3": "^5.1.6"
},
"devDependencies": {
+ "@types/express": "^5.0.3",
+ "@types/fluent-ffmpeg": "^2.1.27",
+ "@types/node": "^24.3.0",
+ "@types/node-telegram-bot-api": "^0.64.10",
"eslint": "^9.34.0",
- "nodemon": "^3.0.2"
+ "nodemon": "^3.0.2",
+ "ts-node": "^10.9.2",
+ "typescript": "^5.9.2"
},
"engines": {
"node": ">=16.0.0"
diff --git a/public/index.html b/public/index.html
index c0cb039..4cc912d 100644
--- a/public/index.html
+++ b/public/index.html
@@ -35,6 +35,6 @@
-
+