The PIM as Code Concept
Let's be honest: managing product catalogs with Git repositories and JSON files sounds absolutely crazy. It flies in the face of conventional PIM wisdom and makes most product managers shake their heads in disbelief.
But here's the thing – it actually works. Under the right circumstances, this unconventional approach can be not just viable, but genuinely superior to traditional PIM platforms.
PIM as Code applies software development principles to product information management. Instead of using traditional PIM platforms with web interfaces and databases, product data lives in JSON files within Git repositories, leveraging the entire developer toolchain for product catalog management.
This approach treats product data with the same rigor as source code: version control, branching strategies, merge requests, automated testing, and deployment pipelines. Each product becomes a JSON file, with relationships managed through references and folder structures.
Core Principles:
- Version Control: Complete audit trail of all product data changes
- Branching: Feature branches for product updates, seasonal catalogs
- Code Review: Peer review of product data changes before merging
- Automation: CI/CD pipelines for validation, enrichment, and publishing
- Developer Experience: Familiar tools and workflows for technical teams
Yes, it's unconventional. Yes, it requires technical skills. But when the stars align – developer-centric teams, manageable catalog sizes, technical products – this approach can deliver results that traditional PIMs struggle to match.
Product Data Structure Example
Sample JSON structure for a product in a PIM as Code repository
{
"id": "laptop-macbook-air-m2-13",
"sku": "MBA-M2-13-256-SG",
"name": {
"en": "MacBook Air 13-inch M2 Chip",
"da": "MacBook Air 13-tommer M2 Chip"
},
"description": {
"en": "Supercharged by the M2 chip, the redesigned MacBook Air...",
"da": "Superstyret af M2-chippen, den redesignede MacBook Air..."
},
"category": {
"primary": "electronics/computers/laptops",
"breadcrumb": ["Electronics", "Computers", "Laptops"]
},
"brand": "apple",
"attributes": {
"processor": "Apple M2",
"screen_size": "13.6",
"storage": "256GB",
"memory": "8GB",
"color": "Space Gray",
"weight": "1.24kg"
},
"pricing": {
"currency": "USD",
"msrp": 1199.00,
"cost": 899.00,
"effective_date": "2025-01-01"
},
"assets": {
"images": [
{
"url": "/assets/products/mba-m2-13-sg-hero.jpg",
"alt": "MacBook Air M2 13-inch Space Gray",
"type": "hero",
"dimensions": "2048x1536"
}
],
"documents": [
{
"url": "/assets/products/mba-m2-specs.pdf",
"type": "specifications",
"title": "Technical Specifications"
}
]
},
"relationships": {
"variants": [
"laptop-macbook-air-m2-13-512",
"laptop-macbook-air-m2-15"
],
"accessories": [
"charger-usbc-67w",
"case-macbook-13-leather"
]
},
"channels": {
"website": {
"active": true,
"seo_title": "MacBook Air M2 13-inch - Buy Online"
},
"amazon": {
"active": true,
"asin": "B0B3C2R8MP"
}
},
"metadata": {
"created": "2025-01-15T10:00:00Z",
"updated": "2025-06-01T14:30:00Z",
"status": "active",
"version": "1.3.0"
}
}
Repository Structure & Organization
Folder Hierarchy
A well-organized PIM as Code repository follows predictable patterns for easy navigation and automation:
product-catalog/
├── products/
│ ├── electronics/
│ │ ├── computers/
│ │ │ ├── laptops/
│ │ │ │ ├── macbook-air-m2-13.json
│ │ │ │ └── macbook-pro-14.json
│ │ │ └── desktops/
│ │ └── smartphones/
│ └── clothing/
├── categories/
│ ├── electronics.json
│ └── clothing.json
├── brands/
│ ├── apple.json
│ └── nike.json
├── schemas/
│ ├── product-schema.json
│ └── category-schema.json
├── assets/
│ ├── images/
│ └── documents/
├── scripts/
│ ├── validate.js
│ ├── generate-feeds.js
│ └── sync-channels.js
└── .github/
└── workflows/
├── validate-pr.yml
└── deploy-production.yml
File Naming Conventions
Consistent naming enables automation and human readability. Product files use kebab-case with category prefixes, while maintaining unique identifiers across the entire catalog.
Schema Validation
JSON Schema files define data structure requirements, ensuring consistency and catching errors during the development process. This provides the data governance typically handled by traditional PIM platforms.
Developer Workflow Example
Adding a New Product
The workflow mirrors standard software development practices, making it familiar to technical teams:
1. Create Feature Branch
git checkout -b feature/add-iphone-15-pro
git pull origin main
2. Create Product File
# Copy template and customize
cp templates/product-template.json products/electronics/smartphones/iphone-15-pro.json
# Edit the JSON file with product details
3. Validate Locally
npm run validate
npm run test
# Checks schema compliance, link integrity, image references
4. Commit and Push
git add products/electronics/smartphones/iphone-15-pro.json
git commit -m "feat: add iPhone 15 Pro product data"
git push origin feature/add-iphone-15-pro
5. Create Pull Request
The PR triggers automated checks: schema validation, asset verification, duplicate detection, and pricing rules validation. Team members review the changes, suggest improvements, and approve the merge.
6. Deploy to Production
Upon merge to main, CI/CD pipelines automatically update e-commerce platforms, generate product feeds, and sync with sales channels.
CI/CD Pipeline Example
GitHub Actions workflow for validating and deploying product data changes
name: Product Data Pipeline
on:
pull_request:
paths: ['products/**/*.json']
push:
branches: [main]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Validate JSON Schema
run: npm run validate:schema
- name: Check for duplicates
run: npm run validate:duplicates
- name: Verify asset links
run: npm run validate:assets
- name: Test price calculations
run: npm run test:pricing
deploy:
if: github.ref == 'refs/heads/main'
needs: validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Generate product feeds
run: npm run generate:feeds
- name: Sync to Shopify
run: npm run sync:shopify
env:
SHOPIFY_API_KEY: ${{ secrets.SHOPIFY_API_KEY }}
- name: Update search index
run: npm run update:search
- name: Deploy to CDN
run: npm run deploy:assets
Benefits & Advantages
Complete Version Control
Every product data change is tracked with full audit trails. You can see exactly who changed what, when, and why. Rollbacks are instant - just revert to a previous commit. Branch-based development allows testing changes in isolation before merging to production.
Developer-Friendly Tooling
Teams already familiar with Git, VS Code, and command-line tools can immediately start managing product data. No new UI to learn, no vendor-specific training required. Code editors provide syntax highlighting, auto-completion, and error detection for JSON files.
Automation & Integration
Leverage the entire DevOps ecosystem: GitHub Actions, Jenkins, automated testing, deployment pipelines. Product data changes can trigger automatic updates to multiple sales channels, search indexes, and analytics systems.
Zero Vendor Lock-in
Your data is in open formats (JSON, Git) with no proprietary database or export limitations. Moving between hosting providers or changing tooling is straightforward. The entire catalog can be backed up with a simple git clone.
Cost Effectiveness
For smaller catalogs, this approach can be essentially free using GitHub/GitLab free tiers. No per-user licensing, no storage limits based on product count. Scaling costs are minimal compared to enterprise PIM solutions.
Collaborative Workflows
Pull request reviews ensure data quality through peer validation. Multiple team members can work on different products simultaneously using branches. Conflict resolution uses established Git merge strategies.
Challenges & Limitations
Technical Skill Requirements
Non-technical team members need to learn Git, JSON editing, and command-line basics. This creates a barrier for traditional merchandising teams who are comfortable with spreadsheets and web interfaces but not developer tools.
Scalability Concerns
Git repositories become unwieldy with thousands of files. Large binary assets (high-resolution images, videos) can bloat repository size. Performance degrades with very large product catalogs (10,000+ products).
Limited Query Capabilities
No built-in search, filtering, or complex queries without additional tooling. Finding products across categories requires grep commands or custom scripts. Complex relationships and dependencies are harder to visualize and manage.
Asset Management Complexity
Digital assets need separate storage and CDN solutions. Version control of binary files is problematic. Image optimization and variant generation require additional automation.
Real-time Collaboration Limits
Multiple editors working on the same product file can create merge conflicts. No real-time collaborative editing like traditional PIM interfaces. Concurrent access patterns require careful branch management.
Missing PIM Features
No built-in workflow states, approval processes, or role-based permissions beyond Git's capabilities. Completeness tracking, automated enrichment, and data quality monitoring require custom development.

"I've used this exact approach as a CMS for regelrytter.dk, managing 25,000+ regulatory rules in JSON files with Git. For a single developer setup, it works incredibly well. The version control, automated validation, and deployment pipelines give you enterprise-grade capabilities without the enterprise overhead."— Sivert Kjøller Bertelsen, PIM Implementation Expert & Developer
When PIM as Code Makes Sense
Ideal Scenarios
Tech Companies & Startups: Organizations with developer-heavy teams and limited non-technical staff. Software companies selling digital products or SaaS tools often find this approach natural.
Small to Medium Catalogs: Product counts under 1,000-5,000 items where file-based management remains practical. Complex hierarchies become difficult to navigate with larger catalogs.
Developer-Led E-commerce: Headless commerce implementations where developers are already managing the entire stack. Custom integration requirements that benefit from programmatic approaches.
Content-Rich Products: Products requiring extensive technical documentation, specifications, or configuration data that developers understand better than traditional merchandisers.
Success Stories
API-First SaaS Company: A developer tools company used Git-based product management for their subscription tiers, integrations, and pricing plans. The technical nature of their products meant developers could better maintain accuracy than non-technical staff.
Hardware Startup: An IoT device manufacturer managed their product catalog in Git, with engineers updating technical specifications directly. This ensured engineering and marketing data stayed synchronized.
Digital Agency: A web development agency used this approach for their service catalog, pricing models, and case studies. The entire team was technically proficient, making Git workflows natural.
Implementation Strategy
Phase 1: Foundation Setup
Repository Structure: Design folder hierarchy and naming conventions. Create JSON schemas for validation. Set up basic automation scripts for common tasks.
Tooling Selection: Choose code editors, validation tools, and automation platforms. Establish CI/CD pipelines for testing and deployment. Set up asset storage and CDN solutions.
Team Training: Git fundamentals workshop for non-technical team members. JSON editing best practices and schema understanding. Workflow documentation and change management processes.
Phase 2: Data Migration
Schema Design: Define product data structure based on business requirements. Plan for internationalization, multi-channel needs, and future extensibility.
Bulk Import: Create scripts to convert existing data (spreadsheets, CSV files) to JSON format. Validate data integrity and completeness during migration.
Asset Organization: Establish file naming conventions and folder structures for digital assets. Implement image optimization and variant generation workflows.
Phase 3: Integration & Automation
Channel Sync: Build automation to push product data to e-commerce platforms, marketplaces, and sales channels. Implement error handling and retry logic for failed syncs.
Quality Assurance: Automated testing for data consistency, pricing rules, and business logic. Monitoring for data drift and integration failures.
Performance Optimization: Implement caching strategies and incremental updates. Monitor repository performance and optimize for scale.
Supporting Tools & Technologies
Version Control Platforms
GitHub: Excellent CI/CD integration, large ecosystem, robust pull request workflows. GitHub Large File Storage (LFS) for asset management.
GitLab: Integrated DevOps platform with built-in CI/CD, container registry, and project management features. Self-hosted options for enterprise requirements.
Bitbucket: Atlassian integration with Jira and Confluence. Good for teams already using Atlassian toolchain.
Validation & Testing
JSON Schema: Schema validation for data structure enforcement. Ajv library for fast JSON validation in Node.js environments.
Jest/Mocha: Unit testing frameworks for custom business logic validation. Test product data integrity and relationship consistency.
Prettier/ESLint: Code formatting and linting tools adapted for JSON file consistency.
Asset Management
Git LFS: Large File Storage for binary assets within Git repositories. Automatic handling of images, videos, and documents.
ImageOptim/Sharp: Automated image optimization and variant generation. WebP conversion and responsive image creation.
AWS S3/CloudFront: Asset storage and CDN delivery. Integration with deployment pipelines for automatic asset uploads.
Integration Platforms
Zapier/n8n: No-code integration platforms for connecting Git changes to business systems.
Shopify CLI: Direct integration with Shopify for product synchronization. Automated theme updates and metafield management.
Custom APIs: RESTful services built around the Git repository for non-technical team access.

"With Next.js, JSON product data can be compiled statically at build time, giving you incredible performance. Your entire product catalog becomes part of the static bundle - no database queries, no API calls, just blazing fast page loads. It's a game-changer for performance-critical e-commerce."— Alex Kumar, Full-Stack Developer & Next.js Expert
Comparison table data is incomplete. Please check the content configuration.

"I've seen PIM as Code work brilliantly for developer-led teams with smaller catalogs. The key is honest assessment of your team's technical skills and willingness to invest in custom tooling. It's not for everyone, but when it fits, it's incredibly powerful."— Sarah Chen, E-commerce Architecture Consultant
Future Evolution & Considerations
Hybrid Approaches
The future likely involves hybrid models combining Git-based workflows with traditional PIM interfaces. Headless PIM solutions that store data in Git repositories while providing business-user interfaces for non-technical team members.
Tooling Maturation
Specialized tools are emerging to bridge the gap between developer workflows and business requirements. Visual editors for JSON product data, Git-integrated asset management platforms, and PIM-specific CI/CD frameworks.
AI-Assisted Management
Large language models can help generate product descriptions, validate data consistency, and suggest product relationships. AI-powered tools could make Git-based workflows more accessible to non-technical users.
Enterprise Adoption
As enterprises adopt DevOps practices more broadly, PIM as Code concepts may gain traction for specific use cases. API-first commerce platforms and headless architectures create opportunities for developer-centric approaches.
Compliance & Governance
Regulatory requirements around data governance, audit trails, and change management may actually favor Git-based approaches due to their inherent transparency and traceability.
Decision Framework: Is PIM as Code Right for You?
Evaluation Criteria
Team Composition
- ✅ Developer-heavy team comfortable with Git and JSON
- ✅ Limited budget for traditional PIM licensing
- ❌ Non-technical merchandising team as primary users
- ❌ Resistance to command-line tools and technical workflows
Product Catalog Characteristics
- ✅ Small to medium catalog (under 5,000 products)
- ✅ Technical products requiring developer input
- ✅ Simple product hierarchies and relationships
- ❌ Large, complex catalogs with deep hierarchies
- ❌ Frequent bulk updates by non-technical users
Technical Infrastructure
- ✅ Existing CI/CD pipelines and DevOps practices
- ✅ API-first or headless commerce architecture
- ✅ Custom integration requirements
- ❌ Legacy systems requiring traditional PIM connectors
- ❌ Limited development resources for custom tooling
Business Requirements
- ✅ Strong audit trail and change tracking needs
- ✅ Complex approval workflows using existing Git practices
- ✅ Need for experimental/seasonal catalog branches
- ❌ Real-time collaborative editing requirements
- ❌ Complex product configurators and variant management
Scoring Framework
Rate each criterion from 1-5 based on how well your situation matches:
- 15-20 points: PIM as Code is an excellent fit
- 10-14 points: Consider hybrid approaches or specialized tooling
- 5-9 points: Traditional PIM is likely better suited
Complete Implementation Example
Package.json with scripts for a complete PIM as Code implementation
{
"name": "product-catalog",
"version": "1.0.0",
"description": "PIM as Code - Product catalog managed with Git and JSON",
"scripts": {
"validate": "npm run validate:schema && npm run validate:duplicates && npm run validate:assets",
"validate:schema": "ajv validate -s schemas/product-schema.json -d 'products/**/*.json'",
"validate:duplicates": "node scripts/check-duplicates.js",
"validate:assets": "node scripts/verify-assets.js",
"test": "jest",
"test:pricing": "jest tests/pricing.test.js",
"test:relationships": "jest tests/relationships.test.js",
"build": "npm run build:feeds && npm run build:search",
"build:feeds": "node scripts/generate-feeds.js",
"build:search": "node scripts/build-search-index.js",
"deploy": "npm run deploy:shopify && npm run deploy:assets",
"deploy:shopify": "node scripts/sync-shopify.js",
"deploy:assets": "aws s3 sync assets/ s3://product-assets-bucket/ --delete",
"dev:server": "node scripts/dev-server.js",
"stats": "node scripts/catalog-stats.js",
"lint": "prettier --check 'products/**/*.json' && eslint scripts/",
"fix": "prettier --write 'products/**/*.json'"
},
"devDependencies": {
"ajv-cli": "^5.0.0",
"jest": "^29.0.0",
"prettier": "^2.8.0",
"eslint": "^8.0.0",
"express": "^4.18.0",
"axios": "^1.0.0",
"aws-sdk": "^2.1200.0",
"shopify-api-node": "^3.12.0"
},
"dependencies": {
"lodash": "^4.17.21",
"glob": "^8.0.0",
"yaml": "^2.0.0"
}
}

"The biggest mistake I see is underestimating the operational overhead. Yes, PIM as Code can work, but you need someone who can maintain the scripts, fix integration issues, and train team members. It's not 'set it and forget it' like traditional PIM platforms."— Marcus Rodriguez, DevOps Engineer & E-commerce Consultant
Case Study: Developer Tools Startup
Background
A 15-person startup building developer APIs needed to manage their service catalog, pricing tiers, and integration documentation. With a highly technical team and limited budget, they chose PIM as Code over traditional solutions.
Implementation Details
Catalog Structure: 200 API endpoints, 15 pricing plans, 50 integration guides. Each service endpoint was a JSON file with metadata, pricing, rate limits, and documentation links.
Team Workflow: Product managers created feature branches for new services. Engineers updated technical specifications during development. DevRel team managed documentation and examples. All changes went through pull request review.
Automation: GitHub Actions automatically updated their developer portal, generated OpenAPI specs, synchronized with billing systems, and updated marketplace listings.
Results After 18 Months
Positives:
- Zero PIM licensing costs saved $50,000+ annually
- Perfect audit trail for pricing changes and compliance
- Developers could update technical specs alongside code changes
- Automated testing caught pricing inconsistencies before deployment
- Complete catalog backup and portability with git clone
Challenges:
- Required 2-3 days of Git training for non-technical team members
- Custom tooling maintenance took ~5 hours per month
- Complex queries required writing scripts or using command-line tools
- Large asset files (video tutorials) required separate management
Key Learnings
The approach worked because their products were inherently technical, their team was developer-centric, and their catalog was manageable in size. The startup estimates they saved 6-12 months of traditional PIM implementation time.
Explore complementary approaches and strategic considerations for developer-led product management
Conclusions & Recommendations
The Verdict
PIM as Code is not a mainstream solution, but it can be surprisingly effective for the right organizations. It represents a paradigm shift from business-user-centric to developer-centric product management, with all the trade-offs that entails.
When to Seriously Consider
Perfect Candidates: Developer tools companies, technical startups, API-first businesses, and teams already operating with DevOps practices. Organizations where developers are closer to products than traditional merchandisers.
Experiment First: Start with a subset of your catalog or a new product line. Build confidence with the approach before committing to full migration.
Hybrid Strategy: Consider tools that bridge the gap - headless PIMs with Git storage, visual editors for JSON, or traditional PIMs with strong API access for developer workflows.
Investment Required
While the software costs are low, the time investment is significant. Budget for custom tooling development, team training, and ongoing maintenance. Factor in the opportunity cost of building vs. buying.
The Future
As commerce becomes increasingly API-driven and technical teams take larger roles in product management, PIM as Code concepts will likely influence mainstream PIM evolution. The transparency, version control, and automation benefits are too compelling to ignore.
Whether you adopt PIM as Code fully or just borrow its best practices, the core insight remains valuable: treating product data with the same rigor as source code can dramatically improve quality, collaboration, and automation in product management.