Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
48d47a2
test: characterize Showcase migration contracts
lemanh2006 Oct 28, 2026
a70954b
feat: add isolated Next.js runtime and shared auth infrastructure
lemanh2006 Oct 28, 2026
e92eeb4
feat: migrate auth APIs and React login QR flows
lemanh2006 Oct 28, 2026
f8fc5f6
feat: finish Next.js UI and Docker migration with parity checks
lemanh2006 Oct 28, 2026
a416156
fix: enforce proxy trust and preserve parser failure contracts
lemanh2006 Oct 28, 2026
5be06be
feat: show actionable authentication callback errors
lemanh2006 Oct 28, 2026
01d3a8f
style: refine Showcase flow tabs
lemanh2006 Oct 28, 2026
71c1445
refactor: separate web and mobile auth application services
lemanh2006 Oct 29, 2026
f9f1269
refactor: isolate SMS and TS43 application services
lemanh2006 Oct 29, 2026
d2f0640
refactor: isolate Integrity orchestration and normalize provider fail…
lemanh2006 Oct 29, 2026
797a9a0
docs: explain backend service boundaries and verification
lemanh2006 Oct 29, 2026
a722667
refactor: remove legacy Express showcase
lemanh2006 Nov 1, 2026
7cff562
refactor: move Next.js showcase to repository root
lemanh2006 Nov 1, 2026
e0efcf4
feat: use OpenID client and detect SIM support
lemanh2006 Nov 8, 2026
c121282
feat: add Express authentication routes
lemanh2006 Nov 18, 2026
9e5eb08
feat: replace React pages with vanilla frontend
lemanh2006 Nov 18, 2026
7bcb82e
chore: switch runtime and documentation to Express
lemanh2006 Nov 18, 2026
40c09a6
fix: preserve authentication flow safeguards
lemanh2006 Nov 18, 2026
ac4c51b
refactor: separate browser authentication flows
lemanh2006 Nov 18, 2026
0dd65aa
refactor: use in-memory storage and EJS views
lemanh2006 Nov 21, 2026
44f9ad2
refactor: organize showcase by integration flow
lemanh2006 Nov 21, 2026
735b8b8
security: harden auth flows and refine showcase UI
lemanh2006 Nov 22, 2026
05e1e80
Consolidate showcase config endpoint
lemanh2006 Nov 22, 2026
c1fa17b
Refactor Showcase flow boundaries and generate API reference
lemanh2006 Nov 22, 2026
dee99ea
docs: consolidate Play Integrity integration guidance
lemanh2006 Nov 23, 2026
b78e1db
fix: remove retry link from QR error page
lemanh2006 Nov 23, 2026
2a7b699
Improve SMS verification and shared notifications
lemanh2006 Nov 23, 2026
b0c748d
refactor: clarify showcase module flows
lemanh2006 Nov 23, 2026
a22c3b2
Improve showcase flows and logging
lemanh2006 Nov 24, 2026
221bd51
Merge branch 'develop' of github.com:bvantagelimited/ipification-show…
lemanh2006 Nov 24, 2026
f0a19c4
test: align bootstrap assertions with structured logs
lemanh2006 Nov 24, 2026
35d1a52
test: match initial QR waiting message
lemanh2006 Nov 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 19 additions & 8 deletions .dockerignore
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
.git
.gitignore
node_modules
package-lock.json
docker-compose.yml
Dockerfile
.tool-versions
.dockerignore
README.md
.next
.git
.env
.env.*
!.env.example
config/default.json
config/local.json
config/local-*.json
config/stage.json
config/production.json
tests
e2e
test-results
playwright-report
*.tsbuildinfo
.local-backups
.superpowers

docs/generated/reference
20 changes: 20 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
PORT=3002
APP_ENV=development
# Use 1 behind a single trusted Kubernetes ingress / reverse proxy.
TRUST_PROXY_HOPS=0
# NODE_CONFIG_DIR=/absolute/path/to/private/config

# Provider request deadline in milliseconds (1..120000; invalid values use 15000).
PROVIDER_HTTP_TIMEOUT_MS=15000
# Authentication rate limits, per operation (defaults: 20 per IP and 5 per identity per minute).
# AUTH_RATE_LIMIT_WINDOW_MS=60000
# AUTH_RATE_LIMIT_IP_MAX=20
# AUTH_RATE_LIMIT_IDENTITY_MAX=5

# Play Integrity endpoints require these values when called.
# PLAY_INTEGRITY_PACKAGE_NAME=com.example.app
# PLAY_INTEGRITY_USER_FLOW=pvn_ip
# PLAY_INTEGRITY_STATE_SECRET=<long-random-secret>
# PLAY_INTEGRITY_STATE_ISSUER=showcase
# PLAY_INTEGRITY_STATE_AUDIENCE=showcase-app
# GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
10 changes: 0 additions & 10 deletions .env.sample

This file was deleted.

53 changes: 53 additions & 0 deletions .github/workflows/showcase-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Showcase Express CI

on:
push:
pull_request:

permissions:
contents: read

concurrency:
group: showcase-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
verify:
name: Build and verify main flows
runs-on: ubuntu-latest
timeout-minutes: 20
env:
CI: 'true'
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: '24.22.0'
cache: npm
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci
- name: Install Chromium
run: npx playwright install --with-deps chromium
- name: Lint
run: npm run lint
- name: Typecheck
run: npm run typecheck
- name: Build
run: npm run build
- name: Unit and API tests
run: npm test
- name: Integration tests
run: npm run test:integration
- name: Playwright suite
run: npm run test:e2e
- name: Upload Playwright diagnostics
if: failure()
uses: actions/upload-artifact@v4
with:
name: showcase-playwright-results
path: test-results/
if-no-files-found: ignore
retention-days: 7
19 changes: 14 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
node_modules
node_modules/
.next/
.env*
!.env.example
config/default.json
yarn.lock
public/css/style.css
config/local.json
config/local-*.json
config/stage.json
config/production.json
*.tsbuildinfo
test-results/
playwright-report/
.local-backups/
.DS_Store
.env
.cursor
.superpowers/

/docs/generated/reference/
30 changes: 23 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
FROM node:24-alpine

FROM node:24.22.0-bookworm-slim AS dependencies
WORKDIR /usr/app
COPY package.json ./
RUN npm install --only=prod
COPY package.json package-lock.json ./
RUN npm ci

FROM dependencies AS builder
COPY . .
RUN npm run build

ENV PORT 8080
FROM node:24.22.0-bookworm-slim AS production-dependencies
WORKDIR /usr/app
COPY package.json package-lock.json ./
RUN npm ci --omit=dev && npm cache clean --force

EXPOSE 8080
CMD [ "npm", "run", "start" ]
FROM node:24.22.0-bookworm-slim AS runtime
WORKDIR /usr/app
ENV NODE_ENV=production PORT=3002
COPY --from=production-dependencies /usr/app/node_modules ./node_modules
COPY --from=builder /usr/app/public ./public
COPY --from=builder /usr/app/config ./config
COPY --from=builder /usr/app/runtime ./runtime
COPY --from=builder /usr/app/scripts ./scripts
COPY --from=builder /usr/app/src ./src
COPY --from=builder /usr/app/package.json /usr/app/tsconfig.json ./
RUN mkdir -p /run/showcase-config && chown -R node:node /usr/app /run/showcase-config
USER node
EXPOSE 3002
CMD ["node", "--import", "tsx", "src/server.ts"]
86 changes: 12 additions & 74 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,90 +1,28 @@
# IPification Showcase

A demonstration application showcasing IPification's identity verification and authentication features.
An Express and vanilla JavaScript demonstration of IPification phone verification, login and identity flows.

## Features
## Start locally

- **Phone Number Verification** (IP, IP+, IM, SIM)
- **Quick Access Login** (IP, IP+, IM, SIM)
- **Identity Services** (Anonymous Identity, KYC)
- **QR Code Desktop Flow**
- **Server-to-Server Backchannel**
- **TS43 Protocol Support**

## Local Development

Choose either Node.js or Docker Compose to run the application locally.

### Prerequisites

- IPification account credentials
- For Node.js: Node.js >= 24.0.0 and npm (24.22.0 is pinned in `.tool-versions` and Docker)
- For Docker Compose: Docker with the Compose plugin

### Run with Node.js

Install dependencies and create the local configuration:
Use Node.js 24.22.0, npm and your IPification configuration:

```bash
npm install
npm ci
cp config/default.json.sample config/default.json
```

Edit `config/default.json` with your IPification credentials, then start the server with auto-reload:

```bash
cp .env.example .env.local
# Configure credentials in config/default.json.
npm run config:check
npm run dev
```

Open `http://localhost:3000` (unless `PORT` is overridden in your environment or `.env`). To run without auto-reload, use `npm start`.

### Run with Docker Compose

Create the configuration file mounted by Compose:

```bash
cp config/default.json.sample config/default.json
```

Edit `config/default.json` with your IPification credentials, then build and start the container:

```bash
docker compose up -d --build
```

Open `http://localhost:3001`. Compose sets `PORT=3001` and mounts `config/default.json` as `/usr/app/config/default.json`. This container runs `npm start` without auto-reload; rebuild after application code changes.
For phone QR testing, open one of the Network URLs printed at startup on the desktop and use a phone that can reach that address. Register the actual callback URL with your provider.

View logs or stop the local container:
Run with Docker Compose from the repository root after configuring `config/default.json`:

```bash
docker compose logs -f app
docker compose down
docker compose up --build
```

### Configuration

See the [Quick Start Guide](docs/QUICKSTART.md) for setup and troubleshooting, and the [Sample Config Reference](docs/CONFIG_DEFAULT_JSON_SAMPLE.md) for configuration fields.

The application loads `.env` for local environment overrides. Docker Compose sets the container port explicitly in `docker-compose.yml`.

| Variable | Description | Default |
| ---------- | -------------------------------------------------- | ---------------------------- |
| `PORT` | Server port | `3000` (`3001` with Compose) |
| `NODE_ENV` | Environment (`development`, `stage`, `production`) | `development` |

When testing from a mobile device, replace `localhost` with your computer's reachable IP address and configure the corresponding callback URL in your IPification client settings.

## Documentation

- **[Quick Start](docs/QUICKSTART.md)** - Setup guide and common issues
- **[API Reference](docs/API.md)** - Complete endpoint documentation
- **[Architecture](docs/ARCHITECTURE.md)** - System design and components
- **[PNV via IP](docs/PNV.md)** - Phone input, authorization redirect, callback, code exchange, and verification-result handling
- **[Sample Config Reference](docs/CONFIG_DEFAULT_JSON_SAMPLE.md)** - Application configuration fields
- **[Play Integrity backend demo](docs/PLAY_INTEGRITY.md)** - Backend verification setup, request hashing, and Android checklist
- **[Documentation Index](docs/INDEX.md)** - Documentation overview

## Support
See the [documentation index](docs/INDEX.md), [integration guide](docs/integration/README.md), [local setup and testing](docs/integration/running.md), and [Android Play Integrity guide](docs/PLAY_INTEGRITY.md). The Playwright tests use a local mock provider and do not verify live stage or carrier behavior.

- Developer Portal: https://developer.ipification.com/
- Website: https://www.ipification.com/
This demo stores authentication attempts, results and sessions in process memory. Run one instance; restarting clears the state.
88 changes: 0 additions & 88 deletions app.js

This file was deleted.

Loading