Commit Graph

43 Commits

Author SHA1 Message Date
treamz
9193a98bc4 PDF sync: operations update all tabs (delete/rotate/reorder)
- After any page operation, result PDF re-uploaded as new working file
- All grids (delete/rotate/reorder) refresh with updated pages
- File list updates with new page count
- Previews regenerated from modified PDF
- Seamless workflow: delete pages → rotate remaining → reorder
2026-03-22 01:48:53 +03:00
treamz
93952d0844 PDF UX: auto-reorder on drag, visual delete animation, remove apply button
- Reorder: drag-drop auto-saves after 800ms, no button needed
- Delete: selected pages fade out + shrink on delete click
- Delete button shows Удаление... state
- Reorder hint shows Сохранение.../Порядок сохранён
- Better drop positioning (left/right of target)
2026-03-22 01:46:48 +03:00
treamz
78c181aa6c Fix PDF result: dont hide stepConfig (stepResult is inside it) 2026-03-22 01:44:39 +03:00
treamz
816753c925 PDF pages: visual rotate/delete/reorder with action buttons
- Delete: click pages (red highlight), counter, Удалить выбранные (N) button
- Rotate: click pages (visual rotation preview 90/180/270), Повернуть button
- Reorder: drag-and-drop thumbnails, visual number update, Применить button
- CSS: rotation transforms, delete/drag states, action bar with buttons
- Direct execute functions (bypass main execute flow)
2026-03-22 01:42:26 +03:00
treamz
6bf2a0b6a1 Fix PDF: page grids render on file select, delete validation 2026-03-22 01:39:32 +03:00
treamz
88e2e12f7c Fix PDF: move page grid code inside IIFE (ReferenceError fix) 2026-03-22 01:36:25 +03:00
treamz
3bcf109e08 Fix PDF: remove illegal em-dash character from JS code (SyntaxError) 2026-03-22 01:34:45 +03:00
treamz
b631df2687 Fix PDF pages: use grid thumbnails instead of removed input elements
- Fixed JS references to removed deletePages/rotatePages/reorderPages inputs
- Execute function now reads from visual page grid selections
- Fixed reorder URL (/pdf/reorder instead of /pdf/rotate)
- Preview API confirmed working (200, image/png)
2026-03-22 01:27:31 +03:00
treamz
f03262fbec PDF: visual page thumbnails for delete/rotate/reorder
- Replace text inputs with visual page grid (thumbnails)
- Click to select pages for delete/rotate
- Drag to reorder pages (visual)
- Thumbnails loaded lazily from /pdf/preview/:id/:page
- Selected pages highlighted with blue border + checkmark
- Grid auto-fills, max-height with scroll
2026-03-22 01:24:44 +03:00
treamz
4bd90b26bc PDF preview: thumbnails via Ghostscript, preview in file cards
- GET /pdf/preview/:fileId — renders first page as PNG (72 DPI)
- GET /pdf/preview/:fileId/:page — specific page preview
- GET /pdf/thumbnails/:fileId — list of all page preview URLs
- File cards show actual PDF thumbnail instead of icon
- Cached previews (30 min cleanup)
- Fallback to PDF icon if preview fails
2026-03-22 01:22:25 +03:00
treamz
ee49fed415 Fix PDF: Cyrillic filenames (Latin-1→UTF-8), page count via pdf-lib
- Fix multer encoding: decode Latin-1 to UTF-8 for Cyrillic names
- Use pdf-lib instead of pdf-parse for page count (more reliable)
- ignoreEncryption flag for encrypted PDFs
2026-03-22 01:20:11 +03:00
treamz
75d6c186aa Add project documentation (README.md) 2026-03-22 01:19:23 +03:00
treamz
a7d6287d65 Image converter: add AVIF/TIFF/GIF/BMP/HEIC, quality slider, custom resize
- Renamed: Сжать картинки → Конвертер изображений
- New output formats: AVIF, TIFF, GIF (via sharp)
- New input formats: AVIF, TIFF, GIF, BMP, SVG, HEIC
- Quality slider (10-100%) in UI
- Custom resize option (prompt for px)
- 3-column control layout (format, size, quality)
- Updated descriptions in dashboard, DB, page title
2026-03-22 01:15:03 +03:00
treamz
378c1a075e Add PDF tools: merge, split, rotate, delete, watermark, compress, convert, protect
- 15 API endpoints for PDF operations (pdf-lib, pdf-parse, Ghostscript)
- Frontend with 8 operation tabs
- Merge multiple PDFs, split by page ranges
- Rotate/delete/reorder pages
- Add watermark text, page numbers
- Compress via Ghostscript (screen/ebook/printer quality)
- PDF to PNG/JPG, Images to PDF
- Password protection, text extraction
- Added to sidebar, dashboard (Utils category), DB
2026-03-22 01:10:37 +03:00
treamz
bda0871969 Fix: about section (remove duplicate stat, fix text), placeholder public 2026-03-22 00:56:25 +03:00
treamz
1236a27c49 Fix AdminJS: no crash on empty password, proper validation errors 2026-03-22 00:52:43 +03:00
treamz
27ad078e07 Unified header: same top-header across landing, login, register, status
- Landing: replaced custom landing-nav with standard top-header
- Removed scroll listener for nav (no longer needed)
- Header CSS moved to shared.css (single source)
- Removed duplicate header CSS from login, register, status
- All 4 public pages now have identical header with theme toggle
2026-03-22 00:49:52 +03:00
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