Extensible Architecture

Developer Guidance Hub

Build themes, plugins, and programmatically customise every aspect of your JNexora SaaS storefront using the REST API.

Sections

1. Custom Theme Architecture

Themes control the storefront visual template layer. A custom theme is packed inside a valid ZIP archive containing a required theme.json manifest file at its root level.

Theme Directory Layout
my-custom-theme/
├── theme.json (Required manifest)
├── preview.png (Preview representation image)
├── assets/
│   ├── css/
│   │   └── style.css
│   └── js/
│       └── app.js
└── templates/
    ├── layout.blade.php
    ├── home.blade.php
    └── product.blade.php
Writing theme.json

The manifest registers basic definitions and options available for configuring in the panel:

{
  "id": "glow-studio-v2",
  "name": "Glow Studio v2 Theme",
  "version": "1.0.0",
  "author": "Antigravity Team",
  "description": "Elegant dark aesthetics tailored for premium cosmetics.",
  "options": {
    "theme_color": "#070913",
    "accent_color": "#ec4899"
  }
}

2. Custom Plugin Architecture

Plugins register logic lifecycle triggers to hook into operations like checkout processes, notification events, or third-party CRM APIs.

Plugin Directory Layout
my-custom-plugin/
├── plugin.json (Required manifest)
├── src/
│   ├── Controllers/
│   │   └── CustomAlertController.php
│   └── Services/
│       └── AlertSyncService.php
└── views/
    └── admin_widget.blade.php
Writing plugin.json
{
  "slug": "abandoned-cart-rescue",
  "name": "Abandoned Cart Rescue Autopilot",
  "version": "1.0.2",
  "author": "Core Devs",
  "hooks": {
    "before_checkout": "App\\Plugins\\CartRescue\\RescueService@preCheck",
    "after_order_success": "App\\Plugins\\CartRescue\\RescueService@clearBuffer"
  }
}

3. Multi-Layer Security & Approvals

To protect our multi-tenant cloud environment, third-party uploads are strictly isolated and subjected to automated and manual screening reviews.

Automated ZIP Security Scans

All uploaded ZIP files are programmatically scanned. Any scripts containing forbidden PHP functions or backdoors (e.g., eval(), system(), exec(), shell_exec(), passthru(), base64_decode()) are immediately rejected with an upload validation failure.

Manual Review & Approval

Approved file uploads default to a "Pending Review" state. They are quarantined and disabled from activation inside the merchant storefront until the SaaS platform administration team reviews the code and signs off on the release.

REST API v1

Customise APP API

Programmatically control every aspect of your JNexora storefront — branding, themes, plugins, and custom CSS/JS — from any external application, CI/CD pipeline, or deployment script.

8 Endpoints
Bearer Token Auth
JSON Responses
Base URL
https://jnexora.com/api/v1/app/{store_slug}/customise

Authentication

All endpoints (except GET /token/info) require a Bearer token in the HTTP Authorization header. Generate your token via Merchant Admin → Settings → API Token.

GET /token/info Public — No Auth

Check whether an API token is configured for a store.

# Example — cURL
curl -X GET "https://jnexora.com/api/v1/app/my-store/customise/token/info"
200 Response
{
  "success": true,
  "store_slug": "my-store",
  "has_token": true,
  "note": "Tokens are generated via the Merchant Admin Panel → Settings → API Token."
}
Authorization header format: Authorization: Bearer <your_api_token>

Full Snapshot

Retrieve all customisation state in a single call — branding, theme, plugins, and custom code.

GET /
curl -X GET "https://jnexora.com/api/v1/app/{store_slug}/customise" \
  -H "Authorization: Bearer YOUR_TOKEN"
200 Response
{
  "success": true,
  "store": { "id": 1, "name": "JNexora", "slug": "jnexora" },
  "branding": {
    "site_name": "JNexora",
    "tagline": "Fresh Food, Fast Delivery",
    "logo_url": "https://yoursite.com/storage/branding/logo.png",
    "primary_color": "#f97316",
    "secondary_color": "#4b5563"
  },
  "theme": {
    "active_theme": "default",
    "theme_config": { "primary_color": "#f97316" }
  },
  "custom_code": { "custom_css": "", "custom_js": "" },
  "plugins": {
    "email_marketing": { "enabled": true },
    "seo_enhancements": { "enabled": false }
  }
}

Branding

Read or update the store's name, tagline, and color palette.

GET /branding

Fetch current branding configuration.

curl -X GET "https://jnexora.com/api/v1/app/{store_slug}/customise/branding" \
  -H "Authorization: Bearer YOUR_TOKEN"
200 Response
{
  "success": true,
  "branding": {
    "store_name": "JNexora",
    "tagline": "Fresh Food, Fast Delivery",
    "logo_url": "https://yoursite.com/storage/branding/logo.png",
    "favicon_url": null,
    "primary_color": "#f97316",
    "secondary_color": "#4b5563"
  }
}
PATCH /branding

Update one or more branding fields. All fields are optional.

FieldTypeDescription
site_namestringDisplay name of the store
site_taglinestringShort marketing tagline
primary_colorstring (hex)Primary brand color e.g. #f97316
secondary_colorstring (hex)Secondary / accent color
curl -X PATCH "https://jnexora.com/api/v1/app/{store_slug}/customise/branding" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "site_name": "JNexora Pro",
    "primary_color": "#e11d48"
  }'
200 Response
{
  "success": true,
  "message": "Branding updated successfully.",
  "updated": ["site_name", "primary_color"]
}

Custom CSS & JS

Inject custom CSS and JavaScript into all storefront pages at runtime.

GET /custom-code
curl -X GET "https://jnexora.com/api/v1/app/{store_slug}/customise/custom-code" \
  -H "Authorization: Bearer YOUR_TOKEN"
200 Response
{
  "success": true,
  "custom_css": "body { font-family: 'Outfit', sans-serif; }",
  "custom_js": "console.log('Store loaded!');"
}
PUT /custom-code

Replace custom CSS and/or JS. Pass null to clear a field.

FieldTypeDescription
custom_cssstring | nullRaw CSS injected into <head>
custom_jsstring | nullRaw JS injected before </body>
curl -X PUT "https://jnexora.com/api/v1/app/{store_slug}/customise/custom-code" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "custom_css": ":root { --primary: #e11d48; }",
    "custom_js": "document.addEventListener(\"DOMContentLoaded\", () => console.log(\"ready\"));"
  }'
200 Response
{ "success": true, "message": "Custom code updated successfully." }

Theme Configuration

Read or update the active theme's configuration options (colors, fonts, etc.).

GET /theme
curl -X GET "https://jnexora.com/api/v1/app/{store_slug}/customise/theme" \
  -H "Authorization: Bearer YOUR_TOKEN"
200 Response
{
  "success": true,
  "active_theme": "glow-studio-v2",
  "theme_config": {
    "theme_color": "#070913",
    "accent_color": "#ec4899"
  }
}
PATCH /theme

Merge new config key-values into the active theme's config. Existing keys not included in the request are preserved.

FieldTypeDescription
configobjectKey-value map of theme option keys to new values
curl -X PATCH "https://jnexora.com/api/v1/app/{store_slug}/customise/theme" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "config": {
      "accent_color": "#f59e0b",
      "font_family": "Outfit"
    }
  }'
200 Response
{
  "success": true,
  "message": "Theme 'glow-studio-v2' configuration updated.",
  "active_theme": "glow-studio-v2",
  "theme_config": {
    "theme_color": "#070913",
    "accent_color": "#f59e0b",
    "font_family": "Outfit"
  }
}

Plugins

Toggle plugins on/off and configure their settings programmatically.

Available Plugin IDs
email_marketing
seo_enhancements
advanced_subscriptions
loyalty_rewards
agentic_commerce
live_chat
GET /plugins
curl -X GET "https://jnexora.com/api/v1/app/{store_slug}/customise/plugins" \
  -H "Authorization: Bearer YOUR_TOKEN"
200 Response
{
  "success": true,
  "plugins": [
    { "id": "email_marketing", "enabled": true,  "config": { "sender_email": "hello@store.com" } },
    { "id": "seo_enhancements", "enabled": false, "config": {} },
    { "id": "agentic_commerce", "enabled": true,  "config": { "ai_platforms": "ChatGPT, Gemini" } }
  ]
}
PATCH /plugins/{plugin_id}

Enable/disable a plugin and/or update its config. Replace {plugin_id} with one of the IDs above.

FieldTypeDescription
enabledbooleanSet to true to activate, false to deactivate
configobjectPlugin-specific config key-value pairs
curl -X PATCH "https://jnexora.com/api/v1/app/{store_slug}/customise/plugins/email_marketing" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "config": {
      "sender_email": "campaigns@mystore.com",
      "enable_welcome_email": "1"
    }
  }'
200 Response
{
  "success": true,
  "message": "Plugin 'email_marketing' updated successfully.",
  "plugin_id": "email_marketing"
}

Error Codes

HTTP StatusMeaningCommon Cause
200 OK Request succeeded.
401 Unauthorized Missing or invalid Bearer token.
404 Not Found Store slug does not exist.
422 Validation Error Invalid field values in request body.
500 Server Error Internal exception — contact support.
Example 401 Error
{
  "success": false,
  "message": "Unauthorized. Invalid or missing API token."
}

Live API Sandbox

Test the Customise APP API directly from this page. Enter your store slug and Bearer token, pick an endpoint, and fire the request.

SDK Code Samples

# Get full customisation snapshot
curl -X GET "https://jnexora.com/api/v1/app/my-store/customise" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Accept: application/json"

# Update branding
curl -X PATCH "https://jnexora.com/api/v1/app/my-store/customise/branding" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "site_name": "My Awesome Store", "primary_color": "#e11d48" }'