Skip to content

How To Use

Shadow Theme gives you a ready-made developer portal UI.

After installation, developers can browse API products, register, login, manage their profile, create apps, and manage credentials from the browser.

Main Routes

Assuming:

dotenv
SHADOW_THEME_ROUTE_PREFIX=portal

The main routes are:

RoutePurpose
GET /portalLanding page.
GET /portal/productsProduct catalog.
GET /portal/products/{slug}Product details.
GET /portal/products/{slug}/specProduct specification view.
GET /portal/loginDeveloper login.
GET /portal/registerDeveloper registration.
GET /portal/dashboardDeveloper dashboard.
GET /portal/profileProfile settings.
GET /portal/appsDeveloper apps.
GET /portal/apps/createCreate an app.
GET /portal/apps/{appName}App details and credentials.
GET /portal/settings/mfaMFA settings, when enabled.

What Happens Behind The UI

Shadow Theme uses package services that call the core portal contracts.

Theme areaUses
Product catalogProductCatalogService and portal product services.
Developer authShadowAuthFlow and portal user services.
Developer sessionShadowAuthManager and session storage.
Apps and credentialsDeveloperAccessService, portal app services, LaraApigee-backed operations.
MFAShadowMfaService when portal-mfa is installed.

This means the frontend gets a complete portal experience while still going through the same domain layer as the rest of NinjaPortal.

Reusable Components

Shadow Theme registers anonymous Blade components under:

blade
<x-shadow::... />

Available components include:

ComponentPurpose
<x-shadow::ui.flash />Flash/session messages.
<x-shadow::ui.card />Generic card container.
<x-shadow::ui.page-header />Page title and description block.
<x-shadow::ui.input />Styled input field.
<x-shadow::ui.textarea />Styled textarea.
<x-shadow::ui.select />Styled select field.
<x-shadow::ui.empty-state />Empty-state UI.
<x-shadow::product.card />Product card.
<x-shadow::app.status-badge />App status badge.

Example:

blade
<x-shadow::ui.card>
    <x-shadow::ui.page-header
        title="My Custom Portal Page"
        description="This page uses Shadow Theme components."
    />
</x-shadow::ui.card>

Session-Based Web Flow

Shadow Theme does not call portal-api login endpoints.

It uses Laravel web middleware and a session key configured by:

dotenv
SHADOW_THEME_SESSION_KEY=shadow_theme.user_id

This is intentional. The package is a web frontend, while portal-api is the REST API package.

App And Credential Management

Developer app and credential operations are Apigee-backed through the portal service layer.

Developers can:

  • Create apps.
  • Update apps.
  • Delete apps.
  • Approve or revoke apps when your platform allows it.
  • Create credentials.
  • Approve, revoke, or delete credentials.
  • Add or remove API products from credentials.
  • Approve or revoke product access.

These actions eventually go through LaraApigee via the core portal services.