Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
185 commits
Select commit Hold shift + click to select a range
f264de3
chore: initial backend
mabels Jan 15, 2025
01b9e85
chore: added . to prettier
mabels Jan 15, 2025
6601863
chore: format
mabels Jan 15, 2025
4dbc28d
chore: WIP in restructuring
mabels Jan 15, 2025
c4ff7e9
chore: wip
mabels Jan 15, 2025
8c7af42
chore: now database seams to work again
mabels Jan 16, 2025
81f4efc
chore: now cloud is displaying the selected tenant
mabels Jan 16, 2025
a5fb813
chore: typos and Role added owner
mabels Jan 16, 2025
89cc0f6
chore: CF-pages
mabels Jan 16, 2025
eaae420
chore: more pages support
mabels Jan 16, 2025
5691e38
chore: added CloudContext to reduce the API calls
mabels Jan 16, 2025
92f8f92
chore: reduce bundle size
mabels Jan 16, 2025
fc139e3
chore: added deploy:cf to pages
mabels Jan 16, 2025
28e97ea
chore: enhance test
mabels Jan 16, 2025
99bc10c
chore: ignore stats.html
mabels Jan 16, 2025
b7605b3
chore: added VITE_API_URL
mabels Jan 16, 2025
f2815fe
chore: added findUserRef
mabels Jan 17, 2025
70d9815
chore: update user -> userByProvider
mabels Jan 21, 2025
ab64be9
chore: inviteTicket list/remove
mabels Jan 21, 2025
091df42
chore: CRUD tenant
mabels Jan 21, 2025
472ff06
chore: CRUD fixes
mabels Jan 21, 2025
e50c0cf
let's make the cloud default view.
necrodome Jan 22, 2025
38b7041
Start restructuring cloud.
necrodome Jan 22, 2025
c92327c
Show friendly name 'Default' for default tenant.
necrodome Jan 22, 2025
21fff53
Happy prettier.
necrodome Jan 22, 2025
5223a84
chore: the new backend
mabels Jan 22, 2025
d4cebed
chore: getting close to invites
mabels Jan 23, 2025
94d23a1
chore: invites internal + external are send
mabels Jan 23, 2025
7a7c751
chore: first ledger and useQuery
mabels Jan 26, 2025
f4b3f6b
WIP - UI restructuring
necrodome Jan 27, 2025
e244162
make the new tenant option less prominent
jchris Jan 28, 2025
87bc5a4
chore: ledger CRUD + redeemHandler + update schema
mabels Jan 29, 2025
dc37c32
Make main flow around ledgers.
necrodome Jan 29, 2025
c952d91
Add create UI for ledger.
necrodome Jan 29, 2025
9f915ac
Add Reqct Query dev tools.
necrodome Jan 31, 2025
0dd5a93
Start using mutations.
necrodome Jan 31, 2025
a3b0de9
chore: some cleanup
mabels Jan 31, 2025
878b662
chore: update works -- wrapResultToPromise was not ok
mabels Jan 31, 2025
5b9503b
chore: fix the listledger hook
mabels Jan 31, 2025
f8c074d
WIP - Wire all functionality to start fine tuning.
necrodome Jan 31, 2025
1fd78f4
Check pending state for queries.
necrodome Jan 31, 2025
7653918
Add tenant name update mutation
necrodome Feb 3, 2025
566a018
chore: test better-auth
mabels Feb 3, 2025
68c5924
chore: small cleanup
mabels Feb 3, 2025
70d7001
First pass for design change integration.
necrodome Feb 5, 2025
6f5ce61
Prettier run.
necrodome Feb 5, 2025
ca07ce0
Adjust tailwind config.
necrodome Feb 5, 2025
615696e
Use import for tailwind plugins.
necrodome Feb 5, 2025
2d1b43b
Cleanup redundant text.
necrodome Feb 5, 2025
bab555f
Style tenant selector.
necrodome Feb 5, 2025
e8eb692
Tabbed view styling.
necrodome Feb 5, 2025
5b18d5a
Make doucments view the default view for ledgers.
necrodome Feb 5, 2025
c5ea523
Extract url driven tabbed nav to its own component
necrodome Feb 5, 2025
ea49d09
Add doc list and new doc creation, connected to old cloud
necrodome Feb 6, 2025
9af0d49
Change favicon
necrodome Feb 6, 2025
87eed23
Namespace temp connection to cloud.
necrodome Feb 6, 2025
aba5a55
Change separator for endpoint name
necrodome Feb 6, 2025
b74ee6b
Add document management.
necrodome Feb 7, 2025
a3ca186
Formatting.
necrodome Feb 7, 2025
d26a62b
Subtle animation for tab change.
necrodome Feb 8, 2025
f95ff76
Remove tenant info debug div.
necrodome Feb 10, 2025
499a5e8
Introduce new button component
necrodome Feb 11, 2025
ec09c92
More buttons.
necrodome Feb 11, 2025
944dc72
Add custom login page - clerk specific. needs to be provider agnostic.
necrodome Feb 12, 2025
3c993fd
Remove passing ctx to root loader.
necrodome Feb 12, 2025
21b3578
Handle tenant invites. More styling.
necrodome Feb 12, 2025
e545626
Update sidebar styling.
necrodome Feb 12, 2025
1feaddb
Update login page view.
necrodome Feb 16, 2025
58ec101
Dashboard -> Connect
necrodome Feb 20, 2025
18f6776
Wording for displaying tenants in dropdown.
necrodome Feb 20, 2025
a8a7383
chore: added the cloud-token-generation
mabels Feb 25, 2025
11a3eb9
Logo placement and copy tweaks for login page
windmountain Feb 28, 2025
cd8729b
Add simple server timing for api calls.
necrodome Mar 5, 2025
87b6655
Fix button navigation for new doc/back
necrodome Mar 7, 2025
05423ba
chore: on the way to prod deployment
mabels Mar 10, 2025
c9602ac
chore: select dev
mabels Mar 10, 2025
2d9d554
chore: update wrangler
mabels Mar 10, 2025
342974d
chore: cleanup deps
mabels Mar 10, 2025
8b3ffb4
chore: try d1 deploymen
mabels Mar 10, 2025
a0431d6
The latest compatibility date supported by the installed Cloudflare W…
necrodome Mar 11, 2025
8b0bd9e
Replace "Ledger" with "Database" throughout UI
windmountain Mar 11, 2025
a200cb3
More UI name changes from "ledger" to "database"
windmountain Mar 11, 2025
ece9b73
Update sharing.tsx
windmountain Mar 11, 2025
45c6c6e
Merge pull request #31 from fireproof-storage/ledger-to-database-in-ui
windmountain Mar 12, 2025
cfb4756
Fix New Document button
windmountain Mar 12, 2025
af44371
Rename 'Ledgers' in sidebar to 'Databases'
windmountain Mar 12, 2025
a0750da
Scoot example 'connect(db...' call closer towards 'db.attach(...'
windmountain Mar 12, 2025
42f3425
Use onclick for new document button.
necrodome Mar 12, 2025
e29f0ca
Setup deployment with stages.
necrodome Mar 14, 2025
5fb7b07
Add sample .dev.vars
necrodome Mar 14, 2025
06df917
Update wrangler to latest.
necrodome Mar 14, 2025
2397e5d
Update Readme for required environment.
necrodome Mar 14, 2025
ddbc83b
Don't redirect to a new login page on signin button click.
necrodome Mar 14, 2025
db2f9a0
Prettier readme.
necrodome Mar 14, 2025
bf0c18d
chore: use 0.20 and drizzle:d1-remote
mabels Mar 14, 2025
3dee76f
format
mabels Mar 14, 2025
a614a29
chore: try blacksmith
mabels Mar 14, 2025
f7e6b27
chore: CF might have different secrets for worker and d1
mabels Mar 14, 2025
02aad9c
chore: added D1 TOKEN
mabels Mar 14, 2025
765187e
sample: staging workflow
mabels Mar 14, 2025
45f54de
chore: fix initial redirect
mabels Mar 14, 2025
5baad18
chore: added staging support
mabels Mar 14, 2025
d2c217a
chore: added s and p prefix to tags
mabels Mar 14, 2025
4ade59a
chore: switch to arm
mabels Mar 14, 2025
fd6b185
chore: install pnpm first
mabels Mar 14, 2025
6d1f602
chore: cache pnpm
mabels Mar 14, 2025
f3c538d
VITE_CLERK_PUBLISHABLE_KEY is needed at build time for Cloudflare dep…
necrodome Mar 18, 2025
1592cfe
Styling for new database form.
necrodome Mar 19, 2025
33837d9
Test dev deployment.
necrodome Mar 19, 2025
6e268ca
Revert back CI config until we find a better way to get environment n…
necrodome Mar 19, 2025
d571160
Separate login and signup pages
windmountain Mar 20, 2025
12f1b4f
Style new tenant page.
necrodome Mar 20, 2025
abb0185
Remove orange arrow animation on mobile
windmountain Mar 20, 2025
dd5e57a
chore: use sts from @fireproof/core
mabels Mar 21, 2025
970ccbf
GitButler Workspace Commit
gitbutler-client Mar 28, 2025
0741641
wip
mabels Mar 28, 2025
a46c1dd
format
mabels Mar 28, 2025
8d57c8e
chore: move the credentials to github
mabels Apr 2, 2025
74a8248
chore: drizzle-kit need esm now
mabels Apr 2, 2025
80fa544
chore: wrong wrangler.toml
mabels Apr 2, 2025
fca75fa
chore: one build down
mabels Apr 2, 2025
9d0867c
chore: expose CLOUD_SESSION_TOKEN_SECRET
mabels Apr 2, 2025
7fab268
chore: try change the header
mabels Apr 4, 2025
8e6a87c
chore: not everything is application/json
mabels Apr 4, 2025
a4ad854
chore: try to bend the iframes
mabels Apr 4, 2025
fceb8db
Set connect d1 prod id.
necrodome Apr 15, 2025
7050e3f
Grab cloudflare env from env variables so we can deploy based on env
necrodome Apr 16, 2025
f7d72e2
Fix cf route configuration for staging and prod
necrodome Apr 16, 2025
836e5fd
Let's hide signup until we fix the flow for vibes.diy
necrodome Apr 17, 2025
780e2c1
chore: now the token page is functional
mabels May 1, 2025
9bde541
chore: better token selection
mabels May 7, 2025
3dacc31
chore: initialparams was defect
mabels May 7, 2025
2c500c1
chore: passthough if ledger not set
mabels May 7, 2025
6df5801
chore: added token by result-id
mabels May 8, 2025
cba534e
chore: added dispatch for TokenByResultId
mabels May 8, 2025
aa94fff
chore: verify length of resultId
mabels May 8, 2025
9fc042d
chore: added cors to api
mabels May 9, 2025
7aebdbc
chore: after integration of dashboard types from core
mabels May 9, 2025
c89e1ca
chore: fix the flow if your are not login
mabels May 12, 2025
21d6ae6
chore: try to add settings of the ledger
mabels May 12, 2025
21a7eff
chore: added delete ledger and tenant
mabels May 12, 2025
8083575
Add skipChooser until connect is ready.
necrodome May 16, 2025
fe51529
Adds query params to support unbranded login from VibesDIY
windmountain May 27, 2025
6c4040b
Merge pull request #33 from fireproof-storage/generic-login-signup-token
windmountain May 27, 2025
003485b
Fix formatting
windmountain May 27, 2025
00407fc
chore: add .dev.vars support and improve local development setup
jchris May 28, 2025
b528ff9
Add extendToken functionality to validate and extend token expiry by …
necrodome May 28, 2025
a89c2d4
Prettier happy.
necrodome May 28, 2025
441219f
chore: cleanup
mabels May 29, 2025
1aac811
Bump multiformats from 13.3.2 to 13.3.6
dependabot[bot] May 29, 2025
6a39899
Bump @libsql/client from 0.14.0 to 0.15.7
dependabot[bot] May 29, 2025
1af59d4
Bump rollup-plugin-visualizer from 5.14.0 to 6.0.1
dependabot[bot] May 29, 2025
5921dc6
Bump @cloudflare/vite-plugin from 0.1.19 to 1.3.0
dependabot[bot] May 29, 2025
08d1163
Bump globals from 15.15.0 to 16.2.0
dependabot[bot] May 29, 2025
145c4d3
Bump react and react-dom
dependabot[bot] May 29, 2025
b263f27
Bump tailwindcss from 3.4.17 to 4.1.8
dependabot[bot] May 29, 2025
bbc42c1
chore: tailwind back to 3x
mabels May 29, 2025
c31b76e
base64 encode redirect_url when not logged in
necrodome May 30, 2025
a9960df
Bump @eslint/js from 9.27.0 to 9.28.0
dependabot[bot] Jun 2, 2025
43d372d
Bump wrangler from 4.17.0 to 4.18.0
dependabot[bot] Jun 4, 2025
95fe1c8
chore: help dependabot
mabels Jun 4, 2025
894c994
chore: correct yaml
mabels Jun 4, 2025
c53c0fb
Bump @cloudflare/workers-types from 4.20250529.0 to 4.20250601.0
dependabot[bot] Jun 4, 2025
2b331b0
Bump @tanstack/react-query from 5.79.0 to 5.79.2
dependabot[bot] Jun 4, 2025
b62bc6a
Bump eslint-plugin-react-hooks from 5.1.0 to 5.2.0
dependabot[bot] Jun 4, 2025
a495e84
Bump vitest from 3.1.4 to 3.2.0
dependabot[bot] Jun 4, 2025
33a9c98
chore: make the dashboard working again
mabels Jun 4, 2025
03eab93
Bump drizzle-orm from 0.40.1 to 0.44.1
dependabot[bot] Jun 4, 2025
17d5d9d
Bump @cloudflare/vite-plugin from 1.3.0 to 1.3.1
dependabot[bot] Jun 4, 2025
5b9f4b3
chore: drizzle update broke expression
mabels Jun 4, 2025
ea9a292
Bump react-router-dom from 7.6.1 to 7.6.2
dependabot[bot] Jun 4, 2025
e497b8e
Bump @vitejs/plugin-react from 4.5.0 to 4.5.1
dependabot[bot] Jun 4, 2025
c6b2dc9
Re-enable editor
necrodome Jun 4, 2025
572f016
Safer url encoding for redirects
necrodome Jun 4, 2025
fa9b533
Run CI on workflow dispatch so we can trigger it manually.
necrodome Jun 4, 2025
797b43f
[EMPTY] Trigger prod deployment
necrodome Jun 4, 2025
4156a9d
Add tags to CI trigger list.
necrodome Jun 4, 2025
6f238e2
Push events to every tag including hierarchical tags
necrodome Jun 4, 2025
30631f2
Format.
necrodome Jun 4, 2025
efe4926
Update to latest fireproof that has token extension
necrodome Jun 5, 2025
b1363b4
chore: new version
mabels Jun 6, 2025
275d766
Redirect to the referring url on signups
necrodome Jun 7, 2025
be861c1
feat: add JWKS endpoint for Fireproof session token verification
jchris Jun 22, 2025
6fdebc1
feat: decode base58btc JWK from session token before parsing
jchris Jun 22, 2025
116c0a5
chore: remove depbot
mabels Jul 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dev.vars.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generate with npx tsx backend/create-cloud-session-token-keypair.ts
CLOUD_SESSION_TOKEN_SECRET=
CLERK_SECRET_KEY=
6 changes: 1 addition & 5 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,7 @@ module.exports = {
},
},
},
extends: [
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
],
extends: ["plugin:@typescript-eslint/recommended", "plugin:import/recommended", "plugin:import/typescript"],
},

// Node
Expand Down
100 changes: 100 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: CI
on:
workflow_dispatch:
push:
tags:
- "**"
branches:
- "mabels/backend"
pull_request:
branches:
- "mabels/backend"
jobs:
# deploy-staging:
# environment: staging
# runs-on: ubuntu-24.04
# name: Deploy to staging
# needs: [quality-checks]
# steps:
#
quality-checks:
name: Testit Runit Buildit
environment: ${{ startsWith(github.ref, 'refs/tags/s') && 'staging' || startsWith(github.ref, 'refs/tags/p') && 'production' || 'dev' }}
#runs-on: blacksmith-4vcpu-ubuntu-2204
runs-on: blacksmith-4vcpu-ubuntu-2204-arm
steps:
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
version: 10
cache: "pnpm"

- uses: actions/checkout@v4

- uses: useblacksmith/setup-node@v5
with:
node-version: 20
cache: pnpm

#runs-on: ubuntu-24.04
#steps:
# - uses: actions/setup-node@v4
# with:
# node-version: 20
# cache: pnpm

- name: install
run: pnpm install

- name: format-check
run: pnpm run format --check

- name: lint
run: pnpm run lint

- name: build
env:
VITE_CLERK_PUBLISHABLE_KEY: ${{ vars.CLERK_PUBLISHABLE_KEY }}
run: pnpm run build

- name: test
run: |
pnpm run test

- name: deploy cf
id: attempt1
env:
# need for drizzle
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_D1_TOKEN: ${{ secrets.CLOUDFLARE_D1_TOKEN }}
CLOUDFLARE_DATABASE_ID: ${{ vars.CLOUDFLARE_DATABASE_ID }}
# need in CF to be Env
CLOUD_SESSION_TOKEN_PUBLIC: ${{ vars.CLOUD_SESSION_TOKEN_PUBLIC }}
CLOUD_SESSION_TOKEN_SECRET: ${{ secrets.CLOUD_SESSION_TOKEN_SECRET }}
CLERK_PUBLISHABLE_KEY: ${{ vars.CLERK_PUBLISHABLE_KEY }}
CLERK_PUB_JWT_KEY: ${{ vars.CLERK_PUB_JWT_KEY }}
# need during build
VITE_CLERK_PUBLISHABLE_KEY: ${{ vars.CLERK_PUBLISHABLE_KEY }}
run: |
# pnpm run build
pnpm run drizzle:d1-remote
pnpm exec fp-cli writeEnv --env ${{vars.CLOUDFLARE_ENV}} --out /dev/stdout --json \
--fromEnv CLERK_PUBLISHABLE_KEY \
--fromEnv CLERK_PUB_JWT_KEY \
--fromEnv CLOUD_SESSION_TOKEN_SECRET \
--fromEnv CLOUD_SESSION_TOKEN_PUBLIC | \
pnpm exec wrangler -c ./wrangler.toml secret --env ${{vars.CLOUDFLARE_ENV}} bulk
pnpm run deploy:cf --env ${{vars.CLOUDFLARE_ENV}}

# - name: deploy to production
# if: github.ref == 'refs/heads/main'
# env:
# CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
# CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# CLOUDFLARE_DATABASE_ID: ${{ secrets.CLOUDFLARE_DATABASE_ID }}
# run: |
# pnpm run build
# pnpm run drizzle:d1-remote
# pnpm run deploy:cf --env production
56 changes: 56 additions & 0 deletions .github/workflows/staging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Staging Deployment
on:
workflow_dispatch:
inputs:
environment:
description: "Target environment"
required: true
default: "staging"

jobs:
deploy-staging:
name:
environment: staging
runs-on: blacksmith-4vcpu-ubuntu-2204
steps:
- uses: useblacksmith/setup-node@v5
with:
node-version: 20

- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
version: 10
cache: "pnpm"

- name: install
run: pnpm install

- name: format-check
run: pnpm run format --check

- name: lint
run: pnpm run lint

- name: build
run: pnpm run build

- name: test
run: |
pnpm run drizzle:libsql
pnpm run test

- name: deploy to preview
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_D1_TOKEN: ${{ secrets.CLOUDFLARE_D1_TOKEN }}
CLOUDFLARE_DATABASE_ID: ${{ secrets.CLOUDFLARE_DATABASE_ID }}
VITE_CLERK_PUBLISHABLE_KEY: ${{ vars.CLERK_PUBLISHABLE_KEY }}
run: |
pnpm run build
pnpm run drizzle:d1-remote --verbose
pnpm run deploy:cf
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
node_modules
**/.wrangler/**

stats.html

/.cache
/build
/public/build
.env
.dev.vars

# Logs
logs
Expand All @@ -28,4 +32,4 @@ dist-ssr
*.njsproj
*.sln
*.sw?
*.zip
*.zip
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**/pnpm-lock.yaml
scripts/
**/.esm-cache/**
**/dist/**
**/coverage/**
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 132,
"singleQuote": false,
"semi": true,
"useTabs": false
}
79 changes: 79 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,81 @@
# Fireproof Dashboard

https://dashboard.fireproof.storage/

## Environment Variables

### Development

To run this project in development mode, you need to set up the following environment files:

1. Create a `.env` or `.env.local` file with these variables:

```
CLOUD_SESSION_TOKEN_SECRET=your_session_token_secret
CLERK_SECRET_KEY=your_clerk_secret_key
VITE_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
```

2. Create a `.dev.vars` file (used by Wrangler for local development):

```
CLOUD_SESSION_TOKEN_SECRET=your_session_token_secret
CLERK_SECRET_KEY=your_clerk_secret_key
```

Additionally, you need to create a token template named `with-email` in your Clerk dashboard with the following configuration:

```json
{
"role": "authenticated",
"params": {
"last": "{{user.last_name}}",
"name": "{{user.username}}",
"email": "{{user.primary_email_address}}",
"first": "{{user.first_name}}",
"image_url": "{{user.image_url}}",
"external_id": "{{user.external_id}}",
"public_meta": "{{user.public_metadata}}",
"email_verified": "{{user.email_verified}}"
},
"userId": "{{user.id}}"
}
```

## Local Development

To set up and run the project locally:

1. Set up the database schema:

```
pnpm drizzle:d1-local
```

2. Start the frontend development server:

```
pnpm dev
```

3. In a separate terminal, start one of the backend servers:
```
pnpm backend:d1 # For Cloudflare Workers D1 backend
```
OR
```
pnpm backend:deno # For Deno backend
```

### Deployment

The main deployment target for this project is **Cloudflare Workers**.

For deployment, you'll need these additional environment variables:

```
CLOUDFLARE_ACCOUNT_ID=your_cloudflare_account_id
CLOUDFLARE_API_TOKEN=your_cloudflare_api_token
CLOUDFLARE_DATABASE_ID=your_cloudflare_database_id
VITE_CLERK_PUBLISHABLE_KEY=
```
Loading
Loading