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