Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sayedtahsin/routine-hono

Server-side code for Routine App. Build with Hono, Deployed on Cloudflare-Workers.
https://github.com/sayedtahsin/routine-hono

bun cloudflare-workers cron-triggers d1 hono jwt-authentication sqlite typescript

Last synced: 20 days ago
JSON representation

Server-side code for Routine App. Build with Hono, Deployed on Cloudflare-Workers.

Awesome Lists containing this project

README

        

# Routine-Hono

Build with Hono.js in Cloudflare-workers environment. Deployed on Cloudflare-workers. Used D1 Sqlite Database, Bun as Package Manager, and Cron type trigger events for scheduling tasks.

Front-end Deployed on Vercel


Front-end Repo

### Feature

- Firebase user authentication
- JWT token based session manange
- Add Task with Different Pre-defined(weekdays) and custom categories.
- Edit/Delete tasks
- Resets Tasks Based on Schedule
- Calculate Consistency Percentage

Same project build with Hono.js on Bun Enviromnet & Used MongoDb


Same project build with Express.js & used MongoDb and Supabase Database

Run locally:

- install bun if you want to use bun as package manager (recommended but optional)
- install wrangler for D1 database, cloudflare-workers runtime and deploy

```bash
$ bun add -g wrangler
```

- clone repo

```bash
$ [email protected]:SayedTahsin/Routine-Hono.git
```

- create and execute D1 database: After creating db, you will get some valiable,
copy paste these variable in wrangler.toml file then apply. (check this repo for understanding D1)

```
$ wrangler d1 create
$ wrangler d1 execute --local --file=./schema.sql
```
- need to set `ENV='development'` in wrangler.toml to avoid cors error in dev mode

- Run

```bash
$ bun install
$ bun run dev
```

- Deploy

```
$ bun run deploy
```

## TODO's

- [x] write Task API
- [x] write Note API
- [x] write User API
- [x] write Auth Route
- [x] Auth Middleware
- [x] cron triggers
- [x] deploy on Cloudflare-workers
- [x] fix CORS error
- [ ] fix Cookies Issue