Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Embeddable Web Component widgets for [Ministry Platform](https://www.ministrypla
- [Architecture](#architecture)
- [Prerequisites](#prerequisites)
- [Getting Started](#getting-started)
- [Quick Setup with Claude Code](#quick-setup-with-claude-code)
- [Quick Setup (Automated)](#quick-setup-automated)
- [Manual Setup](#manual-setup)
- [OAuth Setup](#oauth-setup)
- [Project Structure](#project-structure)
Expand Down Expand Up @@ -132,13 +132,19 @@ pnpm setup -- --verbose # Extra output
pnpm setup -- --help # Show all options
```

**Headless / CI:** `--yes` (or `--non-interactive`) runs the full flow without prompts β€” it keeps existing `.env.local` values, auto-generates any missing secrets, and applies defaults. It's also auto-enabled when stdin isn't a TTY, so it won't hang in a pipeline. Provide MP credentials via `.env.local` (or your CI secret store) beforehand:

```bash
node scripts/setup-bootstrap.mjs --yes
```

Once setup completes, run `pnpm dev` and visit http://localhost:3000 (host app) and http://localhost:5173 (widget demo gallery).

---

### Manual Setup

If you prefer manual setup or don't have Claude Code:
If you prefer to run each step yourself instead of the automated setup:

#### 1. Clone the Repository

Expand Down Expand Up @@ -256,7 +262,13 @@ Copy the generated values to your `.env.local` as `BETTER_AUTH_SECRET` and `EMBE

### 4. Generate Ministry Platform Types

> **Note**: A full set of generated models is **committed to the repo**, so the project builds and runs without a live MP connection. Regenerating is only needed to match your own tenant's schema or after a schema change β€” it is not a prerequisite for a first build.
> **Note**: A full set of generated models is **committed to the repo**, so the project builds and runs without a live MP connection. They come from a **reference tenant**, so a first build always succeeds β€” but on a fork pointed at a different MP instance they may not match your schema (custom fields, table differences). The build will compile against the committed types either way, so **regenerate against your own instance before relying on the types**:
>
> ```bash
> pnpm mp:generate:models
> ```
>
> The automated setup attempts this for you; if it fails (unreachable/throttled tenant) it warns and keeps the committed models rather than aborting.

To regenerate TypeScript types from your Ministry Platform database schema:

Expand Down Expand Up @@ -404,6 +416,7 @@ MPNext-Widgets/
β”‚
β”œβ”€β”€ public/embed-sdk/ # Deployed widget bundles (hashed) + brand CSS
β”œβ”€β”€ scripts/
β”‚ β”œβ”€β”€ setup-bootstrap.mjs # Zero-dep entry for `pnpm setup` (ensures pnpm + deps, then runs setup.ts)
β”‚ β”œβ”€β”€ setup.ts # Interactive setup CLI
β”‚ β”œβ”€β”€ hash-sdk.js # Hash + rewrite SDK bundle filenames
β”‚ └── copy-sdk.js # Copy build output into public/
Expand Down
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/types/routes.d.ts";
import "./.next/dev/types/routes.d.ts";

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Loading
Loading