Commit Graph

26 Commits

Author SHA1 Message Date
treamz
b7e9eb03ab Status page: clean neutral design, uptime only
- Removed technical details (memory, PID, disk, ffmpeg checks)
- Services: API, Database, Image Processing, Video Processing, Auth
- Clean layout like status.claude.com
- Same header as auth pages (unified nav)
- English labels (Operational/Degraded/Outage)
2026-03-22 00:43:06 +03:00
treamz
5c7066b7d3 Security hardening: helmet, rate limits, session fixes, admin auth
Critical fixes:
- helmet middleware (X-Frame-Options, HSTS, X-Content-Type, CSP, etc)
- Remove /admin from PUBLIC_PREFIXES (double auth: session + admin role)
- Session cookie: httpOnly, sameSite=lax, 1-day expiry (was 30 days)
- Session regeneration on login (prevent session fixation)
- Blocked user check on login

Rate limiting:
- /auth/login: 10 req / 15 min (brute force protection)
- /auth/register: 10 req / 15 min (spam protection)
- /parse, /metadata, /text, /preview: 20 req / min (DDoS via server)

Input sanitization:
- Strip HTML tags from display_name (stored XSS prevention)
2026-03-22 00:39:38 +03:00
treamz
64bf816e34 Status page: public monitoring at /status
- Real-time checks: web server, MariaDB, FFmpeg, disk usage
- Auto-refresh every 30 seconds
- Overall status banner (operational/degraded/outage)
- Server info: Node version, uptime, memory, PID
- Public page (no auth required)
- Responsive, theme-aware design
2026-03-22 00:35:15 +03:00
treamz
6ac3366ea9 Security: lock down API — only landing endpoints public
- Only /api/settings, /api/tools, /api/content/advantages|dashboard public
- All other /api/* require authentication (401)
- Moved API mount after auth middleware, public endpoints before
2026-03-22 00:28:32 +03:00
treamz
3353253cef Fix video progress: parse each chunk, -progress pipe:2, out_time support
- Parse time= from each stderr chunk (not accumulated buffer)
- Add -progress pipe:2 flag for frequent progress output
- Support both time= and out_time= formats
- Progress only increases (no jumps back)
2026-03-22 00:22:48 +03:00
treamz
6aca7e9e47 Video: async conversion with live progress polling
- /convert now returns immediately, ffmpeg runs in background
- Client polls /progress every second for live progress %
- Progress endpoint returns downloadUrl/outputSize when done
- UI shows real-time percentage during conversion
2026-03-22 00:20:04 +03:00
treamz
7f2a6f208f Video: upload progress bar with percentage (XMLHttpRequest) 2026-03-22 00:18:10 +03:00
treamz
b079263534 Fix video: use mpeg4 software encoder (v4l2m2m hw fails on this RPi) 2026-03-22 00:15:05 +03:00
treamz
a048e84f26 Fix: landing nav uses CSS variables instead of hardcoded dark rgba 2026-03-22 00:11:33 +03:00
treamz
69ec8f4ede UI: light theme default, remove free mentions, fix scroll animation
- Default theme: light (was dark)
- Removed all бесплатно/free/навсегда mentions across all pages
- Landing: title, hero badge, hero text, CTA button, advantages, footer CTA
- Dashboard: hero text, about section, stats
- Register: subtitle
- Fixed scroll-hint animation (was bouncing infinitely, now static)
- Removed class=dark from all 18 HTML files (theme managed by JS)
2026-03-22 00:10:12 +03:00
treamz
01c31ec35b Fix: landing served at / instead of dashboard
- Renamed index.html → dashboard.html (express.static was serving index.html for /)
- / now correctly shows landing page (no logout button, no dashboard header)
- /dashboard shows dashboard.html (protected, requires auth)
- Incognito users see only landing + login/register
2026-03-22 00:04:17 +03:00
treamz
0664c018c6 Admin SSO: shared session with main site
- AdminJS uses main site session (no separate login)
- Login once at /auth/login → /admin accessible if role=admin
- Non-admin users redirected to /auth/login from /admin
- Removed separate AdminJS authentication (cookieName/cookiePassword)
2026-03-22 00:00:13 +03:00
treamz
4008155abd Admin: password confirmation field + validation
- Added password_confirm field in user edit/new forms
- Validation: passwords must match, min 6 chars
- New user: password required
- Edit user: password optional (leave empty to keep)
2026-03-21 23:56:42 +03:00
treamz
cb412f5b1d Admin: password change field for users
- Virtual password field in AdminJS user edit form
- Auto-hashes with bcrypt on save (edit + new actions)
- Leave empty to keep current password
- Description hint in UI
2026-03-21 23:54:29 +03:00
treamz
e8aef7aa28 Dynamic content: landing and dashboard load texts from DB via API
- Landing hero texts (headline, description, badge) from settings table
- Landing categories from /api/tools (dynamic from DB)
- Landing advantages from /api/content/advantages
- Dashboard about block from /api/content/dashboard
- Static HTML remains as fallback if API fails
- All editable via AdminJS admin panel
2026-03-21 23:53:37 +03:00
treamz
1837f42a91 AdminJS admin panel + dynamic content API
- AdminJS at /admin with auth (admin role only)
- Manage: users, categories, tools, content blocks, settings
- DB tables: settings, categories, tools, content_blocks
- Users table: added role (user/admin) and is_blocked fields
- API: /api/settings, /api/tools, /api/content/:section
- Sidebar: admin link visible only for admin users
- Removed /logs from public routes (now in AdminJS)
- Video converter: fixed ffmpeg codecs for RPi5 (h264_v4l2m2m)
- Dependencies: sequelize, @adminjs/sequelize, mariadb
2026-03-21 23:46:41 +03:00
treamz
056f73ca33 Unified theme: auth pages use shared.css variables + dark/light support
- Login/register now use CSS variables (--surface-*, --text-*, --accent)
- Dark/light theme toggle on auth pages (synced with localStorage)
- Unified nav menu: Главная, Инструменты, Возможности across all pages
- Consistent header style (backdrop blur, border)
2026-03-21 23:36:57 +03:00
treamz
90e318b245 UI: compact sidebar, dashboard header with nav, expanded hero text
- Sidebar: smaller icons (36px), reduced gaps, overflow scroll for nav area
- Dashboard header: fixed top bar with logo, nav links, user name, logout
- Expanded hero description with tool overview text
- Sidebar fits on all screen heights without overflow
2026-03-21 23:34:03 +03:00
treamz
44c85f6e44 Add video converter: convert, compress, extract audio, GIF
- New tool: /video with 4 modes (convert formats, compress, extract audio, GIF)
- Backend: ffmpeg-based processing with progress tracking
- Supports MP4, WebM, MOV, AVI, MKV input, up to 200MB
- Frontend: drag-drop upload, mode tabs, progress bar, download
- Added to sidebar, dashboard (Images category), WA_CATEGORIES
- Total tools: 14
2026-03-21 23:28:11 +03:00
treamz
d9202d2821 Landing: visible navbar with page links, remove price from dashboard
- Nav background visible immediately (semi-transparent dark with blur)
- Added Инструменты and Возможности links in nav (hidden on mobile)
- Added id=features to advantages section for smooth scroll
- Replaced 0₽ with Free label on dashboard about section
2026-03-21 23:21:03 +03:00
treamz
020d031627 Auth pages: light design with top navbar
- White background, card-style forms
- Fixed top header: logo, nav links (Главная, Инструменты, Возможности), login/register buttons
- Active state highlighting for current page
- Placeholders in inputs, password hint
- Mobile responsive (nav hidden on small screens)
- Red error styling matching light theme
2026-03-21 23:02:52 +03:00
treamz
21bfefbe5d Dashboard: categories, user greeting, about section
- Group 13 tools into 4 color-coded categories (Images/Code/Web/Utils)
- Personalized greeting with user name from /auth/me
- About section with service description and stats (13 tools, 4 categories, free)
- Each category has icon, title, count badge, description
- Category-specific accent colors (blue/green/purple/yellow)
2026-03-21 22:57:29 +03:00
treamz
f8616e32b4 Auth + Landing + Categories
- Local auth: registration/login with email+password (bcrypt, MariaDB)
- Landing page: marketing page at / with hero, categories, advantages, CTA
- Tool categories: Images (4), Code (3), Web (3), Utilities (2)
- Sidebar: category dividers, user avatar with logout
- Protected routes: all tools require auth, landing/login/register public
- New files: lib/db.js, routes/auth.js, login.html, register.html, landing.html
- Dependencies: bcrypt, mysql2
2026-03-21 22:54:31 +03:00
treamz
e3afa5b95a Standardize: shared.css/js, unified sidebar/theme/titles
- Extract shared CSS (sidebar, theme vars, layout) into shared.css
- Extract shared JS (tailwind config, sidebar injection, theme toggle) into shared.js
- Remove ~1200 lines of duplicated code across 13 HTML pages
- Standardize all titles to format: Tool Name — WA Dev Tools
- Standardize page headers (h1 + description) across all tools
- Standardize container padding (tool-container class)
- Sidebar now injected via JS — single source of truth
- Use CSS variables for accent colors everywhere (no more hardcoded #0054e6)
2026-03-21 22:36:59 +03:00
treamz
5b528d243a Refactor: modular architecture, security, config
- Split monolithic server.js (1111 lines) into route modules
- Add .env config (port, session secret, quality, limits)
- Add SSRF protection for parser/proxy/redirect endpoints
- Add optional password auth middleware
- Add structured logger (replaces raw fs.appendFileSync)
- Add graceful shutdown with timeout
- Add extended /health endpoint (uptime, memory, pid)
- Add ecosystem.config.js for PM2 (memory limit, restart policy)
- Make compress quality configurable (was hardcoded 60)
- Expand SVG AI icons library (7 -> 20 icons)
- Add dotenv dependency
2026-03-21 22:18:54 +03:00
treamz
54d220e0f4 Initial commit: WA Dev Tools service 2026-03-21 22:06:15 +03:00