{"id":27249534,"url":"https://github.com/hmarcien/shopify-reality-check","last_synced_at":"2025-06-18T02:37:59.763Z","repository":{"id":286948115,"uuid":"962787503","full_name":"HMarcien/shopify-reality-check","owner":"HMarcien","description":"Audit and predict operational performance for Shopify merchants — powered by a neural network in Racket (Malt). Built with a reflexive AI mindset, designed for real insights.","archived":false,"fork":false,"pushed_at":"2025-04-09T05:22:56.000Z","size":1164,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T00:18:04.493Z","etag":null,"topics":["ai","audit","backend","ecommerce","fulfillment","logistics","malt","neural-network","racket","reflexive-ai","shopify","shopify-api"],"latest_commit_sha":null,"homepage":"https://github.com/HMarcien/shopify-reality-check","language":"Racket","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HMarcien.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-08T17:11:56.000Z","updated_at":"2025-04-09T05:22:59.000Z","dependencies_parsed_at":"2025-04-09T06:36:53.412Z","dependency_job_id":null,"html_url":"https://github.com/HMarcien/shopify-reality-check","commit_stats":null,"previous_names":["hmarcien/shopify-reality-check"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HMarcien/shopify-reality-check","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMarcien%2Fshopify-reality-check","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMarcien%2Fshopify-reality-check/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMarcien%2Fshopify-reality-check/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMarcien%2Fshopify-reality-check/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HMarcien","download_url":"https://codeload.github.com/HMarcien/shopify-reality-check/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HMarcien%2Fshopify-reality-check/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260476021,"owners_count":23014951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","audit","backend","ecommerce","fulfillment","logistics","malt","neural-network","racket","reflexive-ai","shopify","shopify-api"],"created_at":"2025-04-11T00:18:03.610Z","updated_at":"2025-06-18T02:37:54.749Z","avatar_url":"https://github.com/HMarcien.png","language":"Racket","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/banner.png\" alt=\"Shopify Reality Check Banner\" /\u003e\n\u003c/p\u003e\n\n# Shopify Reality Check 🛠️📦\n\n**An intelligent audit system to verify whether a Shopify merchant is truly delivering on their logistical promises.**\n\n---\n\n## 🌍 Context\n\nIn the Shopify ecosystem, the simplicity of commerce often hides very real **logistical complexities**: shipping delays, unfulfilled promises, frequent refunds, etc. These weak signals often go unnoticed by merchants.\n\n**Shopify Reality Check** is a backend tool designed to:\n- Automatically audit a store’s operational performance\n- Detect discrepancies between what was promised to customers and what actually happened\n- Provide smart predictions of future delays via a neural network\n\n---\n\n## 🔍 Project Objectives\n\n- **Analyze** Shopify store data (orders, products, fulfillments)\n- **Detect** logistical anomalies: frequent delays, slow shipping, suspicious refunds\n- **Predict** future delay risks using a lightweight machine learning model (via [Malt](https://docs.racket-lang.org/malt/index.html))\n- **Deliver** results via a clean REST API for integration or visualization\n\n---\n\n## 🧠 What this project demonstrates\n\n- My ability to design a backend tool focused on real-world merchant needs\n- Deep understanding of the Shopify ecosystem (API, e-commerce logistics)\n- Neural network integration written in Racket using the Malt library\n- A product-oriented mindset centered on operational truth and quality\n\n---\n\n## 📦 Tech Stack\n\n- **Language**: [Racket](https://racket-lang.org/)\n- **ML Library**: [Malt](https://docs.racket-lang.org/malt/index.html)\n- **API**: Built with Racket's native HTTP server\n- **Data sources**:\n  - Shopify Dev Store (official API)\n  - Manually generated edge-case mocks\n- **Output**: REST API + detailed JSON audit report\n\n---\n\n## 🚀 Key Features\n\n- `GET /audit`  \n  → Returns a structured JSON report with metrics and detected anomalies\n\n- `POST /predict-delay`  \n  → Predicts the probability of delay for a given order\n\n- `GET /health`  \n  → Health check of audit and predictive components\n\n---\n\n## 🎯 Target Audience\n\n- Shopify merchants who want to **measure their actual operational reliability**\n- Developers/agencies looking to offer **logistics quality insights**\n- Shopify internal teams interested in autonomous diagnostic tools\n\n---\n\n## ✨ Next Steps\n\nThis repository is a starting point. Long-term ambitions include:\n- Adding a minimal UI for merchants\n- Exporting printable PDF reports\n- Expanding predictive models (e.g. return/refund likelihood)\n\n---\n\n📫 Curious about the tech or the approach?  \nI’d be happy to connect – code@shopify.com\n\n---\n\n## ⚙️ Installation \u0026 Run\n\n### 🐧 Requirements\n\n- Racket installed: [https://racket-lang.org/](https://racket-lang.org/)\n- Access to a Shopify Dev Store (with private API token)\n- API token passed via a `config.rkt` file or `SHOPIFY_TOKEN` env variable\n\n### 📦 Dependencies\n\nInstall the following Racket packages:\n\n```bash\nraco pkg install malt\nraco pkg install http\nraco pkg install json\nraco pkg install threading\n```\n\n### ▶️ Run the project\n\n```bash\nracket app/main.rkt\n```\n\nBy default, the API runs on [http://localhost:8080](http://localhost:8080)\n\n---\n\n## 🔗 API Usage Examples\n\n### Logistics audit\n\n```bash\ncurl http://localhost:8080/audit\n```\n\nExample response:\n\n```json\n{\n  \"store_name\": \"mock-boutique-eco\",\n  \"total_orders\": 134,\n  \"late_fulfillments\": 22,\n  \"avg_delay_days\": 2.4,\n  \"refund_rate\": 0.12,\n  \"suspicious_products\": [\n    {\n      \"product_id\": \"836204917\",\n      \"title\": \"Eco White T-shirt\",\n      \"avg_shipping_delay\": 3.9\n    }\n  ],\n  \"reliability_score\": 76.2\n}\n```\n\n### Delay prediction\n\n```bash\ncurl -X POST http://localhost:8080/predict-delay      -H \"Content-Type: application/json\"      -d '{\n           \"order\": {\n             \"created_at\": \"2025-04-06T11:15:00Z\",\n             \"products\": [\"#542\", \"#978\"],\n             \"inventory\": { \"#542\": 5, \"#978\": 0 },\n             \"day_of_week\": \"Monday\"\n           }\n         }'\n```\n\nExample response:\n\n```json\n{\n  \"delay_probability\": 0.84,\n  \"estimated_delay_days\": 2.7,\n  \"risk_level\": \"high\"\n}\n```\n\n---\n\n## 🧪 Simulated Mock Data\n\nEnable mock mode to test edge cases:\n- Products always marked in stock but shipped late\n- Orders never refunded despite issues\n- Fulfillments created days after order\n\nRun the API in mock mode:\n\n```bash\nracket app/main.rkt --mock\n```\n\n---\n\n## 🧰 API Overview\n\n| Endpoint          | Method | Description                                 |\n|-------------------|--------|---------------------------------------------|\n| `/audit`          | GET    | Generates a logistics quality audit         |\n| `/predict-delay`  | POST   | Predicts shipping delay for an order        |\n| `/health`         | GET    | Health check for core services              |\n\n---\n\n## 🤖 Reflexive AI usage – built-in by design\n\n\u003e Inspired by [Tobi Lütke’s call](https://x.com/tobi/status/1909251946235437514) for **reflexive AI usage** as a baseline expectation at Shopify,  \n\u003e this project integrates AI not as a gimmick, but as a **natural extension of the backend logic**.\n\n- Predictions are made through a neural network written in **Racket** using the [Malt](https://docs.racket-lang.org/malt/index.html) library.\n- The AI is embedded **directly in the workflow**: analyzing fulfillment patterns, scoring risk, anticipating delays.\n- The model runs locally, trains quickly on mock or real data, and reflects **how I use AI daily to think, build, and iterate faster**.\n\n\u003e This is my way of saying: I don’t just use AI — I work **with** it.\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmarcien%2Fshopify-reality-check","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmarcien%2Fshopify-reality-check","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmarcien%2Fshopify-reality-check/lists"}