feat: migrate auth from supabase to better auth (#596)

* feat: add README for @cio/db package and remove existingAccounts.json

* load session, load profile and organization, add create profile hook

* chore: cache session request

The trick was passing all the cookies to the backend. Previously I was only passing the better-auth.session_token and not better-auth.session_data. Read about the difference here https://www.better-auth.com/docs/concepts/cookies#custom-cookies

* feat: login, logout, onboarding, verify email, reset password.

* feat: complete change email and email verification

* feat: standardise how we make rpc calls and create org endpoints

* fix ui errors

* fix: handle potential undefined customerId and standardize avatar URL property

* refactor: standardize custom domain handling and update telegram chat ID references

* chore: add tailwind prefix to @cio/ui

this fixed the media query issues because  @cio/ui classes were overriding this dashboard tailwind build

* chore: clean up org sidebar

* chore: persist mode state

* feat: implement order breadcrumbs

* chore: upgrade to better auth 1.4

* chore: address common auth flow bugs and setup app for others to setup locally.
This commit is contained in:
Rotimi Best
2025-11-24 01:00:50 +01:00
committed by GitHub
parent 24741644d6
commit a3924100dd
567 changed files with 22364 additions and 13437 deletions
+9 -4
View File
@@ -4,8 +4,11 @@
"description": "ClassroomIO Backend for long processes",
"main": "dist/index.js",
"type": "module",
"files": [
"dist"
],
"scripts": {
"build": "tsc && tsc-alias",
"build": "rm -rf dist tsconfig.tsbuildinfo && tsc --build && tsc-alias",
"dev": "pnpm --filter @cio/api --parallel \"/^dev:.*/\"",
"dev:server": "tsx watch src/index.ts",
"dev:tsc": "tsc -p tsconfig.json --watch",
@@ -36,6 +39,9 @@
"dependencies": {
"@aws-sdk/client-s3": "^3.388.0",
"@aws-sdk/s3-request-presigner": "^3.675.0",
"@cio/db": "workspace:*",
"@cio/email": "workspace:*",
"@cio/utils": "workspace:*",
"@hono/node-server": "^1.8.2",
"@hono/standard-validator": "^0.1.5",
"@hono/zod-validator": "^0.7.2",
@@ -43,6 +49,7 @@
"@sentry/profiling-node": "^7.110.1",
"@supabase/supabase-js": "^2.32.0",
"axios": "^1.4.0",
"bcrypt": "^6.0.0",
"dotenv": "^16.3.1",
"hono": "^4.9.7",
"hono-openapi": "^1.0.8",
@@ -51,15 +58,13 @@
"katex": "^0.16.10",
"marked": "^7.0.3",
"nanoid": "^5.1.5",
"nodemailer": "^6.9.5",
"zeptomail": "^6.0.0",
"zod": "^4.1.8",
"zod-openapi": "^5.4.1"
},
"devDependencies": {
"@types/bcrypt": "^6.0.0",
"@types/katex": "^0.16.7",
"@types/node": "^20.19.0",
"@types/nodemailer": "^6.4.17",
"@typescript-eslint/eslint-plugin": "7.0.1",
"@typescript-eslint/parser": "7.0.1",
"@vitest/coverage-v8": "^1.2.2",