Workflow-App/Workflow/app/cipc/page.tsx
sjcoetzeesj-coder 11d0178ab1 feat: commit Workflow app source; move CIPC credentials to env
Adds the full Next.js app (app/, components/, lib/, scripts/, assets/,
docs/, Dockerfile, compose, configs) to version control.

Security:
- CIPC BizPortal customer-code logins (Login 1 + Login 3) now read
  CIPC_LOGIN1_CODE / CIPC_LOGIN1_PASSWORD / CIPC_LOGIN3_CODE /
  CIPC_LOGIN3_PASSWORD from .env.local instead of source.
- BizPortal personal login in apply-bizportal route reads
  BIZPORTAL_ID_NO / BIZPORTAL_PASSWORD.
- Added .env.example as the committed template.

.gitignore excludes .env*, node_modules, .next, logs, sqlite, Playwright
storage_state.json (live CIPC cookies), scratch dirs, client PDFs and
debug screenshots.
2026-10-18 15:21:45 +02:00

42 lines
1.4 KiB
TypeScript

// app/cipc/page.tsx
// CIPC tab — two side-by-side search actions:
// 1. Search by Enterprise No. (K-number) → fetches full company detail from BizPortal
// 2. Search by Director ID No. (13-digit SA ID) → lists companies where the ID is a director
//
// Both actions call `/api/cipc/search` which spawns the matching .py as a
// subprocess and streams the markdown output back to the client.
//
// Existing /bizportal and /bizportal-2 tabs are left untouched.
import { Suspense } from "react";
import PageHeader from "@/components/PageHeader";
import CipcExplorer from "./CipcExplorer";
export const dynamic = "force-dynamic";
export default async function CipcPage() {
return (
<>
<PageHeader
eyebrow="CIPC"
title="Companies & Intellectual Property Commission"
subtitle={
<>
<span>
This tab runs two CIPC searches — one to look up a company by its registration number,
one to find every company where a person is a director.
</span>
<span>
Both use the same shared CIPC account pool with auto-rotation when the daily limit is reached.
</span>
</>
}
/>
<section className="container-x py-10">
<Suspense fallback={<div className="text-muted">Loading…</div>}>
<CipcExplorer />
</Suspense>
</section>
</>
);
}