This project is a lightweight ERP/WMS prototype built with Django.
We previously had a Shopify DB backend focused mainly on data storage. Now we’re rebuilding it with Django, connecting backend (data + logic) and frontend (user workflows) in a single system so different user roles (Admin and Manager) can use it easily. The goal is a lightweight, open-source WMS that integrates with Shopify first and can extend to other platforms (e.g., TikTok Shop).
- accounts — Custom user model; Tenant & User management
- erp/settings — Environment-based configuration (base/dev/test/prod)
- check_env.py — Environment variable validation script
- tests/ — Pytest tests (global or per-app)
- requirements.txt — Python dependencies
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtBy default, the project connects to a dummy test database:
DB_NAME=shopify_erp_test
DB_USER=postgres
DB_PASSWORD=postgres
DB_HOST=127.0.0.1
DB_PORT=5432This is the configuration you should commit in .env.sample (safe for GitHub). If you clone the repo without additional setup, the system will fall back to this shopify_erp_test database.
Create the development database:
createdb -U postgres -h localhost shopify_erp_devExample .env.development:
DJANGO_ENV=development
DJANGO_SECRET_KEY=change-me
DEBUG=True
DB_NAME=shopify_erp_dev
DB_USER=postgres
DB_PASSWORD=postgres
DB_HOST=127.0.0.1
DB_PORT=5432
ALLOWED_HOSTS=127.0.0.1,localhost
CSRF_TRUSTED_ORIGINS=http://127.0.0.1:8000Use
.env.testfor CI/tests and.env.productionfor deployment. Commit only.env.sample, never real.env.*.
python manage.py makemigrations
python manage.py migratepython manage.py runserver-
Branch strategy
develop— active developmentmain— production-ready code
-
Commit messages
feat: ...(feature)fix: ...(bug fix)chore: ...(config/infra/cleanup)
-
Environment isolation
- All secrets/configs must come from
.env.*files (validated bycheck_env.py).
- All secrets/configs must come from
- Django project initialization
- Multi-environment configuration (dotenv + dev/test/prod)
- Minimal pytest setup
-
.gitignoreand.env.sample -
check_env.pyscript - Created
accountsapp - Defined
Tenantand customUsermodel (roles: admin/manager)
- Apply migrations on the target DB and verify
accounts_*tables - Create initial Tenant + User via Django admin
- Verify Tenant/User via Django shell
- Admin invites Manager (token + expiration, status=invited → active)
- Role-based access decorator
@require_admin - Shopify connector (OAuth + Webhooks with HMAC validation)
- Ingest module (EventLog + idempotency + normalization)
- Datahub module (Products, Orders, Inventory; CSV exports for Manager)
- Notify module (instant alerts + daily digest via email)
- Deployment (CI/CD; container/Docker optional later)
flowchart LR
subgraph Shopify
A[Shopify Store]
end
subgraph Connector
B[Shopify Connector - OAuth and Webhooks]
end
subgraph Ingest
C[EventLog - Idempotency - Normalizer]
end
subgraph Datahub
D[Products / Orders / Inventory]
end
subgraph Notify
E[Email Alerts / Digests]
end
subgraph Users
U1[Admin]
U2[Manager]
end
A -- Webhooks --> B
B --> C
C --> D
C --> E
D -- CSV Exports --> U2
U1 -- Invite/Manage --> D
This repository is the Django-based rewrite of our original Shopify DB backend. We’re evolving from cross-platform data-only storage to a full-stack lightweight ERP/WMS that bridges backend data with a user-facing workflow layer. By open-sourcing it, we aim to help small e-commerce teams manage inventory, sync Shopify data, and scale to multiple platforms with minimal overhead.