The source for devpilotx.com, the studio site for DevPilotX. Portfolio, paid services, resume, blog, AI assistant, and a private operator dashboard at profile.devpilotx.com.
Three applications make up the platform. Only the first one lives in this repo today; the other two run from their own packages on the VPS.
./(this repo): the public Next.js 14 frontend. Static export. Deployed to Hostinger via Git auto-deploy on push tomain.- VPS service
devpilotx-api(port 8100, exposed ashttps://api.devpilotx.com): Express + pg + Nodemailer. Owns Postgres access, the contact form, the RAG bot, and the country-pricing endpoint. - VPS service
devpilotx-dashboard(port 8300, exposed ashttps://profile.devpilotx.com): Express + EJS + argon2 sessions. Private owner dashboard for contacts, service inquiries, and bot conversations. Single-tenant. - VPS service
devpilotx-mcp(exposed ashttps://api.devpilotx.com/mcp): JSON-RPC MCP server with seven Hostinger and VPS tools. Bearer orx-api-keyauth.
The frontend never talks to Postgres directly. It posts JSON to NEXT_PUBLIC_API_BASE for /contact, /service-inquiry, /ask, and /pricing-tier. That keeps secrets and the database on the VPS only.
| Endpoint | What it does |
|---|---|
GET https://api.devpilotx.com/health |
Liveness check |
POST https://api.devpilotx.com/ask |
SSE-streamed RAG (Groq Llama 3.3 70B with Gemini fallback) |
POST https://api.devpilotx.com/contact |
Contact form: writes to contacts table and sends confirmation + admin email |
POST https://api.devpilotx.com/service-inquiry |
Service-page lead form |
GET https://api.devpilotx.com/pricing-tier |
Country-based pricing multiplier (IP-geolocated, ?cc=XX override) |
POST https://api.devpilotx.com/mcp |
MCP JSON-RPC (Bearer or x-api-key) |
Prices on the services pages are calibrated to purchasing-power parity, not raw FX. Each service ships five region-specific price tables (IN, APAC, EU, GB, US). The region for a visitor is resolved in two layers:
src/lib/region.ts: instant timezone-based guess on first render (zero network).src/lib/regionApi.ts: post-mount fetch to/pricing-tierfor a precise country -> region mapping, cached inlocalStoragefor 24 hours.
The server endpoint also returns a numeric multiplier (1.0 / 0.6 / 0.3) and the local currency code, so future custom-quoted services can scale a single base price instead of maintaining tables.
- Frontend: Next.js 14 (App Router, static export), TypeScript, Tailwind, Zod
- API: Node.js + Express + pg, Nodemailer (Hostinger SMTP), Pino
- Dashboard: Node.js + Express + EJS + argon2 + connect-pg-simple sessions
- MCP server: Node.js + Express, Bearer / x-api-key auth, 7 tools over Hostinger and VPS APIs
- Database: PostgreSQL 16 with pgvector on the VPS
- Mail: Hostinger SMTP (
smtp.hostinger.com:465, mailboxes ondevpilotx.com) - Hosting: Hostinger Business (static site) + Linux VPS (Postgres, API, dashboard, MCP, Nginx, Lets Encrypt)
- SEO + analytics: Google Analytics 4, Google AdSense, JSON-LD, sitemap, robots, Open Graph, Twitter cards
Owner-only. Single account. Argon2-hashed credentials.
Pages:
/Overview: contact + service inquiry + 7-day bot counts, quick actions/contactsFilterable + searchable contact submissions, per-row status (new/read/replied/archived), CSV export/servicesService inquiry pipeline (new/contacted/quoted/won/lost/archived)/botRecent Ask Dipanshu conversations: question, answer preview, citation count, latency
Authentication: argon2id over dashboard_users. Sessions in Postgres via connect-pg-simple. Strict cookies (httpOnly, secure, sameSite=lax). 7-day TTL.
Frontend:
cp .env.example .env.local
npm install
npm run dev
Backend and dashboard live on the VPS only. They are not part of this repo. See the runbook in ~/runbooks/devpilotx.md on the VPS for build, env, and pm2 commands.
- Frontend: Hostinger imports this repo. Auto-deploys on push to
main. Static export fromnext.config.mjs(output: 'export'). - API: VPS pm2 process
devpilotx-api.pm2 restart devpilotx-api --update-envafter changing env. - Dashboard: VPS pm2 process
devpilotx-dashboard. Same restart pattern. - MCP: VPS pm2 process
devpilotx-mcp. Token rotation requires editing/home/mcpagent/secrets/devpilotx-app.envand restarting. - TLS via Lets Encrypt on
devpilotx.com,www.devpilotx.com,api.devpilotx.com,profile.devpilotx.com. Auto-renewed by certbot.
devpilotx-website/
src/
app/ Next.js App Router pages and route handlers
components/ Shared UI primitives (universal design system)
content/ Typed content modules: projects, services, resume, posts, site
lib/ Frontend utilities (SEO, region, regionApi, classnames)
public/ Static assets (favicon, ads.txt, manifest, .htaccess)
README.md This file
CHANGELOG.md Release notes
- ASCII punctuation only. No em-dashes anywhere.
- Strict TypeScript, no
anywithout justification. - All secrets via env vars. Nothing real is committed.
- WCAG AA accessibility. Skip link, semantic HTML, alt text, keyboard navigation.
- Compliance: no policy-violating content. AdSense client
ca-pub-6484525483464374, GA4G-5XLBZN8M7M.