LWS Dashboard
A centralized application for managing websites, business workflows, content automation, and connected services.
- Category
- Operations platform
- Status
- Private system
- Core stack
- Next.js · React · TypeScript · JavaScript · Tailwind CSS
Overview
LWS Dashboard is the private operations console behind Linear Web Solutions. It brings the agency's recurring work into one authenticated application: publishing content, generating and managing leads, tracking clients, invoicing, and storing business documents.
It is also where automation lives. Scheduled jobs and dedicated background workers generate and publish content across connected platforms, and an agent and workflow layer manages AI-driven tasks.
- 01JWT sessions with rotating refresh tokens, CSRF protection, and rate-limited login
- 02Publishing integrations for Facebook, Instagram, YouTube, and Google Business Profile
- 03Google Places lead generation with deduplication, filters, and CSV export
- 04Invoicing with PDF generation, client records, and document storage
Objective
Run the agency's operations, from content to invoicing, from one self-hosted application under the agency's own control.
Technical approach
- A.
Security first
JWT authentication in HTTP-only cookies with rotating refresh tokens, double-submit CSRF tokens on every write route, Zod validation, rate limiting, Cloudflare Turnstile, and admin-managed roles.
- B.
Integrations as modules
Facebook, Instagram, YouTube, and Google Business Profile publishing, Google Places lead search, and language model providers each sit behind their own service module.
- C.
Background work, out of band
A scheduler bootstrapped through Next.js instrumentation, plus dedicated PM2 workers, run recurring jobs such as content campaigns and video rendering outside the web process.
- D.
Relational data
PostgreSQL through Prisma, with migrations written to be idempotent so every deploy can safely re-apply them.
Architecture
Interface
- Next.js App Router
- Protected multi-page console
Application
- REST route handlers
- Zod validation
- JWT + refresh rotation + CSRF
Services
- node-cron scheduler
- PM2 workers
- Social and Google integrations
- Model provider layer
Data
- PostgreSQL
- Prisma ORM
- Document and media storage
Platform
- Linux guest on Proxmox
- PM2 process management
Internal endpoints and hosts are intentionally omitted.
Technologies
- Next.js
- React
- TypeScript
- JavaScript
- Tailwind CSS
- HTML
- CSS
- Responsive UI Engineering
- Node.js
- REST APIs
- Application Integrations
- Database-driven Applications
- PostgreSQL
- Prisma
- AI Agent Workflows
- AI Automation
- Linux
- Proxmox
- SSH
- Bash
Visuals
Private system. Interface screenshots are not published.
The artwork above is an illustration of the system, not an interface capture.
Challenges & solutions
Challenge 01
A deploy script that could report success while nothing had changed.
Solution
Deploys run in a strict bash -euo pipefail shell, so the first failing step stops everything and reports failure, and each deploy confirms the running commit matches the one that was pushed.
Challenge 02
A migration history that drifted after some tables were created outside the migration tool.
Solution
Migrations are applied as guarded, idempotent SQL scripts, so re-running the full list on every deploy is safe and the schema converges.
Challenge 03
Long-running rendering and publishing jobs competing with interactive traffic.
Solution
Each pipeline runs as its own PM2 worker process, so video rendering and publishing never run inside the web server.
