You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2459a48
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+25-10Lines changed: 25 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,8 +20,10 @@ You can either:
20
20
21
21
- Run the tests against our pre-deployed application at [https://endform-playwright-tutorial.vercel.app](https://endform-playwright-tutorial.vercel.app)
22
22
- Run the application locally, for this option you will need to:
23
-
- Set up `.env` and run migrations on a local SQLite database: `pnpm db:setup`
24
-
- Run the application: `pnpm dev`, or for better performance `pnpm build && pnpm start`
23
+
- Install dependencies: `pnpm install`
24
+
- Run the application right away: `pnpm dev`
25
+
- Optionally switch to local SQLite instead of the shared demo Durable Object: `pnpm db:setup`
26
+
- Optionally seed your local database: `pnpm db:seed`
25
27
- Check that it loads correctly at [http://localhost:3000](http://localhost:3000)
26
28
27
29
## Coming from "Deploy with Vercel"?
@@ -52,27 +54,41 @@ This is a starter template for building a SaaS application using **Next.js** wit
52
54
## Tech Stack
53
55
54
56
-**Framework**: [Next.js](https://nextjs.org/)
55
-
-**Database**: [SQLite](https://www.sqlite.org/)with [libSQL client](https://github.com/tursodatabase/libsql-js) (supports both local files and [Turso](https://turso.tech/))
57
+
-**Database**: [SQLite](https://www.sqlite.org/)via a shared Cloudflare Durable Object proxy by default, with optional local file SQLite and [Turso](https://turso.tech/) support
56
58
-**ORM**: [Drizzle](https://orm.drizzle.team/)
57
59
-**Payments**: Dummy payment system (for demonstration only)
Use the included setup script to create your `.env` file and run the database migrations:
72
+
By default, the app works without any database or auth environment variables. If you do nothing, it connects to the shared demo SQLite database through an HTTP proxy backed by a Cloudflare Durable Object. That shared demo database is public and wiped on a schedule, so it is meant for quick starts and testing only.
73
+
74
+
Start the app immediately:
75
+
76
+
```bash
77
+
pnpm dev
78
+
```
79
+
80
+
If you want your own local SQLite file instead, use the included setup script to create `.env` and run the database migrations:
71
81
72
82
```bash
73
83
pnpm db:setup
74
84
```
75
85
86
+
You can optionally seed that local database too:
87
+
88
+
```bash
89
+
pnpm db:seed
90
+
```
91
+
76
92
Then, run the Next.js development server:
77
93
78
94
```bash
@@ -113,7 +129,6 @@ When you're ready to deploy your SaaS application to production, follow these st
113
129
In your Vercel project settings (or during deployment), add the necessary environment variables:
114
130
115
131
1.`BASE_URL`: Set this to your production domain.
116
-
2.`DATABASE_URL`: Set this to your SQLite database path for local files, or your Turso connection string (libsql://your-database.turso.io)
117
-
3.`DATABASE_AUTH_TOKEN`: Required if using Turso - your database auth token
118
-
3.`AUTH_SECRET`: Set this to a random string. `openssl rand -base64 32` will generate one.
119
-
132
+
2.`DATABASE_URL`: Leave unset to use the shared Durable Object proxy, set it to a local SQLite path, set it to your own proxy URL, or use a Turso connection string (`libsql://your-database.turso.io`)
133
+
3.`DATABASE_AUTH_TOKEN`: Required if using Turso
134
+
4.`AUTH_SECRET`: Optional in demo mode, but set this to a random string for any non-demo deployment. `openssl rand -base64 32` will generate one.
0 commit comments