Setup Guide
Follow these steps once to connect TKOS to your WooCommerce store. After setup, new orders sync automatically.
A — WooCommerce API Keys
1
Go to WooCommerce REST API settings
WP Admin → WooCommerce → Settings → Advanced → REST API → Add Key
2
Fill in these details
  • Description: TKOS System
  • User: your admin account
  • Permissions: Read/Write
Click Generate API Key. Copy both keys — secret is shown only once.
3
Add to .env.local
WOO_CONSUMER_KEY=ck_your_key_here WOO_CONSUMER_SECRET=cs_your_secret_here
B — Webhooks (for automatic order sync)
4
Register 2 webhooks in WooCommerce
WooCommerce → Settings → Advanced → Webhooks → Add Webhook
Webhook 1 — Order Created
Topic: Order created
Delivery URL: http://YOUR_SERVER_IP:3000/api/webhooks/woocommerce
Secret: (value from WOO_WEBHOOK_SECRET in .env.local)

Webhook 2 — Order Updated
Topic: Order updated
Delivery URL: same URL as above
C — Server Deployment (Namecheap)
5
Upload and install
# SSH into your server ssh root@YOUR_SERVER_IP # Upload project and install cd /var/www npm install # Setup database tables npm run db:setup # Build and start npm run build npm install -g pm2 pm2 start "npm start" --name tkos pm2 startup && pm2 save
6
Access the system
Dashboard: http://YOUR_SERVER_IP:3000 LCD Mode: http://YOUR_SERVER_IP:3000/lcdOpen port 3000 on firewall: sudo ufw allow 3000 && sudo ufw reload
D — Initial Data Pull
7
Pull existing orders from WooCommerce
After this one-time pull, new orders sync automatically via webhooks.