commit add947d64f4417a2440d7b69bf603f810fc01bc2 Author: admin Date: Thu Apr 30 10:55:23 2026 +0300 Initial commit: Voda Landing (Cherepovets) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..841e634 --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +# Dependencies +node_modules/ +npm-debug.log* + +# Env & secrets +.env +.env.local +.env.production +*.pem +*.key + +# User uploads (will be persisted via volume) +public/uploads/* +!public/uploads/.gitkeep + +# OS / Editor +.DS_Store +Thumbs.db +*.swp +.vscode/ +.idea/ + +# Logs +*.log + +# Backups +*.bak +*.bak2 +*.old diff --git a/README.md b/README.md new file mode 100644 index 0000000..d1a16ba --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# Voda Landing (cherepovets-landing) + +Лендинг компании водоснабжения в Череповце. Простой Node.js + Express сервер на порту 3006 с админкой и галереей проектов. + +## Стек +- Express 4 +- PostgreSQL (`voda_landing`) +- express-session + bcryptjs (авторизация админа) +- multer (загрузка фото) + +## Структура +- `server.js` — основной сервер +- `public/` — статика (главная, стили, картинки) +- `public/uploads/` — пользовательские загрузки (не в git) +- `admin/` — админка (одностраничная) + +## Запуск +```bash +npm install +node server.js +``` diff --git a/admin/index.html b/admin/index.html new file mode 100644 index 0000000..995431f --- /dev/null +++ b/admin/index.html @@ -0,0 +1,645 @@ + + + + + +Админ-панель | Вода МКД + + + + + + + +
+ +
+ + +
+ +
+ + Админ-панель +
+ + + + +
+ +
+
Заявки
+
+
+ + +
ДатаОрганизацияИмяТелефонСообщениеСтатус
+
+ + +
+
Контакты и реквизиты
+
+

Контактные данные

+
+
+
+
+
+
+
+
+
+
+
+
+
+

Реквизиты компании

+
+
+
+
+
+
+
+
+ +
+ + +
+
Услуги
+
+
+ + +
+
Преимущества
+
+
+ + +
+
Объекты
+
+
+ + +
+
Герой (шапка сайта)
+
+
+
+
+
+
+
+
+
+
+
+

Статистика

+
+
+
+
+
+
+
+
+
+
+ +
+ + +
+
SEO настройки
+
+
+
+
+
+

Open Graph (соцсети)

+
+
+
+
+ +
+ + +
+
Telegram уведомления
+
+
+
+ + +
+
+
+

+ 1. Создайте бота через @BotFather и получите токен.
+ 2. Добавьте бота в группу или напишите ему.
+ 3. Узнайте Chat ID через @getmyid_bot. +

+
+
+ +
+ + +
+
Сменить пароль
+
+
+
+
+
+
+ +
+
+
+ + + + + +
+ + + + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..899b09a --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1168 @@ +{ + "name": "voda-landing", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "voda-landing", + "version": "1.0.0", + "dependencies": { + "bcryptjs": "^3.0.3", + "express": "^4.21.2", + "express-session": "^1.19.0", + "multer": "^2.0.2", + "pg": "^8.18.0" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/append-field": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz", + "integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw==", + "license": "MIT" + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" + }, + "node_modules/bcryptjs": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-3.0.3.tgz", + "integrity": "sha512-GlF5wPWnSa/X5LKM1o0wz0suXIINz1iHRLvTS+sLyi7XPbe5ycmYI3DlZqVGZZtDgl4DmasFg7gOB3JYbphV5g==", + "license": "BSD-3-Clause", + "bin": { + "bcrypt": "bin/bcrypt" + } + }, + "node_modules/body-parser": { + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.4.tgz", + "integrity": "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "~1.2.0", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "on-finished": "~2.4.1", + "qs": "~6.14.0", + "raw-body": "~2.5.3", + "type-is": "~1.6.18", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "license": "MIT" + }, + "node_modules/busboy": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz", + "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", + "dependencies": { + "streamsearch": "^1.1.0" + }, + "engines": { + "node": ">=10.16.0" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/concat-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "engines": [ + "node >= 6.0" + ], + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz", + "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==", + "license": "MIT" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.22.1.tgz", + "integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==", + "license": "MIT", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "~1.20.3", + "content-disposition": "~0.5.4", + "content-type": "~1.0.4", + "cookie": "~0.7.1", + "cookie-signature": "~1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.3.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "~2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "~0.1.12", + "proxy-addr": "~2.0.7", + "qs": "~6.14.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "~0.19.0", + "serve-static": "~1.16.2", + "setprototypeof": "1.2.0", + "statuses": "~2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express-session": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.19.0.tgz", + "integrity": "sha512-0csaMkGq+vaiZTmSMMGkfdCOabYv192VbytFypcvI0MANrp+4i/7yEkJ0sbAEhycQjntaKGzYfjfXQyVb7BHMA==", + "license": "MIT", + "dependencies": { + "cookie": "~0.7.2", + "cookie-signature": "~1.0.7", + "debug": "~2.6.9", + "depd": "~2.0.0", + "on-headers": "~1.1.0", + "parseurl": "~1.3.3", + "safe-buffer": "~5.2.1", + "uid-safe": "~2.1.5" + }, + "engines": { + "node": ">= 0.8.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/finalhandler": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz", + "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "~2.4.1", + "parseurl": "~1.3.3", + "statuses": "~2.0.2", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/multer": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/multer/-/multer-2.0.2.tgz", + "integrity": "sha512-u7f2xaZ/UG8oLXHvtF/oWTRvT44p9ecwBBqTwgJVq0+4BW1g8OW01TyMEGWBHbyMOYVHXslaut7qEQ1meATXgw==", + "license": "MIT", + "dependencies": { + "append-field": "^1.0.0", + "busboy": "^1.6.0", + "concat-stream": "^2.0.0", + "mkdirp": "^0.5.6", + "object-assign": "^4.1.1", + "type-is": "^1.6.18", + "xtend": "^4.0.2" + }, + "engines": { + "node": ">= 10.16.0" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz", + "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" + }, + "node_modules/pg": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/pg/-/pg-8.18.0.tgz", + "integrity": "sha512-xqrUDL1b9MbkydY/s+VZ6v+xiMUmOUk7SS9d/1kpyQxoJ6U9AO1oIJyUWVZojbfe5Cc/oluutcgFG4L9RDP1iQ==", + "license": "MIT", + "dependencies": { + "pg-connection-string": "^2.11.0", + "pg-pool": "^3.11.0", + "pg-protocol": "^1.11.0", + "pg-types": "2.2.0", + "pgpass": "1.0.5" + }, + "engines": { + "node": ">= 16.0.0" + }, + "optionalDependencies": { + "pg-cloudflare": "^1.3.0" + }, + "peerDependencies": { + "pg-native": ">=3.0.1" + }, + "peerDependenciesMeta": { + "pg-native": { + "optional": true + } + } + }, + "node_modules/pg-cloudflare": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.3.0.tgz", + "integrity": "sha512-6lswVVSztmHiRtD6I8hw4qP/nDm1EJbKMRhf3HCYaqud7frGysPv7FYJ5noZQdhQtN2xJnimfMtvQq21pdbzyQ==", + "license": "MIT", + "optional": true + }, + "node_modules/pg-connection-string": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.11.0.tgz", + "integrity": "sha512-kecgoJwhOpxYU21rZjULrmrBJ698U2RxXofKVzOn5UDj61BPj/qMb7diYUR1nLScCDbrztQFl1TaQZT0t1EtzQ==", + "license": "MIT" + }, + "node_modules/pg-int8": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz", + "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==", + "license": "ISC", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/pg-pool": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.11.0.tgz", + "integrity": "sha512-MJYfvHwtGp870aeusDh+hg9apvOe2zmpZJpyt+BMtzUWlVqbhFmMK6bOBXLBUPd7iRtIF9fZplDc7KrPN3PN7w==", + "license": "MIT", + "peerDependencies": { + "pg": ">=8.0" + } + }, + "node_modules/pg-protocol": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.11.0.tgz", + "integrity": "sha512-pfsxk2M9M3BuGgDOfuy37VNRRX3jmKgMjcvAcWqNDpZSf4cUmv8HSOl5ViRQFsfARFn0KuUQTgLxVMbNq5NW3g==", + "license": "MIT" + }, + "node_modules/pg-types": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz", + "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==", + "license": "MIT", + "dependencies": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pgpass": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz", + "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==", + "license": "MIT", + "dependencies": { + "split2": "^4.1.0" + } + }, + "node_modules/postgres-array": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz", + "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/postgres-bytea": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.1.tgz", + "integrity": "sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-date": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz", + "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postgres-interval": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz", + "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==", + "license": "MIT", + "dependencies": { + "xtend": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.14.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz", + "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/random-bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", + "integrity": "sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz", + "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/send": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz", + "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.1", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "~2.4.1", + "range-parser": "~1.2.1", + "statuses": "~2.0.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/serve-static": { + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz", + "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==", + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "~0.19.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "license": "ISC", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/streamsearch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", + "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "license": "MIT" + }, + "node_modules/uid-safe": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", + "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==", + "license": "MIT", + "dependencies": { + "random-bytes": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "license": "MIT", + "engines": { + "node": ">=0.4" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..a5e4643 --- /dev/null +++ b/package.json @@ -0,0 +1,15 @@ +{ + "name": "voda-landing", + "version": "1.0.0", + "private": true, + "scripts": { + "start": "node server.js" + }, + "dependencies": { + "bcryptjs": "^3.0.3", + "express": "^4.21.2", + "express-session": "^1.19.0", + "multer": "^2.0.2", + "pg": "^8.18.0" + } +} diff --git a/public/images/hero-bg.png b/public/images/hero-bg.png new file mode 100644 index 0000000..4a01691 Binary files /dev/null and b/public/images/hero-bg.png differ diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..a83a670 --- /dev/null +++ b/public/index.html @@ -0,0 +1,697 @@ + + + + + + Инженерные системы МКД — Череповец | Водоснабжение и канализация + + + + + + + + +
+
+
+ Череповец, Вологодская обл. + | + Пн-Пт: 8:00 - 18:00 +
+ +
+
+ + + + + +
+ +
+ + +
+ + Получить КП + + +
+ + +
+
+
+
+
+
+
+ +
+
+
+ + Работаем только с МКД +
+ +

+ Инженерные системы
+ водоснабжения и канализации
+ для МКД в Череповце +

+ +

+ Проектирование, капитальный ремонт и обслуживание общедомовых + инженерных систем. Работаем с УК, ТСЖ и застройщиками + Вологодской области. +

+ + + +
+
+ + Работа по договору +
+
+ + Прозрачная смета +
+
+ + Гарантия 5 лет +
+
+
+ +
+
+
+
12+
+
лет на рынке
+
+
+
+
87+
+
объектов МКД
+
+
+
+
24+
+
партнёра УК/ТСЖ
+
+
+
+
0
+
аварий после ремонта
+
+
+
+
+
+ + +
+
+
+
УСЛУГИ
+

Профессиональные решения
для общедомовых систем

+

Полный цикл работ по инженерным системам МКД — от проекта до сдачи

+
+ +
+
+
+ +
+

Проектирование систем МКД

+

Разработка проектной документации по СНиП и ГОСТ. Согласование с надзорными органами.

+ Подробнее → +
+
+
+ +
+

Капитальный ремонт ХВС/ГВС

+

Полная замена изношенных коммуникаций. Минимальное время отключения воды.

+ Подробнее → +
+
+
+ +
+

Замена стояков водоснабжения

+

Работы в действующих домах с поэтапным отключением по стоякам.

+ Подробнее → +
+
+
+ +
+

Модернизация инженерных сетей

+

Повышение надёжности, снижение аварийности и эксплуатационных расходов.

+ Подробнее → +
+
+
+
+ + +
+
+
+
ПРЕИМУЩЕСТВА
+

Почему нам доверяют
УК и ТСЖ Череповца

+
+ +
+
+
+

12+ лет в МКД

+

Специализируемся исключительно на многоквартирных домах — знаем специфику

+
+
+
+

Соблюдение сроков

+

Штрафные санкции в договоре за нарушение сроков выполнения работ

+
+
+
+

Прозрачная смета

+

Подробная детализация всех материалов и работ — без скрытых платежей

+
+
+
+

Работа по договору

+

Полный пакет документов: договор, акты, исполнительная документация

+
+
+
+

Гарантия 5 лет

+

Гарантийное обслуживание и оперативное реагирование на обращения

+
+
+
+

Минимум отключений

+

Поэтажное отключение — жители других этажей не остаются без воды

+
+
+
+
+ + +
+
+
+
ПОРТФОЛИО
+

Реализованные объекты в Череповце

+

Каждый проект — это работа в действующем жилом доме с жильцами

+
+ +
+
+
+
+ Капремонт +
+
+ +
+
+
+

Замена стояков ХВС и ГВС

+

ул. Ленина, д. 42 — 9-этажный МКД

+
+ 152 квартиры + 28 дней + Сдано +
+
+
+
+
+
+ Канализация +
+
+ +
+
+
+

Капремонт канализации

+

ул. Металлургов, д. 15 — 5-этажный МКД

+
+ 80 квартир + 21 день + Сдано +
+
+
+
+
+
+ Модернизация +
+
+ +
+
+
+

Модернизация узлов водоснабжения

+

мкр. Зашекснинский — комплекс из 3 домов

+
+ 240 квартир + 45 дней + Сдано +
+
+
+
+
+
+ + +
+
+
+
КАК МЫ РАБОТАЕМ
+

Прозрачный процесс —
от осмотра до сдачи

+

Чёткая последовательность этапов, понятная для УК и ТСЖ

+
+ +
+
+
1
+
+

Осмотр объекта

+

Бесплатный выезд инженера, фиксация состояния систем, фотоотчёт

+
+
+
+
2
+
+

Техническое решение

+

Проектирование оптимального варианта с учётом особенностей дома

+
+
+
+
3
+
+

Коммерческое предложение

+

Детальная смета с расшифровкой материалов и работ за 24 часа

+
+
+
+
4
+
+

Договор

+

Фиксированная цена, сроки, гарантии и штрафные санкции

+
+
+
+
5
+
+

Выполнение и сдача

+

Работы по графику, акты КС-2/КС-3, гарантия 5 лет

+
+
+
+
+
+ + +
+
+
+
+

Получите расчёт стоимости
для вашего МКД

+

Подготовим коммерческое предложение с техническим решением и сметой за 24 часа

+
+
+ + Бесплатный выезд специалиста +
+
+ + КП готово за 24 часа +
+
+ + Без обязательств +
+
+
+ +
+ +
+ + +
+ + +

Нажимая кнопку, вы соглашаетесь с обработкой персональных данных

+
+ +
+
+
+ + +
+
+

Получите расчёт для вашего дома
в Череповце

+

Бесплатный выезд инженера и коммерческое предложение за 24 часа — без обязательств

+ + Получить коммерческое предложение + + +
+
+ + + + + + + diff --git a/public/styles.css b/public/styles.css new file mode 100644 index 0000000..c7c5425 --- /dev/null +++ b/public/styles.css @@ -0,0 +1,1098 @@ +/* ============================================ + VODA LANDING — Premium B2B Engineering + Colors: #0E1A2B / #1B2A3D / #1E6BFF + Fonts: Manrope (headings) + Inter (body) + ============================================ */ + +*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; } + +:root { + --bg-dark: #0E1A2B; + --bg-dark2: #1B2A3D; + --bg-light: #F3F6F9; + --accent: #1E6BFF; + --accent-hover: #1558D4; + --accent-glow: rgba(30,107,255,.15); + --text: #E5E7EB; + --text2: #9CA3AF; + --text-dark: #1E293B; + --text-dark2: #64748B; + --border-dark: rgba(255,255,255,.06); + --border-light: rgba(0,0,0,.06); + --radius: 12px; + --radius-lg: 20px; +} + +html { scroll-behavior: smooth; scroll-padding-top: 80px; } +body { + font-family: 'Inter', sans-serif; + font-size: 17px; + line-height: 1.55; + color: var(--text); + background: var(--bg-dark); + -webkit-font-smoothing: antialiased; +} + +h1, h2, h3, h4 { font-family: 'Manrope', 'Inter', sans-serif; font-weight: 700; line-height: 1.2; } + +.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; } + +/* ====== TOP BAR ====== */ +.top-bar { + background: rgba(14,26,43,.6); + border-bottom: 1px solid var(--border-dark); + font-size: 13px; + color: var(--text2); + padding: 8px 0; + transition: transform .3s, opacity .3s; +} +.top-bar.hidden { transform: translateY(-100%); opacity: 0; position: absolute; } +.top-bar-inner { display: flex; justify-content: space-between; align-items: center; } +.top-bar-left { display: flex; align-items: center; gap: 12px; } +.top-bar-divider { opacity: .3; } +.top-bar-right a { color: var(--text2); text-decoration: none; } +.top-bar-right a:hover { color: #fff; } + +/* ====== NAV ====== */ +#nav { + position: sticky; + top: 0; + z-index: 100; + background: rgba(14,26,43,.85); + backdrop-filter: blur(20px); + border-bottom: 1px solid var(--border-dark); + transition: box-shadow .3s; +} +#nav.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,.3); } +.nav-content { display: flex; align-items: center; justify-content: space-between; height: 72px; } + +/* Logo */ +.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; } +.logo-icon { + width: 42px; height: 42px; + background: var(--accent); + border-radius: 10px; + display: flex; align-items: center; justify-content: center; +} +.logo-text { display: flex; flex-direction: column; } +.logo-name { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 16px; color: #fff; letter-spacing: -.3px; } +.logo-desc { font-size: 11px; color: var(--text2); letter-spacing: .5px; text-transform: uppercase; } + +/* Nav links */ +.nav-links { display: flex; gap: 32px; } +.nav-links a { + color: var(--text2); + text-decoration: none; + font-size: 14px; + font-weight: 500; + letter-spacing: .2px; + transition: color .2s; +} +.nav-links a:hover { color: #fff; } + +/* Nav right */ +.nav-phone { display: flex; align-items: center; gap: 16px; } +.phone-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); } +.phone-icon { + width: 36px; height: 36px; + border-radius: 8px; + background: var(--accent-glow); + display: flex; align-items: center; justify-content: center; + color: var(--accent); +} +.phone-info { display: flex; flex-direction: column; } +.phone-number { font-size: 15px; font-weight: 600; color: #fff; } +.phone-label { font-size: 11px; color: var(--text2); } + +/* CTA Button */ +.btn-primary { + display: inline-flex; align-items: center; gap: 8px; + background: var(--accent); + color: #fff; + font-size: 14px; + font-weight: 600; + padding: 12px 24px; + border-radius: 8px; + border: none; + cursor: pointer; + text-decoration: none; + transition: background .2s, transform .15s; + white-space: nowrap; +} +.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); } +.btn-lg { padding: 16px 32px; font-size: 16px; border-radius: 10px; } +.btn-full { width: 100%; justify-content: center; } +.btn-nav { padding: 10px 20px; font-size: 13px; } +.btn-secondary { + display: inline-flex; align-items: center; gap: 8px; + background: rgba(255,255,255,.06); + border: 1px solid rgba(255,255,255,.12); + color: #fff; + font-size: 14px; + font-weight: 500; + padding: 12px 24px; + border-radius: 8px; + cursor: pointer; + text-decoration: none; + transition: all .2s; +} +.btn-secondary:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); } +.btn-icon-phone { display: flex; } + +/* Burger */ +.burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; } +.burger span { display: block; width: 22px; height: 2px; background: #fff; margin: 5px 0; transition: .3s; border-radius: 2px; } +.burger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); } +.burger.active span:nth-child(2) { opacity: 0; } +.burger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); } + +/* ====== HERO ====== */ +.hero { + position: relative; + overflow: hidden; + padding: 100px 0 80px; + min-height: 90vh; + display: flex; + align-items: center; + background: var(--bg-dark); +} +.hero-bg { + position: absolute; inset: 0; z-index: 0; + background: url('images/hero-bg.png') center center / cover no-repeat; +} +.hero-bg::after { + content: ''; + position: absolute; + inset: 0; + background: linear-gradient(135deg, rgba(14,26,43,.88) 0%, rgba(14,26,43,.65) 50%, rgba(14,26,43,.8) 100%); +} +.hero-grid-pattern { + position: absolute; inset: 0; + background-image: + linear-gradient(rgba(30,107,255,.03) 1px, transparent 1px), + linear-gradient(90deg, rgba(30,107,255,.03) 1px, transparent 1px); + background-size: 60px 60px; +} +.hero-glow { + position: absolute; + border-radius: 50%; + filter: blur(100px); + opacity: .3; +} +.hero-glow-1 { width: 600px; height: 600px; top: -200px; right: -100px; background: var(--accent); opacity: .08; } +.hero-glow-2 { width: 400px; height: 400px; bottom: -100px; left: -50px; background: #06b6d4; opacity: .06; } +.hero-lines { display: none; } + +.hero-container { position: relative; z-index: 1; } + +.hero-content { max-width: 720px; } + +/* Badge */ +.badge { + display: inline-flex; align-items: center; gap: 8px; + background: var(--accent-glow); + border: 1px solid rgba(30,107,255,.2); + color: var(--accent); + font-size: 13px; + font-weight: 600; + padding: 8px 18px; + border-radius: 100px; + margin-bottom: 32px; + letter-spacing: .3px; +} +.pulse { + width: 8px; height: 8px; + background: var(--accent); + border-radius: 50%; + animation: pulse 2s infinite; +} +@keyframes pulse { + 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(30,107,255,.4); } + 50% { opacity: .8; box-shadow: 0 0 0 8px rgba(30,107,255,0); } +} + +/* Hero heading */ +.hero h1 { + font-size: 56px; + font-weight: 800; + line-height: 1.1; + margin-bottom: 28px; + letter-spacing: -1.5px; + color: #fff; +} +.gradient-text { + background: linear-gradient(135deg, var(--accent), #38bdf8); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; +} + +.lead { + font-size: 19px; + line-height: 1.6; + color: var(--text2); + margin-bottom: 40px; + max-width: 560px; +} + +/* Hero buttons */ +.hero-buttons { display: flex; gap: 16px; margin-bottom: 48px; flex-wrap: wrap; } + +/* Trust items */ +.hero-trust { display: flex; gap: 28px; flex-wrap: wrap; } +.trust-item { + display: flex; align-items: center; gap: 8px; + color: var(--text2); + font-size: 14px; + font-weight: 500; +} + +/* Stats panel */ +.hero-stats-panel { + margin-top: 72px; +} +.stats-card { + display: flex; + background: var(--bg-dark2); + border: 1px solid var(--border-dark); + border-radius: var(--radius-lg); + padding: 40px 48px; + gap: 0; + justify-content: space-between; +} +.stat-item-new { flex: 1; text-align: center; } +.stat-number-new { + font-family: 'Manrope', sans-serif; + font-size: 44px; + font-weight: 800; + color: var(--accent); + letter-spacing: -1px; + line-height: 1; + margin-bottom: 8px; +} +.stat-label-new { + font-size: 14px; + color: var(--text2); + font-weight: 500; +} +.stat-divider { + width: 1px; + background: var(--border-dark); + margin: 0 24px; +} + +/* ====== SECTION SHARED ====== */ +.section-header { text-align: center; margin-bottom: 64px; } +.section-badge { + display: inline-block; + font-size: 12px; + font-weight: 700; + letter-spacing: 2px; + color: var(--accent); + text-transform: uppercase; + margin-bottom: 16px; +} +.section-header h2 { + font-size: 40px; + font-weight: 800; + letter-spacing: -1px; + margin-bottom: 16px; +} +.section-subtitle { + font-size: 18px; + color: var(--text2); + max-width: 560px; + margin: 0 auto; + line-height: 1.6; +} +/* For light sections */ +.light-section { background: var(--bg-light); color: var(--text-dark); } +.light-section .section-subtitle { color: var(--text-dark2); } +.light-section .gradient-text { + background: linear-gradient(135deg, var(--accent), #0EA5E9); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; +} + +/* ====== SERVICES ====== */ +.services { padding: 100px 0; background: var(--bg-light); } +.services .section-header h2 { color: var(--text-dark); } +.services .section-subtitle { color: var(--text-dark2); } + +.services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; } + +.service-card { + background: #fff; + border: 1px solid var(--border-light); + border-radius: var(--radius-lg); + padding: 36px; + transition: transform .25s, box-shadow .25s; +} +.service-card:hover { transform: translateY(-4px); box-shadow: 0 20px 60px rgba(0,0,0,.06); } + +.service-icon { + width: 52px; height: 52px; + background: var(--accent); + border-radius: 12px; + display: flex; align-items: center; justify-content: center; + margin-bottom: 20px; +} +.service-card h3 { + font-size: 20px; + font-weight: 700; + color: var(--text-dark); + margin-bottom: 12px; +} +.service-card p { + font-size: 15px; + line-height: 1.6; + color: var(--text-dark2); + margin-bottom: 16px; +} +.service-link { + color: var(--accent); + font-size: 14px; + font-weight: 600; + text-decoration: none; + transition: gap .2s; + display: inline-flex; align-items: center; gap: 4px; +} +.service-link:hover { gap: 8px; } + +/* ====== BENEFITS ====== */ +.benefits { padding: 100px 0; background: var(--bg-dark); } + +.benefits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; } + +.benefit-card { + display: flex; align-items: flex-start; gap: 16px; + background: var(--bg-dark2); + border: 1px solid var(--border-dark); + border-radius: var(--radius); + padding: 28px; + transition: transform .25s, border-color .25s; +} +.benefit-card:hover { transform: translateY(-2px); border-color: rgba(30,107,255,.2); } + +.benefit-icon { + width: 48px; height: 48px; + min-width: 48px; + background: var(--accent-glow); + border-radius: 10px; + display: flex; align-items: center; justify-content: center; +} +.benefit-text h3 { + font-size: 16px; + font-weight: 700; + color: #fff; + margin-bottom: 6px; +} +.benefit-text p { + font-size: 14px; + line-height: 1.5; + color: var(--text2); +} + +/* ====== WORK PROCESS ====== */ +.process { padding: 100px 0; background: var(--bg-light); } +.process .section-header h2 { color: var(--text-dark); } +.process .section-subtitle { color: var(--text-dark2); } + +.process-grid { + display: grid; + grid-template-columns: repeat(5, 1fr); + gap: 20px; + position: relative; +} +.process-grid::before { + content: ''; + position: absolute; + top: 36px; + left: 10%; + right: 10%; + height: 2px; + background: linear-gradient(90deg, var(--accent), #38bdf8); + opacity: .2; + z-index: 0; +} +.process-step { + text-align: center; + position: relative; + z-index: 1; +} +.process-num { + width: 72px; height: 72px; + background: #fff; + border: 2px solid rgba(30,107,255,.15); + border-radius: 50%; + display: flex; align-items: center; justify-content: center; + margin: 0 auto 20px; + font-family: 'Manrope', sans-serif; + font-size: 28px; + font-weight: 800; + color: var(--accent); + box-shadow: 0 4px 20px rgba(30,107,255,.08); +} +.process-step h3 { + font-size: 16px; + font-weight: 700; + color: var(--text-dark); + margin-bottom: 8px; +} +.process-step p { + font-size: 14px; + color: var(--text-dark2); + line-height: 1.5; +} + +/* ====== PROJECTS ====== */ +.projects { padding: 100px 0; background: var(--bg-dark); } + +.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; } + +.project-card { + background: var(--bg-dark2); + border: 1px solid var(--border-dark); + border-radius: var(--radius-lg); + overflow: hidden; + transition: transform .25s, box-shadow .25s; +} +.project-card:hover { transform: translateY(-4px); box-shadow: 0 20px 60px rgba(0,0,0,.2); } + +.project-img { + height: 200px; + background: linear-gradient(135deg, var(--bg-dark2), #1a2d45); + display: flex; align-items: center; justify-content: center; + position: relative; + overflow: hidden; +} +.project-img img { + width: 100%; + height: 100%; + object-fit: cover; +} +.project-overlay { position: absolute; top: 16px; left: 16px; z-index: 2; } +.project-tag { + font-size: 12px; + font-weight: 600; + color: #fff; + background: var(--accent); + padding: 5px 14px; + border-radius: 100px; +} +.project-icon-bg { + position: absolute; + display: flex; align-items: center; justify-content: center; + opacity: .5; +} + +.project-info { padding: 24px; } +.project-info h3 { + font-size: 18px; + font-weight: 700; + color: #fff; + margin-bottom: 6px; +} +.project-address { + font-size: 14px; + color: var(--text2); + margin-bottom: 16px; +} +.project-stats { + display: flex; + gap: 16px; + font-size: 13px; + color: var(--text2); +} +.project-stats span { display: flex; align-items: center; gap: 4px; } + +/* ====== CTA ====== */ +.cta { + padding: 100px 0; + background: var(--bg-light); +} +.cta-box { + background: #fff; + border: 1px solid var(--border-light); + border-radius: var(--radius-lg); + padding: 64px; + display: grid; + grid-template-columns: 1fr 1fr; + gap: 64px; + align-items: center; + box-shadow: 0 20px 80px rgba(0,0,0,.04); +} +.cta-left h2 { + font-size: 36px; + font-weight: 800; + color: var(--text-dark); + letter-spacing: -1px; + margin-bottom: 16px; + line-height: 1.15; +} +.cta-left .gradient-text { + background: linear-gradient(135deg, var(--accent), #0EA5E9); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; +} +.cta-left p { + font-size: 16px; + color: var(--text-dark2); + line-height: 1.6; + margin-bottom: 28px; +} +.cta-features { display: flex; flex-direction: column; gap: 12px; } +.cta-feature { + display: flex; align-items: center; gap: 10px; + font-size: 15px; + color: var(--text-dark); + font-weight: 500; +} + +/* Form */ +.contact-form { display: flex; flex-direction: column; gap: 14px; } +.contact-form input, +.contact-form textarea { + background: var(--bg-light); + border: 1px solid rgba(0,0,0,.08); + border-radius: 10px; + padding: 16px 20px; + font-size: 15px; + font-family: 'Inter', sans-serif; + color: var(--text-dark); + outline: none; + transition: border-color .2s; +} +.contact-form input:focus, +.contact-form textarea:focus { border-color: var(--accent); } +.contact-form input::placeholder, +.contact-form textarea::placeholder { color: #94a3b8; } +.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } +.form-disclaimer { + font-size: 12px; + color: #94a3b8; + text-align: center; + margin-top: 4px; +} + +/* ====== BOTTOM CTA ====== */ +.bottom-cta { + padding: 80px 0; + background: var(--bg-dark2); + text-align: center; +} +.bottom-cta h2 { + font-size: 36px; + font-weight: 800; + color: #fff; + letter-spacing: -1px; + margin-bottom: 16px; +} +.bottom-cta p { + font-size: 17px; + color: var(--text2); + margin-bottom: 36px; +} + +/* ====== FOOTER ====== */ +footer { + background: var(--bg-dark); + border-top: 1px solid var(--border-dark); + padding: 60px 0 32px; +} +.footer-grid { + display: grid; + grid-template-columns: 1.2fr 1fr 1fr; + gap: 48px; + margin-bottom: 48px; +} +footer h4 { + font-size: 14px; + font-weight: 700; + color: #fff; + margin-bottom: 16px; + letter-spacing: .5px; + text-transform: uppercase; +} +footer p { + font-size: 14px; + color: var(--text2); + margin-bottom: 10px; + line-height: 1.6; +} +footer a { color: var(--text2); text-decoration: none; transition: color .2s; } +footer a:hover { color: #fff; } +.footer-bottom { + border-top: 1px solid var(--border-dark); + padding-top: 24px; + font-size: 13px; + color: var(--text2); + text-align: center; +} + +/* ====== ANIMATIONS ====== */ +.animate-on-scroll { + opacity: 0; + transform: translateY(24px); + transition: opacity .5s ease, transform .5s ease; +} +.animate-on-scroll.visible { opacity: 1; transform: translateY(0); } + +/* Staggered delays for cards */ +.animate-on-scroll:nth-child(1) { transition-delay: 0s; } +.animate-on-scroll:nth-child(2) { transition-delay: .08s; } +.animate-on-scroll:nth-child(3) { transition-delay: .16s; } +.animate-on-scroll:nth-child(4) { transition-delay: .24s; } +.animate-on-scroll:nth-child(5) { transition-delay: .32s; } +.animate-on-scroll:nth-child(6) { transition-delay: .4s; } + +/* ====== SCROLLBAR HIDE for carousels ====== */ +.services-grid::-webkit-scrollbar, +.benefits-grid::-webkit-scrollbar, +.projects-grid::-webkit-scrollbar { display: none; } +.services-grid, .benefits-grid, .projects-grid { + scrollbar-width: none; + -ms-overflow-style: none; +} + +/* ====== MOBILE MENU (fullscreen) ====== */ +.mobile-menu { + position: fixed; + top: 64px; + left: 0; + right: 0; + bottom: 0; + z-index: 1000; + background: var(--bg-dark); + display: flex; + flex-direction: column; + opacity: 0; + visibility: hidden; + transform: translateY(-10px); + transition: opacity .3s, transform .3s, visibility .3s; +} +.mobile-menu.open { + opacity: 1; + visibility: visible; + transform: translateY(0); +} +.mobile-menu-inner { + flex: 1; + display: flex; + flex-direction: column; + padding: 8px 24px 24px; + overflow-y: auto; +} +.mobile-link { + display: flex; + align-items: center; + justify-content: space-between; + padding: 18px 0; + color: #fff; + text-decoration: none; + font-size: 18px; + font-weight: 600; + font-family: 'Manrope', sans-serif; + border-bottom: 1px solid var(--border-dark); + transition: color .2s; +} +.mobile-link svg { color: var(--text2); } +.mobile-link:active { color: var(--accent); } +.mobile-menu-bottom { + margin-top: auto; + padding-top: 24px; + display: flex; + flex-direction: column; + gap: 12px; +} +.mobile-phone-btn { + display: flex; + align-items: center; + justify-content: center; + gap: 10px; + padding: 16px; + background: var(--bg-dark2); + border: 1px solid var(--border-dark); + border-radius: 12px; + color: #fff; + font-size: 17px; + font-weight: 600; + text-decoration: none; +} +body.menu-open { overflow: hidden; } + +/* ====== FLOATING MOBILE CTA ====== */ +.mobile-float-cta { + display: none; +} +.btn-float { + display: inline-flex; + align-items: center; + gap: 8px; + background: var(--accent); + color: #fff; + font-size: 15px; + font-weight: 700; + padding: 14px 28px; + border-radius: 100px; + border: none; + text-decoration: none; + box-shadow: 0 8px 32px rgba(30,107,255,.4), 0 2px 8px rgba(0,0,0,.2); + transition: transform .15s, box-shadow .15s; +} +.btn-float:active { + transform: scale(.96); + box-shadow: 0 4px 16px rgba(30,107,255,.3); +} + +/* ====== CAROUSEL DOTS ====== */ +.carousel-dots { + display: flex; + justify-content: center; + gap: 8px; + margin-top: 24px; +} +.carousel-dot { + width: 8px; height: 8px; + border-radius: 50%; + background: rgba(30,107,255,.2); + cursor: pointer; + transition: all .3s; +} +.carousel-dot.active { + background: var(--accent); + width: 24px; + border-radius: 4px; +} +/* Light sections dots */ +.services .carousel-dots .carousel-dot { background: rgba(30,107,255,.15); } +.services .carousel-dots .carousel-dot.active { background: var(--accent); } + +/* ====== RESPONSIVE — TABLET ====== */ +@media (max-width: 1024px) { + .hero h1 { font-size: 44px; } + .section-header h2 { font-size: 34px; } + .stats-card { padding: 28px 32px; } + .stat-number-new { font-size: 36px; } + .cta-box { padding: 48px; gap: 40px; } + .process-grid { grid-template-columns: repeat(5, 1fr); gap: 12px; } +} + +/* ====== RESPONSIVE — MOBILE ====== */ +@media (max-width: 768px) { + body { font-size: 16px; } + .container { padding: 0 20px; } + + /* === NAV === */ + .nav-links, .nav-phone { display: none; } + .burger { display: block; } + .nav-content { height: 64px; } + .top-bar { display: none; } + + /* === FLOATING CTA === */ + .mobile-float-cta { + display: block; + position: fixed; + bottom: 24px; + left: 50%; + transform: translateX(-50%) translateY(100px); + z-index: 90; + opacity: 0; + transition: transform .4s cubic-bezier(.34,1.56,.64,1), opacity .3s; + pointer-events: none; + } + .mobile-float-cta.visible { + transform: translateX(-50%) translateY(0); + opacity: 1; + pointer-events: all; + } + + /* === HERO === */ + .hero { + padding: 48px 0 40px; + min-height: auto; + } + .hero h1 { + font-size: 32px; + letter-spacing: -.8px; + line-height: 1.15; + margin-bottom: 20px; + } + .lead { + font-size: 16px; + line-height: 1.55; + margin-bottom: 28px; + color: var(--text2); + } + .badge { + margin-bottom: 20px; + font-size: 12px; + padding: 6px 14px; + } + + /* Hero buttons */ + .hero-buttons { + flex-direction: column; + gap: 10px; + margin-bottom: 32px; + } + .hero-buttons .btn-lg { + justify-content: center; + padding: 14px 24px; + font-size: 15px; + border-radius: 10px; + } + .hero-buttons .btn-secondary { + padding: 14px 24px; + justify-content: center; + font-size: 15px; + } + + /* Trust */ + .hero-trust { + display: flex; + flex-wrap: wrap; + gap: 12px 20px; + } + .trust-item { font-size: 13px; } + + /* === STATS === */ + .hero-stats-panel { margin-top: 36px; } + .stats-card { + display: grid; + grid-template-columns: 1fr 1fr; + padding: 0; + gap: 0; + background: var(--bg-dark2); + border: 1px solid var(--border-dark); + border-radius: 16px; + overflow: hidden; + } + .stat-item-new { + padding: 24px 16px; + text-align: center; + border-bottom: 1px solid var(--border-dark); + border-right: 1px solid var(--border-dark); + } + .stat-item-new:nth-child(even) { border-right: none; } + .stat-item-new:nth-last-child(-n+2) { border-bottom: none; } + .stat-number-new { font-size: 32px; margin-bottom: 4px; } + .stat-label-new { font-size: 12px; } + .stat-divider { display: none; } + + /* === SECTIONS GENERAL === */ + .services, .benefits, .projects, .cta, .process, .bottom-cta { padding: 56px 0; } + .section-header { margin-bottom: 32px; } + .section-header h2 { + font-size: 26px; + letter-spacing: -.5px; + line-height: 1.2; + } + .section-subtitle { font-size: 15px; line-height: 1.55; } + .section-badge { font-size: 11px; letter-spacing: 1.5px; margin-bottom: 12px; } + + /* === SERVICES CAROUSEL === */ + .services-grid { + display: flex; + overflow-x: auto; + scroll-snap-type: x mandatory; + -webkit-overflow-scrolling: touch; + touch-action: pan-x; + gap: 12px; + padding: 0 0 4px; + margin: 0 -20px; + padding-left: 20px; + padding-right: 20px; + } + .service-card { + min-width: 82%; + max-width: 82%; + scroll-snap-align: center; + flex-shrink: 0; + padding: 28px; + } + .service-card h3 { font-size: 18px; } + .service-card p { font-size: 14px; } + + /* === BENEFITS CAROUSEL === */ + .benefits-grid { + display: flex; + overflow-x: auto; + scroll-snap-type: x mandatory; + -webkit-overflow-scrolling: touch; + touch-action: pan-x; + gap: 12px; + margin: 0 -20px; + padding: 0 20px 4px; + } + .benefit-card { + min-width: 82%; + max-width: 82%; + scroll-snap-align: center; + flex-shrink: 0; + padding: 24px; + } + .benefit-text h3 { font-size: 15px; } + .benefit-text p { font-size: 13px; } + .benefit-icon { + width: 44px; height: 44px; min-width: 44px; + border-radius: 10px; + } + .benefit-icon svg { width: 22px; height: 22px; } + + /* === PROCESS TIMELINE === */ + .process-grid { + display: flex; + flex-direction: column; + gap: 0; + position: relative; + padding-left: 0; + } + .process-grid::before { + content: ''; + position: absolute; + top: 40px; + bottom: 40px; + left: 23px; + width: 2px; + background: linear-gradient(180deg, var(--accent), rgba(30,107,255,.08)); + border-radius: 2px; + } + .process-step { + display: flex; + align-items: flex-start; + gap: 16px; + text-align: left; + padding: 12px 0; + position: relative; + } + .process-num { + width: 48px; height: 48px; min-width: 48px; + font-size: 20px; + margin: 0; + position: relative; + z-index: 1; + box-shadow: 0 2px 12px rgba(30,107,255,.1); + } + .process-step h3 { font-size: 16px; margin-bottom: 4px; } + .process-step p { font-size: 14px; line-height: 1.5; } + + /* === PROJECTS CAROUSEL === */ + .projects-grid { + display: flex; + overflow-x: auto; + scroll-snap-type: x mandatory; + -webkit-overflow-scrolling: touch; + touch-action: pan-x; + gap: 12px; + margin: 0 -20px; + padding: 0 20px 4px; + } + .project-card { + min-width: 85%; + max-width: 85%; + scroll-snap-align: center; + flex-shrink: 0; + } + .project-img { height: 180px; } + .project-info { padding: 20px; } + .project-info h3 { font-size: 16px; } + .project-address { font-size: 13px; margin-bottom: 12px; } + .project-stats { font-size: 12px; gap: 12px; } + + /* === CTA FORM === */ + .cta-box { + grid-template-columns: 1fr; + padding: 28px; + gap: 28px; + border-radius: 16px; + } + .cta-left h2 { + font-size: 26px; + line-height: 1.2; + } + .cta-left p { font-size: 15px; margin-bottom: 20px; } + .cta-features { gap: 10px; } + .cta-feature { font-size: 14px; } + .form-row { grid-template-columns: 1fr; } + .contact-form input, + .contact-form textarea { + padding: 14px 16px; + font-size: 15px; + border-radius: 10px; + } + .contact-form .btn-lg { + padding: 16px; + font-size: 16px; + } + + /* === BOTTOM CTA === */ + .bottom-cta { + padding: 48px 0; + } + .bottom-cta h2 { + font-size: 26px; + line-height: 1.2; + margin-bottom: 12px; + } + .bottom-cta p { font-size: 15px; margin-bottom: 28px; } + .bottom-cta .btn-lg { padding: 16px 28px; font-size: 15px; max-width: 100%; white-space: normal; text-align: center; justify-content: center; } + + /* === FOOTER === */ + .footer-grid { + grid-template-columns: 1fr; + gap: 28px; + } + footer { padding: 48px 0 100px; } /* extra bottom for floating CTA */ + footer h4 { font-size: 13px; margin-bottom: 12px; } + footer p { font-size: 13px; margin-bottom: 8px; } + .footer-bottom { font-size: 12px; padding-top: 20px; } + + /* Logo in footer */ + .footer-grid .logo-name { font-size: 15px; } + + /* === MOBILE TOUCH FEEDBACK === */ + .service-card:active, + .benefit-card:active, + .project-card:active { transform: none; } + .service-card:hover, + .benefit-card:hover, + .project-card:hover { transform: none; box-shadow: none; } + + /* === PROCESS LIGHT SECTION on mobile === */ + .process .process-step h3 { color: var(--text-dark); } + .process .process-step p { color: var(--text-dark2); } + .process .process-num { + background: #fff; + border: 2px solid rgba(30,107,255,.12); + color: var(--accent); + } + + /* === HERO mobile fine-tune === */ + .hero h1 br:first-of-type { display: none; } + .hero-glow-1 { width: 300px; height: 300px; opacity: .06; } + .hero-glow-2 { width: 200px; height: 200px; opacity: .04; } + + /* === SMOOTH CARD SCROLL INDICATOR === */ + .services-grid::after, + .benefits-grid::after, + .projects-grid::after { + content: ''; + min-width: 8px; + flex-shrink: 0; + } +} + +/* ====== RESPONSIVE — SMALL PHONES ====== */ +@media (max-width: 380px) { + .hero h1 { font-size: 27px; } + .lead { font-size: 15px; } + .section-header h2 { font-size: 23px; } + .stats-card { grid-template-columns: 1fr; } + .stat-item-new { border-right: none !important; } + .stat-item-new:last-child { border-bottom: none; } + .service-card, .benefit-card, .project-card { min-width: 90%; max-width: 90%; } + .cta-box { padding: 24px; } + .cta-left h2 { font-size: 22px; } +} diff --git a/public/uploads/.gitkeep b/public/uploads/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/server.js b/server.js new file mode 100644 index 0000000..f14e61a --- /dev/null +++ b/server.js @@ -0,0 +1,273 @@ +const express = require('express'); +const { Pool } = require('pg'); +const session = require('express-session'); +const bcrypt = require('bcryptjs'); +const path = require('path'); +const https = require('https'); +const multer = require('multer'); + +const app = express(); +const PORT = 3006; + +// Multer config +const storage = multer.diskStorage({ + destination: (req, file, cb) => cb(null, path.join(__dirname, 'public/uploads')), + filename: (req, file, cb) => { + const ext = path.extname(file.originalname); + cb(null, 'project-' + Date.now() + ext); + } +}); +const upload = multer({ storage, limits: { fileSize: 10 * 1024 * 1024 }, fileFilter: (req, file, cb) => { + const ok = /\.(jpg|jpeg|png|webp|gif)$/i.test(file.originalname); + cb(null, ok); +}}); + +// DB +const pool = new Pool({ + user: 'postgres', + host: 'localhost', + database: 'voda_landing', + password: 'postgres', + port: 5432, +}); + +// Middleware +app.use(express.json()); +app.use(express.urlencoded({ extended: true })); +app.use(session({ + secret: 'voda-landing-secret-' + Date.now(), + resave: false, + saveUninitialized: false, + cookie: { maxAge: 24 * 60 * 60 * 1000 } +})); + +// Static +app.use('/admin', express.static(path.join(__dirname, 'admin'))); +app.use(express.static('public')); + +// Admin password (default: admin) +const ADMIN_HASH = bcrypt.hashSync('admin', 10); + +// Auth middleware +function requireAuth(req, res, next) { + if (req.session && req.session.admin) return next(); + res.status(401).json({ error: 'Unauthorized' }); +} + +// === AUTH === +app.post('/api/login', async (req, res) => { + const { password } = req.body; + // Check DB for admin password, fallback to default + const r = await pool.query("SELECT value FROM settings WHERE key='admin_password'"); + const hash = r.rows.length ? r.rows[0].value : ADMIN_HASH; + if (bcrypt.compareSync(password || '', hash)) { + req.session.admin = true; + res.json({ ok: true }); + } else { + res.status(401).json({ error: 'Wrong password' }); + } +}); + +app.post('/api/logout', (req, res) => { + req.session.destroy(); + res.json({ ok: true }); +}); + +app.get('/api/auth-check', (req, res) => { + res.json({ auth: !!(req.session && req.session.admin) }); +}); + +// === SETTINGS === +app.get('/api/settings', requireAuth, async (req, res) => { + const r = await pool.query('SELECT key, value FROM settings'); + const obj = {}; + r.rows.forEach(row => obj[row.key] = row.value); + res.json(obj); +}); + +app.put('/api/settings', requireAuth, async (req, res) => { + const entries = Object.entries(req.body); + for (const [key, value] of entries) { + await pool.query( + `INSERT INTO settings (key, value, updated_at) VALUES ($1, $2, NOW()) + ON CONFLICT (key) DO UPDATE SET value=$2, updated_at=NOW()`, + [key, value] + ); + } + res.json({ ok: true }); +}); + +// === SERVICES === +app.get('/api/services', requireAuth, async (req, res) => { + const r = await pool.query('SELECT * FROM services ORDER BY sort_order'); + res.json(r.rows); +}); + +app.post('/api/services', requireAuth, async (req, res) => { + const { title, description, icon_svg, sort_order } = req.body; + const r = await pool.query( + 'INSERT INTO services (title, description, icon_svg, sort_order) VALUES ($1,$2,$3,$4) RETURNING *', + [title, description, icon_svg || '', sort_order || 0] + ); + res.json(r.rows[0]); +}); + +app.put('/api/services/:id', requireAuth, async (req, res) => { + const { title, description, icon_svg, sort_order, active } = req.body; + const r = await pool.query( + 'UPDATE services SET title=$1, description=$2, icon_svg=$3, sort_order=$4, active=$5 WHERE id=$6 RETURNING *', + [title, description, icon_svg, sort_order, active, req.params.id] + ); + res.json(r.rows[0]); +}); + +app.delete('/api/services/:id', requireAuth, async (req, res) => { + await pool.query('DELETE FROM services WHERE id=$1', [req.params.id]); + res.json({ ok: true }); +}); + +// === BENEFITS === +app.get('/api/benefits', requireAuth, async (req, res) => { + const r = await pool.query('SELECT * FROM benefits ORDER BY sort_order'); + res.json(r.rows); +}); + +app.post('/api/benefits', requireAuth, async (req, res) => { + const { title, description, icon_svg, sort_order } = req.body; + const r = await pool.query( + 'INSERT INTO benefits (title, description, icon_svg, sort_order) VALUES ($1,$2,$3,$4) RETURNING *', + [title, description, icon_svg || '', sort_order || 0] + ); + res.json(r.rows[0]); +}); + +app.put('/api/benefits/:id', requireAuth, async (req, res) => { + const { title, description, icon_svg, sort_order, active } = req.body; + const r = await pool.query( + 'UPDATE benefits SET title=$1, description=$2, icon_svg=$3, sort_order=$4, active=$5 WHERE id=$6 RETURNING *', + [title, description, icon_svg, sort_order, active, req.params.id] + ); + res.json(r.rows[0]); +}); + +app.delete('/api/benefits/:id', requireAuth, async (req, res) => { + await pool.query('DELETE FROM benefits WHERE id=$1', [req.params.id]); + res.json({ ok: true }); +}); + +// === UPLOAD === +app.post('/api/upload', requireAuth, upload.single('image'), (req, res) => { + if (!req.file) return res.status(400).json({ error: 'No file' }); + res.json({ url: '/uploads/' + req.file.filename }); +}); + +// === PROJECTS === +app.get('/api/projects', requireAuth, async (req, res) => { + const r = await pool.query('SELECT * FROM projects ORDER BY sort_order'); + res.json(r.rows); +}); + +app.post('/api/projects', requireAuth, async (req, res) => { + const { title, address, tag, apartments, duration, status, icon_svg, sort_order, image_url } = req.body; + const r = await pool.query( + 'INSERT INTO projects (title, address, tag, apartments, duration, status, icon_svg, sort_order, image_url) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9) RETURNING *', + [title, address, tag, apartments, duration, status || 'Сдано', icon_svg || '', sort_order || 0, image_url || ''] + ); + res.json(r.rows[0]); +}); + +app.put('/api/projects/:id', requireAuth, async (req, res) => { + const { title, address, tag, apartments, duration, status, icon_svg, sort_order, active, image_url } = req.body; + const r = await pool.query( + 'UPDATE projects SET title=$1, address=$2, tag=$3, apartments=$4, duration=$5, status=$6, icon_svg=$7, sort_order=$8, active=$9, image_url=$10 WHERE id=$11 RETURNING *', + [title, address, tag, apartments, duration, status, icon_svg, sort_order, active, image_url || '', req.params.id] + ); + res.json(r.rows[0]); +}); + +app.delete('/api/projects/:id', requireAuth, async (req, res) => { + await pool.query('DELETE FROM projects WHERE id=$1', [req.params.id]); + res.json({ ok: true }); +}); + +// === LEADS === +app.get('/api/leads', requireAuth, async (req, res) => { + const r = await pool.query('SELECT * FROM leads ORDER BY created_at DESC'); + res.json(r.rows); +}); + +app.put('/api/leads/:id', requireAuth, async (req, res) => { + const { status } = req.body; + const r = await pool.query( + 'UPDATE leads SET status=$1, updated_at=NOW() WHERE id=$2 RETURNING *', + [status, req.params.id] + ); + res.json(r.rows[0]); +}); + +app.delete('/api/leads/:id', requireAuth, async (req, res) => { + await pool.query('DELETE FROM leads WHERE id=$1', [req.params.id]); + res.json({ ok: true }); +}); + +// === PUBLIC: Submit lead === +app.post('/api/submit-lead', async (req, res) => { + const { company, name, phone, message } = req.body; + if (!phone) return res.status(400).json({ error: 'Phone required' }); + + const r = await pool.query( + 'INSERT INTO leads (company, name, phone, message) VALUES ($1,$2,$3,$4) RETURNING *', + [company || '', name || '', phone, message || ''] + ); + + // Telegram notification + try { + const tgR = await pool.query("SELECT key, value FROM settings WHERE key IN ('tg_bot_token','tg_chat_id','tg_enabled')"); + const tg = {}; + tgR.rows.forEach(row => tg[row.key] = row.value); + + if (tg.tg_enabled === 'true' && tg.tg_bot_token && tg.tg_chat_id) { + const text = `🔔 Новая заявка!\n\n🏢 ${company || '—'}\n👤 ${name || '—'}\n📞 ${phone}\n💬 ${message || '—'}`; + const url = `https://api.telegram.org/bot${tg.tg_bot_token}/sendMessage`; + const data = JSON.stringify({ chat_id: tg.tg_chat_id, text, parse_mode: 'HTML' }); + + const req2 = https.request(url, { method: 'POST', headers: { 'Content-Type': 'application/json' } }); + req2.write(data); + req2.end(); + } + } catch (e) { + console.error('TG error:', e.message); + } + + res.json({ ok: true, id: r.rows[0].id }); +}); + +// === PUBLIC: Get landing data === +app.get('/api/landing-data', async (req, res) => { + const [settingsR, servicesR, benefitsR, projectsR] = await Promise.all([ + pool.query('SELECT key, value FROM settings'), + pool.query('SELECT * FROM services WHERE active=true ORDER BY sort_order'), + pool.query('SELECT * FROM benefits WHERE active=true ORDER BY sort_order'), + pool.query('SELECT * FROM projects WHERE active=true ORDER BY sort_order'), + ]); + const settings = {}; + settingsR.rows.forEach(row => settings[row.key] = row.value); + res.json({ settings, services: servicesR.rows, benefits: benefitsR.rows, projects: projectsR.rows }); +}); + +// === CHANGE PASSWORD === +app.put('/api/change-password', requireAuth, async (req, res) => { + const { password } = req.body; + if (!password || password.length < 4) return res.status(400).json({ error: 'Min 4 chars' }); + const hash = bcrypt.hashSync(password, 10); + await pool.query( + `INSERT INTO settings (key, value, updated_at) VALUES ('admin_password', $1, NOW()) + ON CONFLICT (key) DO UPDATE SET value=$1, updated_at=NOW()`, + [hash] + ); + res.json({ ok: true }); +}); + +app.listen(PORT, () => { + console.log(`Server running on port ${PORT}`); +});