Enterprise Shopify-to-PostgreSQL data pipeline with real-time sync, automated scheduling, and powerful analytics.
ShopSync connects your Shopify store to a PostgreSQL database, enabling advanced analytics with tools like Power BI, Grafana, or any SQL-based reporting tool. It provides a beautiful web UI for managing syncs, viewing data, and monitoring pipeline health.
- Real-Time Sync — Pull orders, products, and customers from Shopify into PostgreSQL
- Automated Scheduling — Cron-based sync with presets (30 min, 1 hour, 6 hours, daily)
- Analytics Dashboard — Built-in charts and metrics for order trends, revenue, and product performance
- Advanced Analytics Pro — Deep-dive analytics with cohort analysis, funnel visualization, and forecasting
- Data Browser — Explore synced data with sortable, filterable tables
- Settings UI — Configure PostgreSQL and Shopify credentials from the browser
- Health Monitoring — Built-in health check endpoint (
/api/health) - Power BI Ready — Connect Power BI directly to your PostgreSQL tables
- Security — Helmet, CORS, rate limiting, non-root Docker container
┌──────────────┐ REST API ┌──────────────┐ Shopify API ┌──────────────┐
│ │ ◄─────────────────► │ │ ◄───────────────────► │ │
│ Browser │ │ ShopSync │ │ Shopify │
│ (React) │ │ (Node.js) │ │ Store │
│ │ │ │ │ │
└──────────────┘ └──────┬───────┘ └──────────────┘
│
│ pg driver
▼
┌──────────────┐
│ PostgreSQL │
│ Database │
└──────────────┘
│
┌────────┴────────┐
│ │
┌────▼────┐ ┌─────▼─────┐
│Power BI │ │ Grafana / │
│ │ │ Any SQL │
└─────────┘ └───────────┘
- Node.js 18+
- PostgreSQL 14+
- A Shopify store with Admin API access
npm install
cd client && npm install && cd ..export DATABASE_URL="postgresql://user:password@localhost:5432/shopify_sync"
npm run init-db# Production
npm run build # Build the React UI
npm start # Runs on http://localhost:3000
# Development (hot reload)
npm run dev # Backend with --watch
cd client && npm run dev # Vite dev server (proxies /api to backend)Open Settings in the browser and set:
| Setting | Example |
|---|---|
| PostgreSQL URL | postgresql://user:password@host:5432/dbname |
| Shopify Store | my-store.myshopify.com |
| Shopify Token | shpat_xxxxxxxxxxxx |
Note: If your PostgreSQL password contains special characters (
# $ , + \ < >etc.), URL-encode them in the connection string (e.g.#→%23).
- In Shopify Admin, go to Settings → Apps and sales channels → Develop apps
- Create a Custom app with these Admin API scopes:
read_ordersread_productsread_customersread_all_orders(for orders older than 60 days)
- Install the app and copy the Admin API access token (
shpat_...)
| Variable | Description | Required | Default |
|---|---|---|---|
DATABASE_URL |
PostgreSQL connection string | Yes* | — |
SHOPIFY_STORE |
Store domain | No* | — |
SHOPIFY_ACCESS_TOKEN |
Admin API token | No* | — |
PORT |
Server port | No | 3000 |
NODE_ENV |
Environment | No | — |
CORS_ORIGIN |
Allowed CORS origin | No | — |
*Can be configured via the Settings UI instead of environment variables.
docker compose up -d
# Open http://localhost:3000This starts PostgreSQL + ShopSync with automatic database migration.
# Build the image
docker build -t shopsync:latest .
# Run with external PostgreSQL
docker run -d \
--name shopsync \
-p 3000:3000 \
-e DATABASE_URL=postgresql://user:password@host:5432/dbname \
-v shopsync-data:/app/data \
shyamkrishna21/shopsync:latestMulti-architecture images (linux/amd64 + linux/arm64) are available on Docker Hub:
docker pull shyamkrishna21/shopsync:latest
docker pull shyamkrishna21/shopsync:v1.0.0- Kubernetes 1.23+
- Helm 3.8+
cd helm/shopsync
# Install in the shopsync namespace
helm install shopsync . -n shopsync --create-namespace \
--set env.DATABASE_URL="postgresql://user:password@host:5432/dbname"helm install shopsync . -n shopsync --create-namespace \
--set postgresql.enabled=true \
--set postgresql.auth.password=secure-passwordhelm install shopsync . -n shopsync --create-namespace \
--set env.DATABASE_URL="postgresql://user:password@host:5432/dbname" \
--set ingress.enabled=true \
--set ingress.hosts[0].host=shopsync.example.com \
--set ingress.hosts[0].paths[0].path=/ \
--set ingress.hosts[0].paths[0].pathType=Prefixkubectl -n shopsync port-forward svc/shopsync 3000:80
# Open http://localhost:3000For detailed Helm chart configuration, see helm/shopsync/README.md.
| Page | Description |
|---|---|
| Dashboard | Data counts, "Sync Now" button, recent sync runs |
| Sync History | All sync runs with status and entity counts |
| Schedule | Cron-based sync scheduling with presets |
| Data | Browse synced orders, products, and customers |
| Analytics | Charts for order trends, revenue, top products |
| Analytics Pro | Advanced analytics with cohort analysis, forecasting |
| Settings | PostgreSQL and Shopify credential management |
Connect Power BI to the same PostgreSQL database to build custom reports:
- Open Power BI → Get Data → PostgreSQL Database
- Enter your database host, port, and credentials
- Select tables:
shopify_orders— Order data with line itemsshopify_products— Product catalogshopify_customers— Customer informationsync_runs— Sync history metadata
| Table | Description |
|---|---|
shopify_orders |
Orders with financial details |
shopify_products |
Product catalog with variants |
shopify_customers |
Customer profiles |
sync_runs |
Sync execution history |
sync_schedule |
Cron schedule configuration |
| Layer | Technology |
|---|---|
| Frontend | React 18, Vite, Chart.js |
| Backend | Node.js 18, Express 4 |
| Database | PostgreSQL 16 |
| Containerization | Docker (multi-stage, non-root) |
| Orchestration | Kubernetes, Helm 3 |
- Set a strong
DATABASE_URLpassword - Configure Shopify credentials via the Settings UI
- Enable Ingress with TLS/HTTPS
- Set up PostgreSQL backups
- Configure resource limits in Helm values
- Set
NODE_ENV=production - Consider managed PostgreSQL (Cloud SQL, RDS) for HA
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT
Made with ❤️ by Shyam Sunder KS