From zero to live on www.digitalspot.pk — PC & Termux methods, AdSense hookup, troubleshooting.
| Item | Recommended | Why |
|---|---|---|
| Node.js | v18.18+ or v20+ | Next.js runtime |
| Database | Neon Postgres (free tier) | Serverless Postgres — URL goes in DATABASE_URL. Any Postgres 14+ works. |
| Hosting | Vercel (free Hobby) | 1-click deploys, edge network, automatic HTTPS |
| Domain | digitalspot.pk (pknic.com.pk or reseller) | Point to Vercel for AdSense approval |
| AdSense | Approved publisher account | Monetization |
git init git add . git commit -m "DigitalSpot v1" git branch -M main git remote add origin https://github.com/YOURUSER/digitalspot.git git push -u origin main
postgresql://…sslmode=require).DATABASE_URL=your neon url AUTH_SECRET=openssl rand -base64 32 NEXT_PUBLIC_SITE_URL=https://www.digitalspot.pk
.env):
npm install npx drizzle-kit push npx tsx src/db/seed.tsOutput confirms: settings · 10 ad slots · 5 services · 15 tools · 2 posts · 2 portfolio · admin user.
www.digitalspot.pk → create the shown CNAME/A records at your registrar. HTTPS is issued automatically./admin, sign in with admin@digitalspot.pk / Admin@123, then change the email/password in Users.Everything can be done from a phone. Tested on Termux from F-Droid.
pkg update && pkg upgrade pkg install nodejs-lts git
git clone https://github.com/YOURUSER/digitalspot.git cd digitalspot npm installTip: if npm feels slow, run
pkg install tur-repo && pkg install pnpm and use pnpm instead.
.env:
cat > .env << 'EOF' DATABASE_URL="postgresql://…neon-url…" DATABASE_URL_UNPOOLED="…same…" AUTH_SECRET="run: openssl rand -base64 32" NEXT_PUBLIC_SITE_URL="https://www.digitalspot.pk" EOF
drizzle.config.json me by-default localhost ka URL hota hai — Termux pe use Neon URL se replace karein, warna tables production me nahi banengi aur site khaali rahegi:
cat > drizzle.config.json << 'EOF'
{
"dialect": "postgresql",
"schema": "./src/db/schema.ts",
"dbCredentials": { "url": "YAHAN-NEON-URL-PASTE-KAREIN" }
}
EOF
npx drizzle-kit push npx tsx src/db/seed.tsOutput me ye dikhna chahiye: ✓ settings · ✓ adsense: 10 slots · ✓ users · ✓ services: 5 · ✓ tools: 15 · ✓ portfolio: 2 · ✓ blog: 2 — ✅ Seed complete! Iske baad hi admin login aur demo data kaam karega.
npm run dev → open http://localhost:3000 in Chrome. Ctrl+C to stop.git push pe site khud ba khud update hogi.npm i -g vercel vercel login # link open hoga — browser me approve karein vercel # answers: Y · name: digitalspot · dir: ./ · override: NPhir wohi 3 env vars add karein (Project → Settings → Environment Variables) aur final production deploy:
vercel --prodTurant live URL mil jata hai — misal
digitalspot.vercel.app.
.env me Neon ka production URL dala hai to step 4 ka drizzle-kit push + seed pehle hi production pe ho chuka hai — dobara karne ki zaroorat nahi.npm run build fail ho sakta hai — build Vercel karta hai. Termux sirf editing, git, database commands aur CLI deploy ke liye use karein.Agar aapki site deploy ho gayi lekin demo data nahi dikh raha ya admin login nahi ho raha — to seed commands ki jagah bas ye link kholein (browser ya Termux curl):
https://AAPKI-SITE.vercel.app/api/setup?key=AAPKA-AUTH_SECRET
Ye automatically: saari tables banata hai + 5 services, 15 tools, 2 blogs, 2 portfolio, 10 ad slots aur admin user seed karta hai. Response me "ok": true aur counts dikhne chahiye. Idempotent hai — jitni dafa chahein chalayein, kuch duplicate nahi hoga.
https://www.digitalspot.pk/sitemap.xml (auto-generated).digitalspot.pk and wait for Ready status (can take 1–14 days for new sites).ca-pub-XXXX and the Ads → By site script.Add the env var in Vercel → Settings → Environment Variables (Production), then redeploy. Locally, create .env from .env.example.
AUTH_SECRET changed after sessions were issued. Have users re-login; keep the secret stable.
Checklist: site approved in AdSense · Auto Ads ON · slot status ON with code pasted · 24–48h warmup · adblocker off. Use AdSense's own "Ads.txt" page if prompted — public/ads.txt can be added from your publisher panel.
Wrong DB host or SSL flag. Neon requires ?sslmode=require. Also try npx drizzle-kit push --force.
Requires HTTPS + a served manifest.webmanifest (auto at /manifest.webmanifest) + user engagement. In dev/preview without HTTPS it correctly stays hidden.
Your orderTemplate in Admin → WhatsApp was cleared. Restore the default template from the seed or rewrite it using the listed variables.
Neon free databases cold-start in ~1s; refresh once. Vercel + Neon pooled connections handle this automatically afterwards.