Skip to content

Commit 286fa4e

Browse files
fix: Minor improvements
1 parent 71e71a6 commit 286fa4e

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

.cursorrules

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ You are an expert in TypeScript, Node.js, Next.js App Router, React, Shadcn UI,
33
You can refer to the markdown files in `./cursor-docs` to get more context about the project.
44
Do not forget to update the project plan in `./cursor-docs/project-plan.md` as you work on the project.
55

6-
You are also excellent at Cloudflare Workers and other tools like D1 serverless database and KV. You can suggest usage of new tools (changes in wrangler.toml file) to add more primitives like:
6+
You are also excellent at Cloudflare Workers and other tools like D1 serverless database and KV. You can suggest usage of new tools (changes in wrangler.json file) to add more primitives like:
77
- R2: File storage
88
- KV: Key-value storage
9-
- Always use the existing KV namespace in `wrangler.toml` don't ever create new ones.
9+
- Always use the existing KV namespace in `wrangler.json` don't ever create new ones.
1010
- AI: AI multimodal inference
11-
- others primitives in `wrangler.toml`
12-
- After adding a new primitive to `wrangler.toml`, always run `pnpm run cf-typegen` to generate the new types.
11+
- others primitives in `wrangler.json`
12+
- After adding a new primitive to `wrangler.json`, always run `pnpm run cf-typegen` to generate the new types.
1313

1414
Authentication:
1515
- The authentication logic is in `src/utils/auth.ts` and `src/utils/kv-session.ts` and is based on Lucia Auth.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ Have a look at the [project plan](./cursor-docs/project-plan.md) to get an overv
9898
5. `pnpm dev`
9999
6. Open http://localhost:3000
100100

101-
## Changes to wrangler.toml
101+
## Changes to wrangler.json
102102

103-
After making a change to wrangler.toml, you need to run `pnpm cf-typegen` to generate the new types.
103+
After making a change to wrangler.json, you need to run `pnpm cf-typegen` to generate the new types.
104104

105105
## Things to change and customize before deploying to production
106106
1. Go to `src/constants.ts` and update it with your project details
@@ -115,7 +115,7 @@ After making a change to wrangler.toml, you need to run `pnpm cf-typegen` to gen
115115
2. Set either `RESEND_API_KEY` or `SENDGRID_API_KEY` as a secret in your Cloudflare Worker depending on which email service you want to use.
116116
3. Create a Turnstile catcha in your Cloudflare account, and set the `NEXT_PUBLIC_TURNSTILE_SITE_KEY` as a Github Actions variable.
117117
4. Set `TURNSTILE_SECRET_KEY` as a secret in your Cloudflare Worker.
118-
5. Update the `wrangler.toml` file with the new database and KV namespaces and env variables. If you change the D1 database name, you also need to update the `db:migrate:dev` script in the `package.json` file.
118+
5. Update the `wrangler.json` file with the new database and KV namespaces and env variables. If you change the D1 database name, you also need to update the `db:migrate:dev` script in the `package.json` file.
119119
6. Go to https://dash.cloudflare.com/profile/api-tokens and click on "Use template" next to "Edit Cloudflare Workers". On the next, page add the following permissions in addition to the ones from the template:
120120
- Account:AI Gateway:Edit
121121
- Account:Workers AI:Edit
@@ -128,7 +128,7 @@ After making a change to wrangler.toml, you need to run `pnpm cf-typegen` to gen
128128
7. Add the API token to the Github repository secrets as `CLOUDFLARE_API_TOKEN`
129129
8. Add the Cloudflare account id to the Github repository variables as `CLOUDFLARE_ACCOUNT_ID`
130130
9. Optional: If you want clear the CDN cache on deploy, add `CLOUDFLARE_ZONE_ID` to the Github repository variables for the zone id of your domain. This is the zone id of your domain, not the account id.
131-
10. Add the database name to the Github repository variables as `DATABASE_ID`. This should match the database name in the `wrangler.toml` file.
131+
10. Add the database name to the Github repository variables as `DATABASE_ID`. This should match the database name in the `wrangler.json` file.
132132
11. Push to the main branch
133133

134134
## Email templates

custom-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// eslint-disable-next-line
22
interface CloudflareEnv {
3+
// TODO Remove them from here because we are not longer loading them from the Cloudflare Context
34
RESEND_API_KEY?: string;
45
NEXT_PUBLIC_TURNSTILE_SITE_KEY?: string;
56
TURNSTILE_SECRET_KEY?: string;

src/app/(auth)/sso/google/callback/google-callback.action.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ export const googleSSOCallbackAction = createServerAction()
146146
})
147147
.returning();
148148

149+
// TODO: If the user is not verified, send a verification email
150+
149151
await createAndStoreSession(user.id, "google-oauth");
150152
return { success: true };
151153

src/app/(dashboard)/dashboard/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616

1717
export default function Page() {
1818
return (
19+
// TODO The sidebar needs to be moved to the layout
1920
<SidebarProvider>
2021
<AppSidebar />
2122
<SidebarInset>

0 commit comments

Comments
 (0)