A simple sailing logbook application, which allows you to track your sailing trips and share them with others.
This is a Remix project, which is a framework for building server-rendered React applications. It runs on Cloudflare Workers with their D1 database.
It uses Mantine for UI components, and Drizzle for database management.
The project is not currently licensed for reuse.
First, initalise the local database by running npm run d1:local:init
which will create a new SQLite database in the db
directory.
Wrangler allows for local development to emulate the Cloudflare runtime. This is already wired up in package.json as the dev
script:
# start the remix dev server and wrangler
npm run dev
Open up http://127.0.0.1:8788 and you should be ready to go!
To generate migrations after adjusting the schema, run npx drizzle-kit generate:sqlite
You will need to rerun typegen whenever you make changes to wrangler.toml
. Generate types for your Cloudflare bindings in wrangler.toml
:
npm run typegen
- Create a new project on Cloudflare Pages
- Disable automatic deployments for both main branch and preview branches
- Set the build command to
npm run build
- Set the Build output directory to
public
- Disable fallback mode (open)
- Mount both D1 databases in the project as "DB"
- Set the
CLOUDFLARE_ACCOUNT_ID
andCLOUDFLARE_API_TOKEN
Github Actions runner secrets