AI agent specialized for working with the Xeros Django e-commerce platform. Understands the modular architecture, cart system, payments, and development workflows.
Expert AI assistant for the Xeros Django e-commerce platform - a modular monolithic application with multiple decoupled apps.
This skill provides deep knowledge of the Xeros Django architecture, enabling you to work efficiently with:
| App | Purpose |
|-----|---------|
| `core` | Base functionality, brand context processors |
| `catalog` | Product catalog management |
| `cart` | Session-based shopping cart |
| `orders` | Order processing and management |
| `userauths` | Custom user authentication |
| `payments` | Payment provider integrations |
| `integrations` | Third-party service integrations |
| `marketing` | Marketing features |
| `loyalty` | Customer loyalty programs |
| `reviews` | Product reviews |
| `returns` | Return management |
| `crm` | Customer relationship management |
| `api` | REST API (conditional, requires `ENABLE_REST_API=True`) |
```bash
python -m venv venv
source venv/bin/activate
venv\Scripts\activate
pip install -r requirements.txt
python manage.py migrate
python manage.py createsuperuser
python manage.py collectstatic
python manage.py runserver
```
```bash
celery -A xeros_project worker -l info
```
```bash
python audit_xeros.py
```
```bash
python manage.py test
pytest
```
**Providers**:
**Configuration**:
```python
PAYPAL_CLIENT_ID
PAYPAL_SECRET
STRIPE_SECRET_KEY
STRIPE_PUBLISHABLE_KEY
```
**Public keys exposed via**: `payments.context_processors.payment_public_keys`
**Activation**:
1. Set `ENABLE_REST_API=True` in settings
2. Install: `pip install djangorestframework`
3. Add views in `api/` app
4. Register URLs in `xeros_project/urls.py`
When `DEBUG=False`, the following are activated:
**Sensitive settings**: Store in `local_settings.py` or `.env`
**File**: `cart/cart.py`
**Example**: Add max quantity per product
```python
def add(self, product=None, product_id=None, qty=None, quantity=None, max_qty=None):
# Preserve session format
# Apply MIN_QTY, order_in_packs, and new max_qty constraint
# Update request.session[CART_SESSION_ID]
```
**Test**: Add unit test in `cart/tests.py`
**Example**: Checkout success page
1. **URL**: Add to `orders/urls.py`
```python
path('checkout/success/', views.checkout_success, name='checkout_success'),
```
2. **View**: Create in `orders/views.py`
```python
def checkout_success(request):
return render(request, 'orders/checkout_success.html')
```
3. **Template**: Create `orders/templates/orders/checkout_success.html`
1. Create module: `payments/newprovider.py`
2. Add public keys to `payments/context_processors.py`
3. Store secrets in `local_settings.py`:
```python
NEWPROVIDER_CLIENT_ID = env('NEWPROVIDER_CLIENT_ID')
NEWPROVIDER_SECRET = env('NEWPROVIDER_SECRET')
```
1. **Settings**: Add to `xeros_project/settings.py`
```python
ENABLE_REST_API = True
INSTALLED_APPS += ['rest_framework']
```
2. **Install**: `pip install djangorestframework`
3. **Create views**: `api/views.py`
4. **Register URLs**: `xeros_project/urls.py`
"Modify `cart.Cart.add` to enforce a max_qty constraint per product. Update the session storage format and add a unit test in `cart/tests.py`."
"Add a route named `checkout_success` in `orders/urls.py` and create the corresponding template `orders/checkout_success.html` with order confirmation details."
"Integrate a new payment provider 'Mollie'. Create `payments/mollie.py`, expose public keys via context processor, and add webhook handling."
"Enable the REST API, create an endpoint at `/api/products/featured/` that returns top 10 products by sales, and add pagination."
"Write integration tests for the cart system covering add, update, remove, and clear operations. Include edge cases for pack ordering."
| File/Directory | Purpose |
|----------------|---------|
| `xeros_project/settings.py` | Main configuration |
| `xeros_project/celery.py` | Async task configuration |
| `cart/cart.py` | Shopping cart class |
| `payments/paypal.py` | PayPal integration |
| `payments/stripe_api.py` | Stripe integration |
| `audit_xeros.py` | Static analysis tool |
| `requirements.txt` | Python dependencies |
| `local_settings.py` | Local/secret configuration (gitignored) |
| `*/tests.py` or `*/tests/` | Test modules |
This skill enables efficient navigation and modification of the Xeros Django e-commerce platform while maintaining architectural integrity and following established patterns.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/xeros-django-e-commerce-agent/raw