TokPulse is an enterprise, multi-store Shopify app that supports two first-class surfaces:
- Headless storefront (Hydrogen/Remix) for larger merchants
- Shopify Online Store 2.0 via Theme App Extensions for Shopify Basic merchants
TokPulse now features comprehensive AI automation for self-diagnosis, optimization, and future-runtime readiness.
- ✅ Self-Diagnosis: Monitors CI logs, latency, and errors 24/7 → auto-creates GitHub Issues
- ✅ Cost Tracking: Predicts monthly spend and alerts on budget deviations (>20%)
- ✅ Semantic Search: Vector embeddings for docs/code with hybrid search
- ✅ Privacy Guard: Automatic PII redaction (GDPR/CCPA compliant)
- ✅ Future-Ready: Validated for Vercel Edge, WASM, Workers, Hydrogen/Oxygen
- ✅ Autonomous Watchers: Nightly integrity checks for DB, API contracts, AI performance
pnpm ai:diagnose # System health check
pnpm ai:insights # GPT-4 powered analysis
pnpm ai:cost # Cost projection & alerts
pnpm futurecheck # Runtime compatibility check
pnpm ai:embeddings # Generate semantic embeddings
pnpm watchers:all # Run all integrity watchersThis is a monorepo built with:
- pnpm for package management
- Turborepo for build orchestration
- TypeScript with strict mode
- Prisma with WASM engine for database operations
- Supabase PostgreSQL for data storage
- Shopify API for store integration
- Node.js 20+
- pnpm 8+
- Supabase account (or PostgreSQL database)
- Clone the repository:
git clone <repository-url>
cd tokpulse- Install dependencies:
pnpm install- Set up environment variables:
cp .env.example .env
# Edit .env with your configuration- Set up the database:
pnpm db:push
pnpm db:seed- Start development:
pnpm devtokpulse/
├── apps/
│ ├── partner-app/ # Shopify app (OAuth, billing, Admin API)
│ ├── web-hydrogen/ # Hydrogen headless storefront
│ └── edge-worker/ # Edge functions
├── packages/
│ ├── theme-ext/ # Theme App Extension (blocks/sections)
│ ├── shared/ # Shared types, validation, utilities
│ ├── db/ # Prisma schema and client
│ ├── api/ # API handlers and business logic
│ ├── jobs/ # Background jobs and webhooks
│ └── ui/ # React components and design system
└── docs/ # Documentation
pnpm dev- Start all development serverspnpm build- Build all packages and appspnpm lint- Run ESLint on all packagespnpm typecheck- Run TypeScript type checkingpnpm test- Run all testspnpm db:push- Push Prisma schema to databasepnpm db:migrate- Run database migrationspnpm db:seed- Seed database with test datapnpm db:studio- Open Prisma Studio
See .env.example for required environment variables:
SHOPIFY_API_KEY- Your Shopify app API keySHOPIFY_API_SECRET- Your Shopify app secretSHOPIFY_SCOPES- Required Shopify scopesDATABASE_URL- PostgreSQL connection stringREDIS_URL- Redis connection string (for queues)
- Single control plane for multiple Shopify stores
- Organization-level user management
- Store-specific configurations and data isolation
- Hydrogen/Remix routes for product recommendations
- Server-side rendering with streaming
- Edge caching and optimization
- Native Shopify 2.0 app blocks
- No theme file modifications required
- Progressive enhancement with JavaScript
- Product catalog synchronization
- Order and customer data ingestion
- Attribution tracking and analytics
- A/B testing framework
- Idempotent webhook processing
- Retry logic with exponential backoff
- Dead letter queue for failed events
- GDPR compliance with data deletion
GET /auth/callback- OAuth callbackPOST /webhooks/*- Shopify webhooksGET /api/stores/:shopDomain- Store informationGET /api/stores/:shopDomain/catalog- Product catalog
GET /api/widgets/recommendations- Product recommendationsPOST /api/analytics/track- Event tracking
The extension provides several app blocks:
- Product Recommendations - Shows related products
- Collection Badges - Displays ratings and promo flags
- Sticky CTA - Utility block for sticky call-to-actions
- Global Bootstrap - Lightweight JavaScript loader
- Package the extension:
cd packages/theme-ext
zip -r tokpulse-extension.zip .- Upload to Shopify Partners dashboard
- Install on merchant stores
Organization- Customer/tenantUser- User accounts with rolesStore- Shopify store connectionsCatalogItem- Normalized product dataPixelEvent- Analytics eventsAttribution- Order attribution dataExperiment- A/B test configurationsJob- Background job queueWebhookEvent- Webhook processing log
All queries are scoped by organization. Row-level security policies ensure data isolation between tenants.
Deploy to your preferred platform (Railway, Heroku, etc.):
pnpm build
# Deploy apps/partner-app/distDeploy to Shopify Oxygen or Vercel:
pnpm build
# Deploy apps/web-hydrogen/distPackage and upload to Shopify Partners:
cd packages/theme-ext
zip -r tokpulse-extension.zip .# Run unit tests
pnpm test
# Run tests in watch mode
pnpm test:watch
# Run tests with coverage
pnpm test --coverage# Install Playwright browsers
pnpm e2e:install
# Run E2E tests locally
pnpm e2e
# Run E2E tests with UI
pnpm e2e:ui
# Run E2E against specific URL
PREVIEW_URL=https://your-preview-url.vercel.app pnpm e2e# TypeScript type checking
pnpm typecheck
# ESLint linting
pnpm lint
# Prettier formatting
pnpm formatThe project uses GitHub Actions for continuous integration:
-
CI Workflow (
.github/workflows/ci.yml)- Runs on every push and PR
- TypeScript type checking
- ESLint linting
- Vitest unit tests
- Vite production build
-
Preview E2E Workflow (
.github/workflows/preview-e2e.yml)- Runs on PRs only
- Deploys to Vercel preview
- Runs Playwright E2E tests
- Comments preview URL on PR
For the E2E workflow to work, set these GitHub secrets:
VERCEL_TOKEN- Vercel deployment tokenVERCEL_ORG_ID- Vercel organization IDVERCEL_PROJECT_ID- Vercel project ID
See VERCEL_CI_E2E_GUIDE.md for detailed setup instructions.
- ✅ TypeScript strict mode (no errors)
- ✅ ESLint rules (no errors)
- ✅ Prettier formatting
- ✅ Unit test coverage
- ✅ E2E test suite
- ✅ Production build success
- Build & Test Guide - Local development and testing
- Vercel CI E2E Guide - CI/CD and deployment setup
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Add tests for new functionality
- Run quality checks:
pnpm quality:check - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Submit a pull request
- Follow our Code of Conduct
- Use conventional commits for commit messages
- Ensure all tests pass before submitting
- Update documentation for new features
- Add appropriate type annotations
This project is licensed under the MIT License - see the LICENSE file for details.
- 📧 Email: hardoniastore@gmail.com
- 🐛 Issues: GitHub Issues
- 📖 Documentation: docs/
- 🔒 Security: SECURITY.md
See CHANGELOG.md for a list of changes and version history.
- Squash-only merges
- Auto-delete branches
- Security scanning in CI