Sunday, August 23, 2026

🛠️ From Phone to Production: A Complete Engineer's Guide to Building Health Trend Seller Without a Laptop – Codespaces, Termux & More 📡

🔐 Restricted Access

This content is private. Enter the password to continue.

❌ Incorrect password. Try again.

Building Health Trend Seller Without a Laptop

Peter M. Mutiti · Lead Engineer, Health Trend Seller Project

Alright, let me be straight with you. Building and executing the Health Trend Seller application without a laptop is going to be challenging. Not impossible – I've been doing it myself – but you need to know exactly what you're up against.

I've been in your shoes. No laptop, but a vision that won't wait. So I figured out the workarounds. Here is a breakdown of the restrictions and limitations I faced, and what I actually did about them.

"A vision that won't wait doesn't need a laptop – it needs a workaround." – Peter M. Mutiti

🚫 The Hard Truth – What I Couldn't Do Without a Laptop

1. I Couldn't Run the Application Locally

Limitation What I Experienced
No local server I couldn't run npm run dev or start any of the services (Express, Next.js, PostgreSQL, Temporal, Redis, IPFS) because my phone doesn't have the processing power, memory, or storage.
No database PostgreSQL won't run on a phone. I couldn't store or query data locally.
No WebSocket Real-time chimes require a WebSocket server running locally. Not possible on my phone.

2. I Couldn't Write or Edit Code Effectively

Limitation What I Experienced
No code editor VS Code, WebStorm, or any real IDE requires a desktop. Phone code editors are frustrating for a project this size.
No file system I couldn't create, rename, move, or delete files in bulk the way I needed to.
No git operations Cloning, committing, branching, merging, and pushing to GitHub were extremely difficult on my phone.

3. I Couldn't Test or Debug

Limitation What I Experienced
No browser dev tools I couldn't inspect network requests, debug JavaScript, check console logs, or test API responses.
No terminal I couldn't run git, npm, npx, prisma, or any CLI commands.
No error tracing When something broke (and it did), I couldn't see stack traces or error messages to figure out what went wrong.

4. I Couldn't Deploy Easily

Limitation What I Experienced
No build process I couldn't run npm run build to generate production-ready files.
No deployment CLI Vercel, Netlify, and AWS deployment require a terminal or a desktop.
No environment variables I couldn't set .env files locally or upload them securely.

😅 What I COULD Do Without a Laptop

What I Did How I Did It
Planned the architecture I documented the project structure, API design, database schema, and workflows. I used this chat to help me.
Wrote code snippets I generated components, routes, and functions to copy-paste later.
Created mockups I designed the UI, planned the user flow, and built static HTML previews (like the dashboard you've already seen).
Studied the codebase I read and understood the project code through our conversations.
Designed the database schema I planned tables, relationships, and migrations.
Researched I read documentation, watched tutorials, and learned the technologies (Next.js, Prisma, Temporal, etc.).
Hosted code on GitHub I created the repository. Someone else pushed the code for me.

🚀 GitHub Codespaces – My Go-To Solution

💡
Why This Is My Best Option

GitHub Codespaces gives me a full VS Code editor in my browser, a terminal, and the ability to run commands – all without a laptop. It's like having a laptop in the cloud. I use this every day.

What I liked: I could run npm run dev, install dependencies, and test code.
What I didn't like: Limited free tier (60 hours/month). Performance could be slow. Still needed a browser and internet.

🛠️ My Complete Guide to Setting Up GitHub Codespaces

1
I Created a GitHub Account
If you don't have one:
1. Went to github.com
2. Clicked Sign Up
3. Entered my email, created a password, and chose a username
4. Verified my email
2
I Created the Repository
1. Logged in to GitHub
2. Clicked the + icon → New repository
3. Named it: health-trend-seller
4. Set it to Private
5. Checked Add a README file
6. Clicked Create repository
3
I Opened It in Codespaces
1. On my repository page, I clicked the Code button (green)
2. Clicked the Codespaces tab
3. Clicked Create codespace on main
Wait 1-3 minutes while the cloud environment builds. I used this time to grab coffee. ☕
4
I Set Up the Project

Once Codespaces opened, I had a VS Code editor in my browser with a terminal at the bottom.

I ran these commands in order:

# Check Node.js is installed
node --version
# Showed v18 or higher – good

# Check npm
npm --version
# Showed v9 or higher – good

# Initialize the project
npm init -y

# Install dependencies
npm install express next react react-dom

# Install development dependencies
npm install -D nodemon prisma

# Create the folder structure
mkdir -p src/app src/api/controllers src/api/models src/api/routes src/services src/config

# Create a basic .gitignore file
echo "node_modules/
.env
.next/
dist/
*.log" > .gitignore
5
I Created the Server File

I created src/server.js:

// src/server.js
const express = require('express');
const app = express();
const PORT = process.env.PORT || 3000;

app.use(express.json());

app.get('/health', (req, res) => {
  res.json({ status: 'healthy', timestamp: new Date().toISOString() });
});

app.get('/api/v1/trends', (req, res) => {
  res.json({
    status: 'success',
    data: {
      trends: [
        { name: 'Wellness Products', score: 87, change: '+23%', confidence: 0.92 },
        { name: 'Mental Health', score: 72, change: '+18%', confidence: 0.85 },
        { name: 'Fitness Tech', score: 34, change: '-5%', confidence: 0.45 },
        { name: 'Supplements', score: 91, change: '+31%', confidence: 0.96 }
      ]
    }
  });
});

app.listen(PORT, '0.0.0.0', () => {
  console.log(`✅ Server running on http://localhost:${PORT}`);
});
6
I Updated package.json

I opened package.json and added this under "scripts":

"scripts": {
  "start": "node src/server.js",
  "dev": "nodemon src/server.js"
}
7
I Ran the Server

In the Codespaces terminal:

npm run dev

I waited for: "✅ Server running on http://localhost:3000"

8
I Viewed My App

1. In Codespaces, a popup appeared saying "Your application running on port 3000 is available."
2. I clicked Open in Browser
3. My API was running!

I tested these URLs:

  • http://localhost:3000/health → Shows health status
  • http://localhost:3000/api/v1/trends → Shows trend data
9
I Saved My Work
git add .
git commit -m "Initial setup: Express server with API endpoints"
git push origin main

⚠️ Codespaces Limitations – What I Learned

Limitation What I Did
Free tier limit 60 hours per month on the free plan. I use wisely and stop the server when not working.
No persistent storage Codespaces spins down after inactivity. I always commit and push changes.
No PostgreSQL I couldn't run PostgreSQL locally. I use a cloud database (Supabase, Neon).
No Redis I use a cloud Redis service (Upstash).
No Temporal I use Temporal Cloud or skip for now.
💰
Alternative: GitPod – My Backup

If Codespaces is full, I use GitPod (free 50 hours/month):

  1. Go to gitpod.io
  2. Log in with GitHub
  3. Enter my repository URL
  4. Click Continue

It works the same way as Codespaces.

📱 Termux on Android – My Fallback Guide

📌
Note

I use this when I can't access Codespaces. It's powerful but limited. Codespaces is always my first choice.

1
I Installed Termux
1. Went to the Google Play Store
2. Searched for Termux
3. Installed the official app (by Fredrik Fornwall)
4. Opened Termux

Important: If Termux is not available in your country, download the APK from f-droid.org
2
I Updated Termux
pkg update && pkg upgrade -y

Typed y when prompted.

3
I Installed Node.js
pkg install nodejs -y

Checked installation:

node --version
# Showed v18 or higher – good

npm --version
# Showed v9 or higher – good
4
I Installed Git
pkg install git -y
5
I Installed Additional Tools
pkg install nano -y        # Text editor
pkg install curl -y        # For API testing
pkg install wget -y        # For downloading files
6
I Cloned My Repository
git clone https://github.com/YOUR_USERNAME/health-trend-seller.git
cd health-trend-seller

Replace YOUR_USERNAME with your actual GitHub username.

7
I Installed Dependencies
npm install

This took 2-5 minutes depending on internet speed.

8
I Created the Project Structure
mkdir -p src/app src/api/controllers src/api/models src/api/routes src/services src/config
9
I Created the Server File
nano src/server.js

I copied and pasted the server code from the Codespaces section above.

Save: Press Ctrl + X, then Y, then Enter.

10
I Updated package.json
nano package.json

Added this under "scripts":

"scripts": {
  "start": "node src/server.js",
  "dev": "nodemon src/server.js"
}

Save: Press Ctrl + X, then Y, then Enter.

11
I Installed Nodemon
npm install -g nodemon
12
I Ran the Server
npm run dev

I saw:

✅ Server running on http://localhost:3000
13
I Tested the API

I opened another Termux session (swiped from the left edge and tapped "New session") and used curl:

curl http://localhost:3000/health

I saw:

{"status":"healthy","timestamp":"2026-..."}

⚠️ Termux Limitations – What I Discovered

Limitation What I Did
No port forwarding I couldn't access my app from another device. Only localhost.
No browser dev tools I couldn't inspect network requests or debug JavaScript easily.
Limited storage My phone storage was limited. I kept node_modules clean.
Battery drain Running servers drained my battery quickly. I used a charger.
No PostgreSQL I used a cloud database (Supabase, Neon).
No Redis I used a cloud Redis service (Upstash).
No Temporal I used Temporal Cloud or skipped.
No Docker Termux does not support Docker.

✅ What I CAN Do on Termux

Activity Status
Write code✅ Yes
Run Express server✅ Yes
Test API endpoints✅ Yes
Push to GitHub✅ Yes
Install npm packages✅ Yes
Edit files✅ Yes (with nano or vim)
Run basic Node.js apps✅ Yes

🔑 My Pro Tips for Termux

Allow Storage Access
termux-setup-storage
Grant Notification Permission

Android will ask you automatically. Tap Allow.

Install a Better Editor (Vim)
pkg install vim -y
Keep the Server Running in Background
npm run dev &
View Running Processes
ps aux
Stop a Background Process
kill <PID>

📋 Summary: Which Option Should You Use?

⭐⭐⭐⭐⭐
Codespaces
✅ Full VS Code, terminal, browser preview, easy deployment
⏱️ 60 hours/month free
Best overall
⭐⭐⭐⭐
GitPod
✅ 50 hours/month free, similar to Codespaces
⏱️ Same limitations as Codespaces
Good alternative
⭐⭐⭐
Termux
✅ Free, runs on your phone, no time limits
❌ No browser dev tools, no port forwarding, limited storage
Fallback option

🚀 My Next Steps

✅
What I'm Doing Next
  1. I use Codespaces as my primary platform
  2. I've set up the project using the guides above
  3. I'm building the API by adding more endpoints
  4. I'll connect a database (Supabase or Neon are free)
  5. I'll deploy to Vercel (I can do this from Codespaces)
Peter M. Mutiti – Lead Engineer, Health Trend Seller Project
Building the future of health trend intelligence, one line of code at a time.
Health Trend Seller • v2.4.1 • Built with ❤️ • No laptop, no problem.

Saturday, August 22, 2026

Hardcoded Secrets, Public Repo, Crypto Mining: A Post-Mortem of the AI-Generated Credential Leak (SEC-2026-001)

🔐 Restricted Access

This content is private. Enter the password to continue.

❌ Incorrect password. Try again.

💻 What to Host on Localhost for Health Trend Seller Project

Summary: Host These Components on Your Laptop

Component Host on Localhost? Port Purpose
Backend API (src/) ✅ YES 3000 REST API, business logic, WebSocket server
Frontend (Next.js) ✅ YES 3000 (same) Dashboard UI, CEO Pulse interface
Temporal Worker ✅ YES 7233 Background workflows (patient monitor, trend analysis)
PostgreSQL Database ✅ YES 5432 Persistent data storage
IPFS Node ⚠️ OPTIONAL 5001 Immutable storage (can skip for local testing)
Redis Cache ⚠️ OPTIONAL 6379 Rate limiting, session storage
Mobile App ❌ NO (use Expo Go) 8081 Runs on physical phone or emulator
Terraform/Ansible ❌ NO N/A Cloud provisioning (not needed locally)
📦
Complete Setup for Local Development
Run the following commands in separate terminal windows.

Terminal 1: Database (PostgreSQL)

# Install and start PostgreSQL
sudo service postgresql start
# or
docker run -d -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword postgres:15

Terminal 2: Backend API + Frontend

cd health-trend-seller
npm install
cp .env.example .env
# Edit .env with your database credentials
npm run dev
# ✅ Server runs at http://localhost:3000

Terminal 3: Temporal Worker

cd health-trend-seller
npm run worker
# ✅ Worker connects to Temporal server (local or cloud)

Terminal 4: IPFS (Optional)

ipfs daemon
# ✅ IPFS node runs at http://localhost:5001

Terminal 5: Mobile App (Optional)

cd health-trend-seller/mobile-app
npm install
npm start
# Scan QR code with Expo Go app on your phone
✅
What You WILL Host on Localhost
1. Backend API (Port 3000) — Express.js server, REST endpoints, WebSocket server, serves frontend.
2. PostgreSQL Database (Port 5432) — Stores users, trends, strikes, consent records. Prisma ORM connects to it.
3. Temporal Worker — Runs workflows from immortal-core/temporal-workflows/.
4. Redis (Port 6379) – Optional — Rate limiting, session cache, WebSocket pub/sub.

What You Do NOT Host on Localhost

Component Why Not Alternative
Terraform Cloud infrastructure provisioning Run only when deploying to AWS/GCP
Ansible Server configuration management Run only when provisioning remote servers
Docker/K8s manifests Not needed for local dev Use npm run dev instead
Mobile App Runs on phone/emulator Use Expo Go app
Production secrets Never store on local machine Use .env with local values

📋 Localhost URLs After Setup

Service URL Status
API + Frontend http://localhost:3000 ✅ Should respond
API Health Check http://localhost:3000/health ✅ Should return {"status":"ok"}
WebSocket ws://localhost:3000/ws ✅ Should connect
PostgreSQL postgresql://localhost:5432/health_trend ✅ Should connect
IPFS (optional) http://localhost:5001 ✅ If IPFS running
Redis (optional) redis://localhost:6379 ✅ If Redis running
🚀
Quick Start Command (One-Liner)
# After cloning and installing dependencies
npm run dev & npm run worker
# Then open http://localhost:3000
🎯
Bottom Line
You host on localhost: Backend API, Frontend, Database, Temporal Worker, Redis, IPFS (optional)
You do NOT host on localhost: Terraform, Ansible, Production secrets, Mobile app (runs on phone)
The Health Trend Seller system is designed to run entirely on your laptop for development, with cloud deployment handled separately via Terraform/Ansible. 🕵️

🔐 Restricted Access

This content is private. Enter the password to continue.

❌ Incorrect password. Try again.
🚀
Health Trend Seller: Script Execution & Environment Setup Guide
Complete guide for setting up and running the Health Trend Seller Ghost Unit platform.

🚀 Health Trend Seller: Script Execution & Environment Setup Guide

1. Prerequisites Matrix

Prerequisite Minimum Version Recommended Version Verification Command
Node.js 18.0.0 20.x LTS node --version
npm 9.0.0 10.x npm --version
Git 2.30.0 Latest git --version
Docker (optional) 20.10.0 Latest docker --version
Rust (for WASM) 1.70.0 Latest rustc --version
Temporal CLI 1.0.0 Latest temporal --version
IPFS CLI 0.20.0 Latest ipfs --version
PostgreSQL 14.0 15.x psql --version

2. Installation Commands by Operating System

OS Command to Install Node.js 20
macOS brew install node@20
Ubuntu/Debian curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt install -y nodejs
Fedora sudo dnf install nodejs
Windows Download from https://nodejs.org or winget install OpenJS.NodeJS
All (via nvm) nvm install 20 && nvm use 20

3. Where to Run Each Script

Script Execution Directory Absolute Path Dependencies Required
npm install Project root /health-trend-seller/ Node.js, npm
npm run dev Project root /health-trend-seller/ All dependencies installed
npm start Project root /health-trend-seller/ Built assets, production env
npm run build Project root /health-trend-seller/ Next.js dependencies
npm run worker Project root /health-trend-seller/ Temporal server running
npm run db:migrate Project root /health-trend-seller/ PostgreSQL running, DATABASE_URL set

4. Terminal/Shell Selection by OS

OS Recommended Terminal Shell Command to Open
macOS Terminal.app or iTerm2 zsh (default) Cmd+Space → "Terminal"
Windows PowerShell / Windows Terminal PowerShell or WSL2 Bash Win+R → powershell
Linux (Ubuntu) GNOME Terminal bash Ctrl+Alt+T
VS Code Integrated Terminal Any Ctrl+`

5. Step-by-Step Execution Workflow

┌─────────────────────────────────────────────────────────────────────────────┐
│                    HEALTH TREND SELLER EXECUTION WORKFLOW                   │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│   STEP 1: Clone Repository                                                 │
│   ┌─────────────────────────────────────────────────────────────────────┐   │
│   │ $ git clone https://github.com/health-trend-seller/health-trend-seller.git│
│   │ $ cd health-trend-seller                                            │   │
│   └─────────────────────────────────────────────────────────────────────┘   │
│                              ↓                                              │
│   STEP 2: Install Dependencies                                             │
│   ┌─────────────────────────────────────────────────────────────────────┐   │
│   │ $ npm install                                                       │   │
│   │ # Wait 2-5 minutes for dependency installation                      │   │
│   └─────────────────────────────────────────────────────────────────────┘   │
│                              ↓                                              │
│   STEP 3: Configure Environment                                            │
│   ┌─────────────────────────────────────────────────────────────────────┐   │
│   │ $ cp .env.example .env                                              │   │
│   │ $ nano .env        # Edit with your values                         │   │
│   └─────────────────────────────────────────────────────────────────────┘   │
│                              ↓                                              │
│   STEP 4: Start Dependencies (Separate Terminals)                          │
│   ┌─────────────────────────────────────────────────────────────────────┐   │
│   │ Terminal 1: PostgreSQL  │ $ sudo service postgresql start          │   │
│   │ Terminal 2: Temporal    │ $ temporal server start-dev              │   │
│   │ Terminal 3: IPFS        │ $ ipfs daemon                            │   │
│   └─────────────────────────────────────────────────────────────────────┘   │
│                              ↓                                              │
│   STEP 5: Run Database Migrations                                          │
│   ┌─────────────────────────────────────────────────────────────────────┐   │
│   │ $ npm run db:migrate                                               │   │
│   │ $ npm run db:seed                                                   │   │
│   └─────────────────────────────────────────────────────────────────────┘   │
│                              ↓                                              │
│   STEP 6: Start Application                                                │
│   ┌─────────────────────────────────────────────────────────────────────┐   │
│   │ Terminal 4: $ npm run dev         # Development server             │   │
│   │ Terminal 5: $ npm run worker      # Temporal worker (background)   │   │
│   └─────────────────────────────────────────────────────────────────────┘   │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

6. Script-Specific Execution Details

Script Command Expected Output Success Indicator
npm install npm install Package tree + added X packages Exit code 0
npm run dev npm run dev ✅ Server running at http://localhost:3000 Server listening
npm start npm start ✅ Server running at http://localhost:3000 Server listening
npm run build npm run build .next/ directory created Build manifest generated
npm run worker npm run worker Worker listening on task queue Worker registered
npm test npm test Tests: X passed, X failed All tests passing
npm run lint npm run lint No errors or warnings Exit code 0
npm run db:migrate npm run db:migrate Database migrated to latest version Migration applied
npm run db:seed npm run db:seed Seeding completed successfully Data inserted

7. Execution Environment Matrix

Script Development Staging Production CI/CD
npm install ✅ Yes ✅ Yes ✅ Yes ✅ npm ci
npm run dev ✅ Yes ❌ No ❌ No ❌ No
npm start ✅ Yes ✅ Yes ✅ Yes ❌ No
npm run build ✅ Yes ✅ Yes ✅ Yes ✅ Yes
npm run worker ✅ Yes ✅ Yes ✅ Yes ✅ Yes (systemd)
npm test ✅ Yes ✅ Yes ❌ No ✅ Yes
npm run lint ✅ Yes ✅ Yes ❌ No ✅ Yes
npm run db:migrate ✅ Yes ✅ Yes ✅ Yes ✅ Yes

8. Port Allocation During Execution

Service Port Script Responsible Conflict Resolution
Express API 3000 npm run dev / npm start Change PORT in .env
Next.js (dev) 3000 Uses same as Express N/A (integrated)
Next.js (prod) 3000 npm start Same as above
WebSocket 3001 Socket.io server Change WS_PORT in .env
Temporal 7233 npm run worker Change Temporal address in .env
IPFS 5001 External daemon Change IPFS_API_URL

9. Required Directory Structure

health-trend-seller/
├── src/
│   ├── index.js            # Entry point
│   └── server.js           # Express server
├── immortal-core/
│   └── temporal-workflows/
│       └── worker.js       # Temporal worker
├── prisma/
│   └── schema.prisma       # Database schema
├── scripts/
│   └── deploy-wasm.sh      # WASM deployment script
├── .env.example            # Template for .env
└── package.json            # Must be valid JSON

10. Troubleshooting Execution Errors

Error Symptom Root Cause Solution
command not found: node npm commands fail Node.js not installed Install Node.js 18+
EADDRINUSE: address already in use Port 3000 already occupied Another process on port 3000 npx kill-port 3000 or change PORT
Error: Cannot find module Module import fails Dependencies not installed rm -rf node_modules && npm install
Connection refused: temporal Worker fails to start Temporal server not running Start Temporal: temporal server start-dev
PrismaClientInitializationError DB migration fails Database not reachable Verify DATABASE_URL in .env
Permission denied: scripts/deploy-wasm.sh WASM deployment fails Missing execute permission chmod +x scripts/deploy-wasm.sh
npm ERR! code EINTEGRITY npm install fails Cache corruption npm cache clean --force && npm install
💡
Execution Tips & Best Practices
• Always run npm install before any other script — it creates the node_modules/ directory.
• Use npm ci in CI/CD environments — faster and strictly follows package-lock.json.
• Run npm run dev in development — auto-restarts when files change.
• Run npm start in production — optimized for performance, no auto-restart.
• Run npm run worker in a separate terminal or as a background service — it blocks the terminal.
• Use npx for one-off commands — npx prisma studio opens database GUI.
• Set NODE_ENV=production before npm start — enables optimizations.

12. Quick Reference Card

┌─────────────────────────────────────────────────────────────────────────────┐
│                    QUICK REFERENCE: HEALTH TREND SELLER                     │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│   📦 First Time Setup                                                       │
│   ┌─────────────────────────────────────────────────────────────────────┐   │
│   │ git clone <repo> && cd health-trend-seller                          │   │
│   │ cp .env.example .env && nano .env                                   │   │
│   │ npm install                                                         │   │
│   │ npm run db:migrate && npm run db:seed                               │   │
│   └─────────────────────────────────────────────────────────────────────┘   │
│                                                                             │
│   🚀 Start Development                                                      │
│   ┌─────────────────────────────────────────────────────────────────────┐   │
│   │ Terminal 1: npm run dev                                            │   │
│   │ Terminal 2: npm run worker                                          │   │
│   │ → Open http://localhost:3000                                        │   │
│   └─────────────────────────────────────────────────────────────────────┘   │
│                                                                             │
│   🏭 Build for Production                                                   │
│   ┌─────────────────────────────────────────────────────────────────────┐   │
│   │ npm run build                                                       │   │
│   │ NODE_ENV=production npm start                                       │   │
│   └─────────────────────────────────────────────────────────────────────┘   │
│                                                                             │
│   🧪 Testing & Quality                                                      │
│   ┌─────────────────────────────────────────────────────────────────────┐   │
│   │ npm run lint      # Check code style                                │   │
│   │ npm test          # Run unit tests                                  │   │
│   │ npm run format    # Auto-format code                                │   │
│   └─────────────────────────────────────────────────────────────────────┘   │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

📌 Summary: Follow this guide to set up the Health Trend Seller Ghost Unit platform. Install prerequisites, clone the repository, install dependencies, configure environment variables, start supporting services, run database migrations, and launch the application. Use the quick reference card for common operations.

🔍 How to Reach 1,718 Somali SMEs in 2026 — Complete Contact Database 📊

Somalia SME Contact Directory 2026: Complete Database of Networks & Verified Leads ...