SitePulse helps website teams handle three common jobs in one unified platform:
- Talk to visitors through an embeddable support chat widget.
- Collect structured feedback and bug reports directly from users.
- Track privacy-preserving, cookieless traffic across website pages.
/backend– Express API, Socket.IO gateway, Prisma ORM, Pino structured logging, Helmet security & Zod validation/dashboard– Modular React + Vite admin app with custom hooks (useAuth,useSites,useChat)/widget– Embeddable, Shadow DOM-isolated client script (sitepulse.js)/docs– Engineering guides including declarative database migrations/docker-compose.yml+/Dockerfile– Containerized single-port production deployment
If you run a website, support requests, user feedback, and bug reports often end up fragmented across separate third-party tools. SitePulse unifies these into one cohesive workflow:
- Visitors interact with a single, lightweight widget on your site.
- Your Team manages incoming chats, bugs, feedback, and page targeting rules in one dashboard.
- Data Integrity is preserved in a single, high-performance PostgreSQL database.
- Real-Time Live Chat: Bidirectional Socket.IO messaging between visitors and support agents with typing indicators.
- Conversations Inbox: Filter by unread, open, or resolved with real-time badges.
- Structured Feedback: Rating stars (1–5) and user comments.
- Bug Reporting with Diagnostics: Automatically captures visitor browser, OS, device, and URL context.
- Dynamic Widget Customizer: Real-time styling (primary color, greeting, titles, feature toggles).
- Page Rules & Display Targeting: Enable or disable the widget on specific paths or wildcard patterns (
/products/*,/checkout). - Web Crawler & Auto-Discovery: Discovers internal pages via traffic logs, robots.txt, and XML sitemaps.
- Multi-Tenant Architecture: Multi-site management per account with password-protected danger zone actions (site deletion & chat purge).
- Security & Reliability: Route-specific CORS policies, Helmet HTTP security headers, Pino structured JSON logging, and
X-Request-IDrequest tracing.
- Node.js: 20+
- npm: 10+
- PostgreSQL: 14+ (or use Docker Compose below)
npm install
npm --prefix backend install
npm --prefix dashboard installCopy the example environment file:
# macOS / Linux:
cp backend/.env.example backend/.env
# Windows (PowerShell):
Copy-Item backend/.env.example backend/.envUpdate your backend/.env with your local credentials:
PORT=5000
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/sitepulse?schema=public"
JWT_SECRET="your-super-secret-jwt-key"npm --prefix backend run prisma:generate
npm --prefix backend run prisma:push(For production-grade declarative migrations with versioned SQL files, see Database Migrations & Schema Management below).
node backend/src/seed.jsRun backend (Express + Socket.IO on port 5000):
npm run dev:backendRun dashboard (Vite dev server on port 5173 in a separate terminal):
npm run dev:dashboardSitePulse supports both rapid prototyping and production-grade declarative schema migrations using Prisma. For a comprehensive architectural guide, refer to docs/DATABASE_MIGRATIONS.md.
Whenever you update backend/prisma/schema.prisma, generate an immutable, version-controlled SQL migration file:
# From repository root:
npm --prefix backend run prisma:migrate -- --name descriptive_migration_name
# Or inside /backend:
cd backend
npx prisma migrate dev --name descriptive_migration_nameThis updates your local database, creates a timestamped SQL migration in backend/prisma/migrations/, and regenerates the Prisma Client.
In production containers or staging environments, apply pending migrations deterministically without prompting:
cd backend
npx prisma migrate deployFor quick experimental schema prototyping without creating migration files:
npm --prefix backend run prisma:pushTo wipe all data records in foreign-key dependency order (keeping the schema):
npm run db:resetTo drop all tables and recreate a completely fresh database schema:
npm --prefix backend run prisma:push -- --force-resetCompile the dashboard SPA and prepare backend Prisma client:
npm run buildStart the unified server:
npm startThis single process hosts:
- Dashboard SPA at
http://localhost:5000/ - REST API at
http://localhost:5000/api/v1/ - Socket.IO gateway on port
5000 - Widget script at
http://localhost:5000/sitepulse.js
SitePulse can be deployed to the cloud in minutes. Choose the deployment method that fits your infrastructure:
Using the production Dockerfile:
- Provision a PostgreSQL Database:
- In your cloud provider (e.g., Render, Supabase, Neon, Railway), create a new PostgreSQL database.
- Copy the database connection string (
DATABASE_URL).
- Create a Docker Web Service:
- Connect your SitePulse repository.
- Select Docker as the deployment runtime.
- Configure Environment Variables:
Set the following variables in your provider's settings:
DATABASE_URL="postgresql://user:password@host:5432/dbname?sslmode=require" JWT_SECRET="generate-a-secure-random-32-char-secret" NODE_ENV="production"
- Deploy:
- Your provider will execute the multi-stage build, compile the dashboard SPA, push database schemas via Prisma, and bring your unified server online with automatic HTTPS.
For website owners hosting on their own Linux VPS (DigitalOcean Droplet, Hetzner, AWS EC2, Linode):
- Clone the Repository:
git clone https://github.com/your-username/SitePulse.git cd SitePulse - Configure Environment Variables:
Create a
.envfile in the root directory:POSTGRES_USER=postgres POSTGRES_PASSWORD=your_strong_db_password POSTGRES_DB=sitepulse JWT_SECRET=your_super_secret_jwt_key
- Start the Stack:
This starts PostgreSQL on port
docker compose up -d --build
5432with a persistent volume (sitepulse_pgdata) and the unified SitePulse platform on port5000. - Set Up an HTTPS Reverse Proxy (Caddy or Nginx):
- Using Caddy (Automatic Free SSL):
support.yourdomain.com { reverse_proxy localhost:5000 }
- Using Nginx:
server { server_name support.yourdomain.com; location / { proxy_pass http://localhost:5000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } }
- Using Caddy (Automatic Free SSL):
Once your SitePulse instance is running, embed the support widget on any website (WordPress, Shopify, Webflow, Next.js, or custom HTML):
- Log into your SitePulse dashboard and create a new Website Property.
- Copy your site's embed snippet from the Settings tab.
- Paste it directly before the closing
</body>tag on your website:
<!-- Replace with your deployed SitePulse URL and Site Key -->
<script src="https://support.yourdomain.com/sitepulse.js" data-site-key="YOUR_SITE_KEY" defer></script>- Universal Compatibility: Works on any domain or CMS with zero CSS conflicts (powered by native Shadow DOM).
- Zero Config: The widget automatically detects its own origin to communicate with your backend API and Socket.IO gateway.
To spin up both PostgreSQL and the unified SitePulse container locally:
docker compose up --build- PostgreSQL runs on port
5432 - SitePulse App runs on port
5000(http://localhost:5000)
| Command | Description |
|---|---|
npm test |
Runs the 34-test end-to-end backend verification suite |
npm run dev:backend |
Starts backend server in watch mode (nodemon) |
npm run dev:dashboard |
Starts Vite dashboard dev server |
npm run build:dashboard |
Builds dashboard SPA with Vite |
npm run build |
Builds dashboard and generates Prisma Client |
npm start |
Runs single-port production server |
npm run db:reset |
Wipes all database records cleanly |
npm --prefix backend run prisma:migrate |
Runs declarative Prisma database migration |
npm --prefix backend run prisma:push |
Synchronizes Prisma schema directly to DB |
- Authentication & Profiles:
/api/v1/auth/signup,/api/v1/auth/login,/api/v1/auth/me,/api/v1/auth/status - Sites & Settings:
/api/v1/sites,/api/v1/sites/:id,/api/v1/widget/config - Page Discovery & Rules:
/api/v1/sites/:siteKey/pages,/api/v1/sites/:siteKey/scan - Live Conversations:
/api/v1/conversations,/api/v1/conversations/init,/api/v1/conversations/:id/messages - Feedback Collection:
/api/v1/feedback - Bug Reporting:
/api/v1/bugs
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.