https://github.com/jorgecoke/cloudfire
đĽ CLOUDFIRE đĽ a Hono + React + Cloudflare (Pages & D1 SQLite) + DrizzleORM template
https://github.com/jorgecoke/cloudfire
auth boilerplate cloudflare deploy drizzle framework hono react stack template
Last synced: 26 days ago
JSON representation
đĽ CLOUDFIRE đĽ a Hono + React + Cloudflare (Pages & D1 SQLite) + DrizzleORM template
- Host: GitHub
- URL: https://github.com/jorgecoke/cloudfire
- Owner: JorgeCoke
- Created: 2024-11-15T07:40:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-28T13:26:41.000Z (about 1 year ago)
- Last Synced: 2025-09-27T23:38:52.464Z (5 months ago)
- Topics: auth, boilerplate, cloudflare, deploy, drizzle, framework, hono, react, stack, template
- Language: TypeScript
- Homepage: https://cloudfire-1gu.pages.dev/
- Size: 608 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
đĽ CLOUDFIRE đĽ
a Hono + React + Cloudflare (Pages & D1 SQLite) + DrizzleORM template
---
This boilerplate SaaS template stack is **designed for developers** seeking a streamlined, **high-performance** setup with **minimal dependencies**, and **super lightweight**. Perfect for modern web applications đ
## ⨠Features
- âď¸ [Cloudflare Pages](https://pages.cloudflare.com/) and [Cloudflare D1](https://developers.cloudflare.com/d1/) SQLite **serverless** deployment with
- đĽ [Hono](https://hono.dev/), the **fastest JS** server framework
- đ Automagically generated [SwaggerUI + OpenApi v3](https://swagger.io/specification/) spec
- âď¸ [React](https://react.dev/) 18 **SPA** ( <80kb gzip! )
- đŞ [Nanostores](https://github.com/nanostores/nanostores) State Management, Router and Query **lightweight multitool**
- đ§ [Drizzle](https://orm.drizzle.team/) as **SQLite ORM**
- đĄ [Zod](https://zod.dev/) **validator**
- đŚ [Tailwind](https://tailwindcss.com/) **styles**
- đ Username + password **JWT Auth Example**
- đ¨ The best **linter** and **formatter**, [BiomeJS](https://biomejs.dev/)
- đ **Commit nomenclature** rules following [Conventional Commit Format](https://commitlint.js.org/) and [Commitizen CLI](https://github.com/commitizen/cz-cli) (emoji [powered](https://github.com/folke/devmoji))
- đ **Release management policy** with [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version), including automagically CHANGELOG.md generation, GitTags, and version bumping
- đś Pre-Commit [Husky](https://github.com/typicode/husky) **hooks**
- đŚ Included [npm-check](https://www.npmjs.com/package/npm-check) to check for **outdated, incorrect, and unused** dependencies.
- đĽˇđť Included [better-npm-audit](https://www.npmjs.com/package/better-npm-audit) to check for dependency **vulnerabilities**
## đ Getting Started
First, create your production & preview databases, and update your wrangler configuration file:
```
npm i -g wrangler # Install Cloudflare Wrangler CLI
wrangler login # Login to Cloudflare
wrangler d1 create cloudfire-prod-db # Create Prod database, and don't forget to update [[d1_databases]] section in wrangle.toml with your database_id and database_name
wrangler d1 create cloudfire-preview-db # Create Preview database, and don't forget to update [[env.preview.d1_databases]] section in wrangle.toml with your database_id and database_name
cp .dev.vars.example .dev.vars # Create a .dev.vars and don't forget to fill it with your secret variables
```
Then, simply install dependencies, run the migrations and launch it!
```
npm ci # Install dependencies
npm run db:migrate:local # Run database migrations locally
npm run dev # Launch project locally
```
## ⊠Git Commit with Commitizen
```
git add . # Add files
npm run cz # Commit with Commitizen CLI
```
## đ¨ Linter & Formatter
```
npm run biome # Run BiomeJS
```
## đ Release and deploy a new version
1. (optional) First, generate a new release:
```
npm run release # (default) Bump version, generate CHANGELOG.md and push GitTag to origin
commit-and-tag-version --first-release --release-as 1.0.0 # First release and Release as a Target Type Imperatively
```
2. Then, add environment variables vĂa dashboard [(docs)](https://developers.cloudflare.com/workers/configuration/environment-variables/#add-environment-variables-via-the-dashboard), run migrations and deploy it:
```
npm run db:migrate:preview # Run database migrations (preview environment)
npm run deploy:preview # Deploy (preview environment)
npm run db:migrate:prod # Run database migrations (prod environment)
npm run deploy:prod # Deploy (prod environment)
```
## đĽ Drizzle Migrations & Studio
Generate new migrations:
```
npm run db:generate
```
Launch database studio:
```
npm run db:studio:local
npm run db:studio:preview
npm run db:studio:prod
```
## đŚ Check vulnerabilities and update outdated dependencies
```
npm run npm:audit # Check dependency vulnerabilities
npm run npm:check # Check outdated dependencies
```