Commit Graph
395 Commits
Author SHA1 Message Date
Rotimi Best 4b52906445 feat: enhance API route naming conventions and structure
- Added comprehensive guidelines for API route naming and structure in `ROUTE_NAMING_BEST_PRACTICES.md`.
- Updated `ARCHITECHTURE.md` to reference the new best practices document.
- Refactored course-related routes to follow new naming conventions, including changes to endpoint paths and validation schemas.
- Removed the deprecated course clone route and integrated cloning functionality directly into the course routes.
- Adjusted various API methods to ensure consistent usage of HTTP methods and parameter structures across the application.
2025-12-05 17:24:16 +01:00
Adeyemi AdetunjiandRotimi Best 9a5aee1ee0 feat: setup dashboard analytics api (#604)
* feat: setup dashboard analytics api

* chore: requested pr fixes

* fix: dash analytics server side type

* refactor: update Avatar component usage across the dashboard

- Replaced custom Avatar component with the new @cio/ui/base/avatar implementation for consistency.
- Enhanced avatar rendering with fallback options and improved accessibility.
- Cleaned up unused Avatar component files and related functions.
- Updated various components to utilize the new Avatar structure, ensuring a uniform appearance and behavior across the application.

* chore: remove console.log statements from analytics routes and API calls

- Eliminated console.log statements for orgId and siteName in the dash analytics router and DashStatApi class to clean up the code and improve performance.

---------

Co-authored-by: Rotimi Best <[email protected]>
2025-12-02 15:27:41 +01:00
Rotimi Best c7854efae3 feat: redo settings and all org pages. (#601)
* feat: new components, deploy storybook

* refactor: simplify component field definitions and enhance button loading state

- Removed unnecessary type imports and simplified the FIELDS array definitions across multiple components in Storybook.
- Updated button component to use a loading state instead of isLoading, improving clarity and consistency in props.
- Adjusted button stories to reflect the new loading prop and enhanced the button's loading visual feedback.
- Minor CSS adjustments for better layout and styling consistency.

* chore: add field, card, password components

* feat: improve page component & update AuthUI path

* chore: update bits-ui to version 2.14.4 and all org related UI's

- Updated bits-ui dependency in pnpm-lock.yaml and package.json to version 2.14.4.
- Refactored imports for RoleBasedSecurity and UpgradeBanner components to use the new ui feature directory.
- Removed unused Course components and related files to clean up the codebase.
- Enhanced various components to improve consistency and maintainability.

* chore: move all setting buttons to the top and update auth ui styles

* chore: remove svelte-loading-spinners and replace with @cio/ui/base/spinner

- Removed all instances of svelte-loading-spinners from the project.
- Updated components to use the new Spinner from @cio/ui/base/spinner.
- Cleaned up pnpm-lock.yaml and package.json to reflect the removal of svelte-loading-spinners.
- Added new CSS animations for rocket launch effects in app.css.
- Enhanced email change flow with updated verification messages in translations.

* chore: remove supabase file upload from dashboard and move to r2

* chore: update organization API and UI components

- Added new API methods for organization plan operations and team management.
- Introduced middleware for API key authentication and organization admin checks.
- Refactored organization-related components to utilize the new API structure.
- Updated various UI components to improve consistency and maintainability.
- Enhanced error handling and validation for organization-related actions.
- Removed deprecated services and streamlined the codebase.
2025-12-02 09:54:38 +01:00
Rotimi Best e0e3c8a01e fix: get branch full working 2025-11-25 17:18:15 +00:00
Rotimi Best a3924100dd 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.
2025-11-24 01:00:50 +01:00
Adeyemi AdetunjiandRotimi Best cbf6ae7e63 feat: move away from carbon components and TinyMCE (#597)
* feat: remove tinymce & replace org sidebar

* chore: PR Fixes

* chore: move ui font into src dir

* remove files in vite config

* use google font import for loading font

* remove custom font

* more fonts update

* remove font bold

* more removals of font bold

* fix import

* checkpoint

* chore: checkpoint (add course & lms shadcn sidebar)

* minor css improvements and try out font sans

* chore: replace carbon components with shadcn's

* chore: replace carbon components with shadcn _ v3

* chore: ui fixes & storybook update

* feat: UI cleanup

* fix: quick ui fixes

* chore: update pnpm-lock.yaml with new dependencies and versions; fix output.css formatting

* chore: add isloading to button

* feat: add loading state to button stories

* chore: feedback fixes

* fix: feedback fixes

* chore: remove console

* fix: PR comments

* fix: PR comments

---------

Co-authored-by: Rotimi Best <[email protected]>
2025-11-21 12:18:04 +01:00
Rotimi Best 2145782385 Merge branch 'main' of https://github.com/classroomio/classroomio into feat/release-v2 2025-11-08 20:23:52 +01:00
Rotimi Best ba47b06647 Merge branch 'main' of https://github.com/classroomio/classroomio into feat/release-v2 2025-11-08 20:22:53 +01:00
Rotimi Best b8c15eabe3 chore: remove debug console log from app.svelte
Removed console log for global store in app.svelte.
2025-11-08 20:20:38 +01:00
Rotimi Best 34e5cab733 chore: [FIXED] clean up console logs in layout and pricing components, add context prompt for ClassroomIO
This point I have fixed 2 major issues
1. After signing in with Google auth, join a course and going to the course, when you click the back button in the page nav, it takes you to admin instead of lms

2. When you open a course landing page, click enroll, it redirects to 404 instead of the invite page.
2025-11-08 18:47:53 +01:00
Rotimi Best b3d5f291f0 chore: fix issue of isOrgSite being false after google auth 2025-11-08 18:27:00 +01:00
Rotimi Best aa42eb9c1f chore: reorder layout setup and debug org set after login 2025-11-08 18:22:41 +01:00
Rotimi Best b783940cee fix: keep org store after logout
This fix tackled a bug where if I logged out, go to org landing page, open a course and enrol then it gets redirected to a 404 page because `$currentOrg.siteName` is undefined.
2025-11-08 17:58:03 +01:00
Rotimi Best 93db0c97e8 chore: use hasSession to check if auth token exists 2025-11-08 17:30:22 +01:00
Rotimi Best 0f433cfa93 chore: debug enrollment on lms 2025-11-08 06:11:44 +01:00
Rotimi Best 9e4609dc7f fix: redirect to login if no session on invite page 2025-11-08 05:51:09 +01:00
Rotimi Best 3d64e25b89 chore: debug lms detection on client side 2025-11-08 05:34:17 +01:00
Rotimi Best 7715834566 chore: debug getSubdomain 2025-11-08 05:22:38 +01:00
Rotimi Best 291e233700 chore: enable auto redirect on layout mount
The use case for this is that if a person went from course page to invite page, and isn't authenticated then the user should be redirected to login page with a redirect query param
2025-11-08 05:02:17 +01:00
Rotimi Best 570b809111 chore: debug join course 2025-11-08 04:52:42 +01:00
Rotimi Bestandtunny17 f5a4156c8b feat: migrate dashboard to svelte 5 (#577)
* chore: migration to SvelteKit 2

* stage 1: migrate to svelte 5 and fix rerendering issues

* stage 2: fix more $: reactivity across dashboard

* fix merge conflicts

* chore: migrate code in main to svelte 5

* chore: update preventDefault

* chore: simplify tsconfig and remove unused mobileMenuRef in MobileMenu.svelte

* chore: enforce .ts across dashboard

* rename from classroomio-com to website

* stage-3: Replace carbon icon svelte with lucide icon

* update lock file

* chore: finish icon replacement

* fix: settings and setup page multiple rerender

* stage 3: More icon and rerendering fixes

* feat: checkpoint

* feat: update editor

* [not working] connect everything with ui build

* storybook + ui + dashboard all working independently

* add bg-black to +page.svelte

* feat: add editor to storybook

* chore: animate lucid icons (#590)

* v1 animations

* feat: change some course navigation icons & animate org navigation icons

* chore: change settings icon

* chore: use css instead of js for hover

* rename animations

---------

Co-authored-by: tunny17 <[email protected]>

* chore: update path to node_modules types in api tsconfig

* fix: update import path for DropdownMenu component

* fix: add rollupOptions to build configuration in vite.config.ts

* fix: remove rollupOptions from build configuration and add @floating-ui/dom dependency

* install

---------

Co-authored-by: tunny17 <[email protected]>
2025-11-01 16:18:29 +01:00
Rotimi Best b96d91cd7c feat: setup drizzle (#594)
* chore: migration to SvelteKit 2

* stage 1: migrate to svelte 5 and fix rerendering issues

* stage 2: fix more $: reactivity across dashboard

* fix merge conflicts

* chore: migrate code in main to svelte 5

* chore: update preventDefault

* chore: simplify tsconfig and remove unused mobileMenuRef in MobileMenu.svelte

* chore: enforce .ts across dashboard

* rename from classroomio-com to website

* stage-3: Replace carbon icon svelte with lucide icon

* update lock file

* chore: finish icon replacement

* fix: settings and setup page multiple rerender

* stage 3: More icon and rerendering fixes

* feat: setup drizzle and better auth

* fix: onboarding validation error showing translation key #586 (#593)

* fix: onboarding validation error showing translation key #586

* fix: remove debug log for profile update errors

* chore: add a clean command

* fix: remove message from email verification response
2025-11-01 15:49:29 +01:00
Rotimi Best eb40b6dab6 fix: remove message from email verification response 2025-11-01 11:53:27 +01:00
Rotimi Best 86adad9358 fix: onboarding validation error showing translation key #586 (#593)
* fix: onboarding validation error showing translation key #586

* fix: remove debug log for profile update errors
2025-11-01 09:54:19 +01:00
Adeyemi Adetunji 97fb446df5 fix: snackbar for profile component (#588) 2025-10-31 18:28:52 +01:00
Nwosu Emmanuel 8efffcb7f6 feat: clone course (#582)
* feat: clone course work

* feat: clone and delete a course

* feat: clone and delete a course

* feat: clean up

* feat: attending to reviews

* feat: attended to revies
2025-10-29 09:57:29 +01:00
Adeyemi Adetunji f8271d850f fix: dashboard i18n build/console warnings (#587)
* fix: build warnings

* feat: remove other instances of invalid_type_error and the unused translation key
2025-10-29 09:34:30 +01:00
Adeyemi Adetunji b9b19d8a2e feat: add search and replace to tinymce editor (#585) 2025-10-28 11:59:21 +01:00
Adeyemi AdetunjiandRotimi Best 3692046077 feat: add danish support to dashboard (#580)
* feat: Add Danish Support

* feat: add migration file

* chore: update migrations

---------

Co-authored-by: Rotimi Best <[email protected]>
2025-10-13 18:07:46 +01:00
Rotimi Best c31e5e131f chore: update org mock data 2025-10-13 15:49:50 +01:00
Rotimi Best 23ef0661eb fix: add address translation to en.json 2025-10-13 15:46:28 +01:00
Rotimi Best c34379f6a2 chore: set default of customLinks 2025-10-13 15:35:02 +01:00
Nwosu Emmanuel 6cae0f1506 fix: pushed fix for landing page (#579) 2025-10-13 14:39:57 +01:00
Rotimi Best ab89837e29 chore: align logo on org landing page 2025-10-12 17:43:43 +01:00
Rotimi Best 92cc922a40 chore: reorder org import 2025-10-12 17:30:39 +01:00
Rotimi Best 41de98083f fix: show navigation if slugname include routes to hide nav 2025-10-12 14:02:47 +01:00
Rotimi Best 168866c81b feat: optimize docker compose for dashboard and api (#578)
* chore: use turbo for build

* fix docker compose file and remove backend

* chore: update .dockerignore to include additional files and directories for improved build management

* copy everything in both docke filed

* refactor: streamline Dockerfile to copy entire dashboard app and remove unnecessary node_modules references

* update api to use turbo to start

* run ls la for docker files

* update cmd commands

* update cmds to use node

* fix: add redis url to docker compose

* fix: reduce memory allocation for dashboard build in Dockerfile

* debug dashboard build

* update api docker file

* update dashboard

* add tsconfig

* chore: add echo to dockerfile

* fix: change echo to run

* chore: install pnpm before switching to non-root user in Dockerfile

* refactor: update start commands in package.json and Dockerfiles to use pnpm

* install turbo

* use turbo 1.10.16

* update turbo config

* fix: update CMD in Dockerfile to run the API directly using Node.js

* change

* add commands to turbo.json

* copy over turbo

* add workspace

* fix: update start commands in package.json to specify ports for dashboard and API

* publish docker images

* add dev branch

* update compose

* build only for amd64 platform

* refactor: update docker-compose to use pre-built images and remove build context

* coolify-dockertest

* point to latest

* chore: update docker-compose to use specific version tags for API and dashboard images

* remove envs for docker file

* 0.1.3

* use dynamic env

* 0.1.4

* add PUBLIC_IS_SELFHOSTED=true

* chore: update docker-compose to use version 0.1.5 for API and dashboard images

* use static for PUBLIC_IS_SELFHOSTED

* disable cache for tag

* use 0.1.7

* add PUBLIC_IS_SELFHOSTED=true

* comment out caching

* update docker-compose to use version 0.1.8 for API and dashboard images

* update api port

* use tag 0.1.9

* add cache

* use latest tag in compose file
2025-10-11 13:27:50 +01:00
Nwosu EmmanuelandRotimi Best 27ee51155e feat: add custom navigation link to org landing page (#569)
* feat: custom navbar UI complete

* chore: added translations

* fear: attending to reviews

* add orgname to org landing page

---------

Co-authored-by: Rotimi Best <[email protected]>
2025-10-09 01:13:06 +01:00
Rotimi Best 9a7018eb34 chore: remove unused dependencies 2025-10-04 11:01:22 +01:00
Nwosu EmmanuelandRotimi Best 594eb97caa feat: AI grading bug (#420)
* worked on the AI grading task

* worked on the AI grading task

* improved the ai grading function

* improved the ai grading function

* update types

---------

Co-authored-by: Rotimi Best <[email protected]>
2025-09-28 20:08:56 +01:00
Rotimi Best 85474ea022 chore: update umami domain 2025-09-27 18:12:29 +01:00
Rotimi Best 2c3ee88e13 chore: move course analytics a step after content 2025-09-21 20:44:30 +01:00
Rotimi Best 6d68351a46 feat: end to end api type safety with redis rate limiting (#573)
* feat: support hono rpc

* add wrangler file

* update name of wrangler file

* add wrangler as a dependency

* add compatibility_flags

* trigger ci

* core: add health check to docker file

* expose port 80

* update custom healthcheck

* feat: implement openapi

* install dependencies in root

* debug yml

* update yml

* update port

* update dockerfile with envs

* completely move away from apiClient

* rename backend to api

* refactor: update server descriptions and comment out local spec saving

* update lock file

* use api.classroomio.com

* add support for redis

* fix: add missing line break in WelcomeModal.svelte

* refactor: remove wrangler configuration and update Vite config for API integration
2025-09-21 19:35:41 +01:00
Rotimi Best a6880f1b54 feat: implement percentage calculation utility and refactor analytics to use it
- Added `calcPercentageWithRounding` function for consistent percentage calculations with rounding.
- Updated course and user analytics to utilize the new utility for progress and average grade calculations.
- Removed redundant rounding logic from analytics functions.
2025-09-18 10:34:54 +01:00
Nwosu EmmanuelandRotimi Best ec3875bac2 feat: course analytics (#574)
* feat: added anaytics for the course page

* feat: Added pagination

* feat: cleanup

* feat: added translations

* feat: added fixes

* my improvements

---------

Co-authored-by: Rotimi Best <[email protected]>
2025-09-18 01:00:49 +01:00
Nwosu Emmanuel f3de6a063e feat: Trigger confirm warning for unsaved changes (#547)
* added the triger warning for the settings page

* all done

* added translation to the window message

* window issue now fixed
2025-09-16 09:21:41 +01:00
Rotimi Best caa48003af fix: include types 2025-09-15 19:15:50 +01:00
Rotimi Best fb0131de2d fix: load documents on client 2025-09-15 19:14:22 +01:00
Rotimi Best def5318c07 refactor: improve number rounding and handling in analytics calculations 2025-09-15 14:17:37 +01:00
Rotimi Best 7d150ea500 fix: ensure overall average grade defaults to 0 and adjust course image fallback 2025-09-10 21:23:36 +01:00