> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pcnaid.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get oriented with EntityShield: what it is, the four portals, sign-in model, public integration points, and where to find the API reference.

# Quickstart

## What is EntityShield?

EntityShield is a multi-tenant SaaS platform for business entity governance, permit tracking, and compliance management. It helps consultants, multi-entity operators, compliance managers, and permitting teams keep every entity, license, and filing organized.

It is **not a Shopify app**. It is a Cloudflare-edge-first stack with four React portals backed by a Hono API on Cloudflare Workers.

## Four portals, one API

| Portal | Domain | Purpose |
| - | - | - |
| Admin App | `entityshield.app` | Account-level entity and compliance administration |
| Workspace Portal | `*.portal.entityshield.app` | Customer-branded multi-workspace experience |
| Staff Portal | `staff.entityshield.app` | Pcnaid staff cross-tenant operations |
| Governance Portal | `gov.entityshield.app` | Entity-scoped governance filings, meetings, and members |

All four portals authenticate through Auth0 (custom domain `auth.pcnaid.com`) and call the same API at `https://api.entityshield.app`.

## Sign-in model

EntityShield uses **Auth0 Universal Login** with PKCE. Each portal registers its own Auth0 SPA application with a distinct audience:

| Audience | Portal |
| - | - |
| `https://api.entityshield.app` | Admin, Workspace |
| `https://staff.entityshield.app` | Staff |
| `https://gov.entityshield.app` | Governance |

An Auth0 Action decorates JWTs with EntityShield-specific claims (`userId`, `customerId`, `role`, `workspace_memberships`). The API validates the JWT against the matching audience using Auth0 JWKS.

### Public integration points

* **Webhooks** — Subscribe to EntityShield events via `/v1/webhook-endpoints`. Outbound payloads are HMAC-SHA256 signed.
* **Public health endpoint** — `GET /health` returns service name, version, environment, and timestamp without authentication.
* **Landing page API** — `GET /v1/public/landing` returns public-facing data.
* **Public workspace branding** — `GET /v1/public/workspaces/:slug/branding` returns a workspace's public branding config.
* **Calendar feed** — `GET /ics/:feedId` serves iCal feed data for external calendar integration.

## Tech stack

| Layer | Technology |
| - | - |
| API Framework | Hono on Cloudflare Workers |
| Frontend | React 18.3, React Router v7, TanStack Query/Table |
| UI | shadcn/ui (Radix UI + CVA) + responsive primitives |
| Styling | Tailwind CSS + semantic CSS custom properties |
| Database | Azure Postgres (pooled connections) with Row-Level Security |
| Auth | Auth0 (JWT + JWKS, 4 audiences) |
| Billing | Stripe (subscriptions + webhooks) |
| Object Storage | Cloudflare R2 (5 buckets) |
| Build System | Turborepo + pnpm workspaces |

## Get started with development

The API reference is at [`/nodes/web-apps/entityshield/developer/api/index`](https://docs.pcnaid.com/nodes/web-apps/entityshield/developer/api/index). See the architecture overview at [`/nodes/web-apps/entityshield/developer/architecture-overview`](https://docs.pcnaid.com/nodes/web-apps/entityshield/developer/architecture-overview) for the component diagram and data model.

```bash theme={null}
git clone https://github.com/PcnaidInc/EntityShield.git
cd EntityShield
pnpm install
# Build shared package first
cd packages/shared && pnpm run build && cd ../..
# Terminal 1 — API
cd apps/api && pnpm run dev
# Terminal 2 — Portal
cd apps/portal && pnpm run dev
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.