✅ FULLY OPERATIONAL - All endpoints from prodeck-headless-api-spec.md are implemented and running.
- Local URL:
http://localhost:8787 - Network URL:
http://192.168.1.186:8787⭐ - Machine IP:
192.168.1.186 - Port:
8787 - Auth: None required (optional
PRODECK_API_TOKENcan be set) - API Keys: Automatically uses existing
.env.localfrom main ProDeck project - Server Status: Running with auto-reload on file changes
Use this URL from any machine on the same network:
http://192.168.1.186:8787
# Health check
curl http://localhost:8787/api/health
# Generate a test deck
curl -X POST http://localhost:8787/api/deck/generate \
-F "prompt=Q2 Board Update" \
-F "slideCount=5"# Health check
curl http://192.168.1.186:8787/api/health
# Generate a test deck
curl -X POST http://192.168.1.186:8787/api/deck/generate \
-F "prompt=Q2 Board Update" \
-F "slideCount=5"POST /api/deck/generate- Create deck generation jobs (async/sync modes)GET /api/deck/jobs/:jobId- Check job status with progress trackingGET /api/deck/jobs/:jobId/result- Get completed deck metadataGET /api/deck/jobs/:jobId/pptx- Download PowerPoint fileGET /api/deck/jobs/:jobId/slides/:slideNumber- Get individual slide imagesGET /api/deck/jobs/:jobId/manifest- Get full job manifestDELETE /api/deck/jobs/:jobId- Clean up job artifactsGET /api/health- Server health check
- Job Orchestration: p-queue with concurrency=2, in-process job tracking
- Brand Profile System:
gus-defaultprofile included, easily extensible - Gemini AI Integration: Planning (gemini-3-pro-preview) + Image generation (gemini-3-pro-image-preview)
- OpenAI Support: Service stub ready for implementation
- Server-side PPTX Export: Using pptxgenjs with node buffer output
- File Upload Support: PDF, TXT, MD, CSV, PNG, JPG, WEBP
- Progress Tracking: queued → planning → rendering → exporting → done
- CLI Wrapper:
./scripts/prodeck-generate.shfor easy command-line usage - Full Documentation:
HEADLESS_API_QUICKSTART.md- 5-minute quick startSERVER_README.md- Complete API referenceprodeck-headless-api-spec.md- Original specification
- Auto-reloading Dev Server: Uses tsx with watch mode
API is running on http://localhost:8787
-
Get the Mac's local IP address:
ifconfig | grep "inet " | grep -v 127.0.0.1
Example output:
inet 192.168.1.55 netmask... -
Connect from remote machine:
curl http://192.168.1.55:8787/api/health
-
If firewall blocks the connection:
# Option 1: Allow port 8787 through macOS firewall # Go to System Preferences → Security & Privacy → Firewall → Firewall Options # Add Node.js or tsx to allowed applications # Option 2: Temporarily disable firewall for testing sudo pfctl -d # Option 3: Add specific port rule # (Requires creating pfctl rules file)
-
Verify from agent machine:
# Health check curl http://<MAC_IP>:8787/api/health # Should return: {"ok":true,"timestamp":"..."}
The server automatically uses API keys from the main project's .env.local file:
VITE_GOOGLE_API_KEY→ Used for Gemini AIVITE_OPENAI_API_KEY→ Used for OpenAI (when implemented)
No separate server .env configuration needed!
server/storage/jobs/
└── deck_2026-02-16T21-00-00-abc123/
├── manifest.json # Job metadata & progress
├── inputs/ # Uploaded files
│ ├── context-doc.pdf
│ └── style-image.png
└── outputs/ # Generated files
├── slide-1.png
├── slide-2.png
└── deck.pptx
./scripts/prodeck-generate.sh \
--prompt "Marketing Deck for Product Launch" \
--docs ./product-specs.pdf \
--style ./brand-logo.png \
--slides 8 \
--output ./generated-decksThe script handles:
- Job submission
- Status polling
- Progress display
- Automatic download when complete
# 1. Submit job
RESPONSE=$(curl -X POST http://localhost:8787/api/deck/generate \
-F "prompt=Technical Architecture Review" \
-F "contextFiles=@./architecture.pdf" \
-F "styleImages=@./company-logo.png" \
-F "slideCount=10" \
-F "brandProfile=gus-default")
# 2. Extract jobId
JOB_ID=$(echo $RESPONSE | jq -r '.jobId')
# 3. Poll for completion
while true; do
STATUS=$(curl -s http://localhost:8787/api/deck/jobs/$JOB_ID | jq -r '.status')
if [ "$STATUS" = "done" ]; then
break
fi
echo "Status: $STATUS"
sleep 3
done
# 4. Download result
curl -o presentation.pptx http://localhost:8787/api/deck/jobs/$JOB_ID/pptxProDeck/
├── server/ # Headless API server
│ ├── index.ts # Express server & routes
│ ├── services/
│ │ ├── orchestrator.ts # Job queue management
│ │ ├── gemini.ts # Gemini AI integration
│ │ ├── openai.ts # OpenAI stub
│ │ ├── pptx.ts # PowerPoint export
│ │ └── brandProfile.ts # Brand system
│ ├── brandProfiles/
│ │ └── gus-default.json # Default brand profile
│ └── storage/jobs/ # Generated artifacts
├── shared/
│ └── types.ts # Shared types (UI + API)
├── scripts/
│ └── prodeck-generate.sh # CLI wrapper
└── Documentation
├── HEADLESS_API_QUICKSTART.md
├── SERVER_README.md
└── prodeck-headless-api-spec.md
npm run server:dev✅ ProDeck Headless API running on port 8787
📁 Output directory: /Users/delorean_m2/AI/ProDeck/server/storage/jobs
🔐 Auth: Disabled (no token set)
pkill -f "tsx watch server/index.ts"# Check what's using port 8787
lsof -i :8787
# Kill the process
kill -9 <PID>The server automatically reads from .env.local. If you see warnings about missing keys:
- Verify
.env.localexists in project root - Check it contains
VITE_GOOGLE_API_KEY=... - Restart the server
- Verify server is running:
curl http://localhost:8787/api/health - Check Mac's firewall settings
- Ensure both machines are on same network
- Try using Mac's IP instead of hostname
- Full API Documentation: See
SERVER_README.md - Quick Start Guide: See
HEADLESS_API_QUICKSTART.md - Original Specification: See
prodeck-headless-api-spec.md - Brand Profile Example: See
server/brandProfiles/gus-default.json
✅ All Milestone 1 requirements completed (per spec):
/api/deck/generateasync ✅/api/deck/jobs/:jobId✅/api/deck/jobs/:jobId/result✅/api/deck/jobs/:jobId/pptx✅- Gemini provider ✅
gus-defaultprofile support ✅
Ready for production use and agent integration!