Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ opencode.jsonc
skills-lock.json
.DS_Store
worker-configuration.d.ts
wrangler.production.jsonc
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,20 @@ npm run dev
1. Set your domain in `wrangler.jsonc`
2. Create an R2 bucket named `agentic-inbox`: `wrangler r2 bucket create agentic-inbox`

For production-specific values, keep a local `wrangler.production.jsonc` file. This file is ignored by git so real domains, mailbox addresses, Access values, and other deployment-specific settings are not committed. Use `wrangler.jsonc` as the shared example, copy it locally to `wrangler.production.jsonc`, then set production-only values such as `DOMAINS`, `EMAIL_ADDRESSES`, `POLICY_AUD`, and `TEAM_DOMAIN`.

### Deploy

```bash
npm run deploy
```

To deploy with the local production config:

```bash
npm run deploy:production
```

## Prerequisites

- Cloudflare account with a domain
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@
},
"scripts": {
"build": "react-router build",
"build:production": "CLOUDFLARE_CONFIG_PATH=wrangler.production.jsonc react-router build",
"cf-typegen": "wrangler types",
"cf-typegen:production": "wrangler types --config wrangler.production.jsonc",
"deploy": "npm run build && wrangler deploy",
"deploy:production": "npm run build:production && wrangler deploy",
"dev": "react-router dev",
"preview": "npm run build && vite preview",
"typecheck": "npm run cf-typegen && react-router typegen && tsc -b"
Expand Down
5 changes: 4 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import tsconfigPaths from "vite-tsconfig-paths";

export default defineConfig({
plugins: [
cloudflare({ viteEnvironment: { name: "ssr" } }),
cloudflare({
configPath: process.env.CLOUDFLARE_CONFIG_PATH,
viteEnvironment: { name: "ssr" },
}),
tailwindcss(),
reactRouter(),
tsconfigPaths(),
Expand Down