- Install LTS Node
- Install wrangler
- Setup eddiner
- Create Auth0 Account
- Create Auth0 Application with Single Page Application
- Setup Auth0 Database
- We recommend 'Disable Sign Ups' for now
- Add user on created DB
- Connect the DB to the application
- We use below constants for environment variables
- Application -> Client ID as
AUTH0_CLIENT_ID(should be secret) - Application -> Client Secret as
AUTH0_CLIENT_SECRET(should be secret) - Application -> Domain as
AUTH0_DOMAIN
- Application -> Client ID as
- Setup Auth0 Database
- Set environment variables and settings into wrangler.toml
- Rename wrangler.toml.sample to wrangler.toml
- Set
AUTH0_CLIENT_ID,AUTH0_CLIENT_SECRET,AUTH0_DOMAINas[vars]- using values from Auth0
- Set
AUTH_SECRETas[vars]- generate from your command line using
openssl rand -base64 32and use it - should be secret
- generate from your command line using
- Set your eddiner D1 database and R2 bucket
- D1
- you need to set response tables and info, thread DB
DB_RESPONSES,DB_RESPONSES_2,DB_RESPONSES_3DB_THREADSDB(for info DB containing such as caps, boards)
- you need to create
ADMIN_DBfor account and session management
- you need to set response tables and info, thread DB
- run up migration using this
upSQLStatementsvia Cloudflare dashboard of D1 - R2
- you need to connect archived dat buckets via
ARCHIVE_BUCKET
- you need to connect archived dat buckets via
- Finally, you can get database_name and database_id for D1 databases and bucket_name for R2 bucket
- Add D1 bindings
[[d1_databases]] binding = "DB_RESPONSES_3" database_name = "<your database name>" database_id = "<your database id>" - Append migration dir only for
ADMIN_DBmigrations_dir = "admin-migrations" - Add R2 binding
[[r2_buckets]] binding = 'ARCHIVE_BUCKET' bucket_name = '<your bucket name>'
- Add D1 bindings
- Run migration for
ADMIN_DBpnpm dlx wrangler d1 migrations apply <your ADMIN_DB name>
- D1
- Run
pnpm i - Run
pnpm pages:deploy
Same as eddiner