| Crates.io | shopify-approver-validators |
| lib.rs | shopify-approver-validators |
| version | 0.1.0 |
| created_at | 2026-01-23 10:50:37.937096+00 |
| updated_at | 2026-01-23 10:50:37.937096+00 |
| description | Validation rule engine for Shopify app compliance (GDPR, billing, security) |
| homepage | https://github.com/umerkhan95/shopify-app-approver |
| repository | https://github.com/umerkhan95/shopify-app-approver |
| max_upload_size | |
| id | 2064114 |
| size | 283,444 |
A Rust-native agentic system that validates Shopify apps against official approval documentation. Provides comprehensive validation through CLI, REST API, and MCP server interfaces.
Validate your Shopify apps directly from Claude Code with one command:
claude plugins add github:umerkhan95/shopify-app-approver
Then just ask Claude:
The plugin auto-activates when it detects Shopify app patterns in your project.
📖 Full Plugin Documentation →
shopify.app.toml including GDPR webhook requirements# Clone the repository
git clone https://github.com/umerkhan95/shopify-app-approver.git
cd shopify-app-approver
# Copy environment configuration
cp .env.example .env
# Edit .env with your API keys
# Required: JWT_SECRET (min 32 chars)
# Optional: GLM_API_KEY, ANTHROPIC_API_KEY for LLM features
# Build the project
cargo build --release
# Set required environment variable
export JWT_SECRET="your-secret-key-at-least-32-characters"
# Run the API server
cargo run -p shopify-approver-api
# Server starts at http://localhost:3000
# Validate a Shopify app
cargo run -p shopify-approver-cli -- check ./path/to/app
# Search documentation
cargo run -p shopify-approver-cli -- docs search "GDPR webhooks"
# List validation rules
cargo run -p shopify-approver-cli -- rules list
# Build and run MCP server
cargo build --release -p shopify-approver-mcp-server
./target/release/shopify-mcp-server
# With RAG support (optional)
MISTRAL_API_KEY=your-key QDRANT_URL=http://localhost:6334 ./target/release/shopify-mcp-server
Configure in Claude Code (~/.claude/settings.json):
{
"mcpServers": {
"shopify-pre-approval": {
"command": "/path/to/shopify-mcp-server"
}
}
}
Or install as a plugin (recommended):
claude plugins add github:umerkhan95/shopify-app-approver
shopify-app-approver/
├── crates/
│ ├── core/ # Shared types, traits, error handling
│ ├── parsers/ # Multi-language parsing (tree-sitter)
│ ├── validators/ # Rule engine with pattern matching
│ ├── vector/ # Qdrant client for semantic search
│ ├── db/ # SQLite database layer (SQLx)
│ ├── rig-agent/ # LLM orchestration with circuit breaker
│ ├── mcp-server/ # MCP protocol server
│ ├── cli/ # Command-line interface
│ ├── api/ # REST API (Axum) with OpenTelemetry
│ └── ingestion/ # Documentation crawler
├── rules/ # Validation rules (TOML)
├── migrations/ # Database migrations
└── tests/ # Integration tests
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/auth/register |
Register new user/tenant |
| POST | /api/v1/auth/login |
Login and get tokens |
| POST | /api/v1/auth/refresh |
Refresh access token |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/reviews |
List reviews (tenant-scoped, paginated) |
| POST | /api/v1/reviews |
Create review with validation |
| GET | /api/v1/reviews/:id |
Get review details with finding counts |
| DELETE | /api/v1/reviews/:id |
Delete review and cascade findings |
| GET | /api/v1/reviews/:id/findings |
Get findings (ordered by severity) |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/validate/file |
Validate single file |
| POST | /api/v1/validate/webhooks |
Check GDPR webhooks |
| POST | /api/v1/validate/api |
Check API compliance |
| POST | /api/v1/validate/billing |
Check billing compliance |
| POST | /api/v1/validate/security |
Security scan |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/docs/search?q=query |
Semantic search (Qdrant) with static fallback |
| GET | /api/v1/docs/rules |
List all validation rules |
| GET | /api/v1/docs/rules/:id |
Get rule details |
| GET | /api/v1/docs/ingestions |
List recent doc ingestion runs |
| GET | /api/v1/docs/ingestions/latest |
Get latest ingestion status |
Rules are defined in TOML format under rules/:
| Category | Rules | Description |
|---|---|---|
| Webhooks | WH001-WH004 | GDPR webhook compliance |
| API | API001-API003 | GraphQL vs REST, scope validation |
| Billing | BIL001-BIL002 | Shopify Billing API requirements |
| Security | SEC001-SEC005 | HTTPS, HMAC, secrets detection |
| OAuth | OAUTH001-OAUTH003 | OAuth flow validation |
| Data | DATA001-DATA003 | Customer data protection |
| Variable | Required | Description |
|---|---|---|
JWT_SECRET |
Yes | JWT signing secret (min 32 chars) |
DATABASE_URL |
No | SQLite path (default: sqlite:./data/approver.db) |
API_HOST |
No | API host (default: 0.0.0.0) |
API_PORT |
No | API port (default: 3000) |
ALLOWED_ORIGINS |
No | CORS origins (default: localhost) |
GLM_API_KEY |
No | GLM 4.7 API key for LLM features |
ANTHROPIC_API_KEY |
No | Claude API key (fallback) |
OPENAI_API_KEY |
No | OpenAI API key for embeddings |
QDRANT_URL |
No | Qdrant server URL (default: http://localhost:6333) |
QDRANT_COLLECTION |
No | Qdrant collection name (default: shopify_approval_docs) |
OTEL_EXPORTER_OTLP_ENDPOINT |
No | OpenTelemetry collector endpoint |
The MCP server provides lightweight tools for AI agents:
{
"tools": [
"quick_check_file", // Validate single file (~50-100 tokens)
"check_webhooks", // GDPR webhook status (~30-50 tokens)
"check_api_usage", // GraphQL vs REST (~50 tokens)
"check_billing", // Billing compliance (~30-50 tokens)
"get_fix_hint", // Fix recommendation (~100 tokens)
"search_docs", // Search documentation (~200 tokens)
"approval_status" // Overall readiness (~100 tokens)
]
}
# Run all tests
cargo test --workspace
# Run specific crate tests
cargo test -p shopify-approver-validators
# Run with logging
RUST_LOG=debug cargo test --workspace
# Format code
cargo fmt
# Run linter
cargo clippy --workspace -- -D warnings
# Check compilation
cargo check --workspace
Migrations run automatically on API server startup. For manual control:
# Migrations are in migrations/ directory
# SQLite database is created at $DATABASE_URL path
#[inline] on hot path functionsOpenTelemetry tracing is built-in:
# Enable OTLP export
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
export OTEL_SERVICE_NAME=shopify-approver-api
# JSON logs for production
export LOG_FORMAT=json
MIT License - see LICENSE for details.
cargo fmt and cargo clippySee CLAUDE.md for development guidelines.