Commit Graph
100 Commits
Author SHA1 Message Date
Rotimi Best 2591dad3de chore: update vercel.json for new /docs routing and set base path in vite.config.ts and router.tsx 2025-12-21 21:44:57 +00:00
Rotimi Best b4e975bcd3 chore: remove '/docs' base path references from vite.config.ts and router.tsx 2025-12-21 21:38:19 +00:00
Rotimi Best 006322b7ca chore: add vercel.json for routing rewrites to external documentation and update base paths in vite.config.ts and router 2025-12-21 21:32:56 +00:00
Rotimi Best d12085917f chore: remove '/docs' base path references and update asset paths in layout 2025-12-21 21:23:31 +00:00
Rotimi Best 2086e8dfd3 chore: reset vercel.json to an empty configuration 2025-12-21 21:03:45 +00:00
Rotimi Best ead4593ad9 chore: update vercel.json and vite.config.ts for improved routing to /docs 2025-12-21 20:55:10 +00:00
Rotimi Best d410179a1f chore: update nitro configuration in vite.config.ts to use object syntax for proxy settings 2025-12-21 20:47:13 +00:00
Rotimi Best 3b0ed16a59 chore: add vercel.json for routing rewrites to ClassroomIO 2025-12-21 19:38:05 +00:00
Rotimi Best bcb8a4b295 chore: update .npmrc to set npm registry and remove vercel.json configuration 2025-12-21 19:26:07 +00:00
Rotimi Best 477ace9e2c chore: update nitro configuration in vite.config.ts to include proxy settings for routing 2025-12-21 19:00:09 +00:00
Rotimi Best 2ae49fdb28 chore: undo /docs rewrite 2025-12-21 18:39:54 +00:00
Rotimi Best ab772ca811 chore: simplify tanstackStart configuration in vite.config.ts 2025-12-21 18:20:24 +00:00
Rotimi Best 7e0bf2a5fc chore: add .npmrc and .nvmrc files for package management configuration 2025-12-21 13:20:41 +00:00
Rotimi Best ddee333dd3 chore: remove docs-v2 2025-12-21 12:40:11 +00:00
Rotimi Best 64cee7f3cd chore: update lock file 2025-12-21 12:39:42 +00:00
Rotimi Best cc04fba42e chore: rename docs-v2 to docs 2025-12-21 12:37:06 +00:00
Rotimi Best ac1a05f006 feat: move course analytics request to api 2025-12-05 11:20:12 +01:00
Rotimi Best 97d9e490b0 fix: update API endpoints and course marks page 2025-12-05 11:11:37 +01:00
Rotimi Best ac4fdf1dd3 feat: migrate client-side database calls to secure server-side API endpoints
- Create secure server-side API endpoints for course data, marks, exercises, newsfeeds, submissions, and organization management
- Implement role-based permission checking using checkUserCoursePermissions utility
- Move all client-side Supabase calls to authenticated server endpoints in /api/courses/ and /api/org/
- Add proper authentication and authorization middleware via hooks.server.ts
- Update service functions to use getAccessToken() for API authentication
- Ensure data filtering based on user roles (students only see their own data)
- Maintain backward compatibility with existing component interfaces
2025-12-05 10:48:01 +01:00
Rotimi Best bf614fd782 fix: update profile visibility policies to restrict access to user profiles 2025-12-05 06:07:39 +01:00
Rotimi Best 35b9afdde5 chore: remove public profile visibility policy for enhanced privacy 2025-12-05 05:54:42 +01:00
Rotimi Best ea93075bd5 fix: update content security policy to allow YouTube and refine source origins 2025-12-04 00:10:15 +01:00
Rotimi Best 964c036252 fix: enhance email verification protection by ensuring DOM manipulation only occurs in the browser 2025-12-04 00:00:48 +01:00
Rotimi Best 25d1a8d710 Security Release v0.2.6: Email Verification Bypass Vulnerabilities Fixed
Critical security fixes addressing email verification bypass vulnerabilities:

Security Issues Fixed:
- Email verification status manipulation through client-side profile updates
- Base64 token forgery allowing arbitrary email verification
- DOM manipulation bypasses of email verification modal

Backend Security Enhancements:
- Secure verification tokens table with cryptographic token generation
- RLS policies preventing direct email verification status changes
- Server-side validation functions with expiration and ownership checks
- Database triggers blocking unauthorized verification status updates
- IP address logging and audit trails for security monitoring

Frontend Security Protections:
- Multi-layered DOM protection preventing UI manipulation bypasses
- Continuous monitoring and re-application of interaction restrictions
- CSS-based backup protection even if JavaScript is disabled
- Mutation observer to protect dynamically added elements
- Enhanced CSP configuration for Senja widget support

API Security Updates:
- Secure token-based verification replacing insecure Base64 method
- Comprehensive error handling with security-focused user messages
- Token validation with signature verification and expiration checks
- Legacy verification method blocking with security warnings
- Enhanced verification email generation with secure tokens

Files Modified:
- Database: New email_verification_tokens table and security functions
- API: Secure verification endpoints with token validation
- Frontend: DOM protection and verification modal enhancements
- CSP: Updated Content Security Policy configuration
- Blog: Security advisory for CVE-2025-65675 disclosure

This release patches critical authentication bypass vulnerabilities and
implements defense-in-depth security measures across the entire platform.

Security researchers and users should upgrade immediately.
2025-12-03 15:33:04 +01:00
Rotimi Best 43e6cd611d chore: auto logout test emails. 2025-12-03 13:48:25 +01:00
Rotimi Best 900f5ec129 fix: critical SVG XSS vulnerability in file uploads
- Add comprehensive file type validation to prevent SVG uploads
- Update upload widgets to restrict file types at input level
- Enhanced HTML sanitization to block SVG tags and data URLs
- Create centralized file validation utilities with shared constants
- Add client-side and server-side protection against malicious uploads

Security Impact:
- Prevents stored XSS attacks through malicious SVG profile uploads
- Blocks execution of JavaScript embedded in SVG files
- Enforces whitelist of safe image formats (JPEG, PNG, GIF, WebP)
- Provides defense-in-depth protection across all upload components

Fixes reported vulnerability in profile image upload functionality.
2025-12-03 11:25:00 +01:00
Rotimi Best fb2ea885e1 chore: update translation 2025-12-03 10:59:08 +01:00
Rotimi Best 4ac242d918 fix: add PostHog domains to CSP connect-src
- Add https://*.i.posthog.com to both enforcement and reportOnly CSP
- Resolves CSP violations blocking PostHog source maps and assets
- Fixes blocked requests to recorder.js.map and surveys.js.map

This ensures PostHog analytics work properly without CSP violations.
2025-12-03 10:28:02 +01:00
Rotimi Best 9fe7691f8d fix: CSP configuration for API and media access
- Add https://api.classroomio.com to connect-src for API calls
- Add https://*.r2.cloudflarestorage.com for Cloudflare R2 storage
- Add media-src directive to allow video/document loading
- Fixes CSP violations blocking video downloads and API requests

Resolves CSP errors preventing presigned URL requests and media playback.
2025-12-03 10:10:08 +01:00
Rotimi Best 07ecfcf967 fix: authorization bypass vulnerabilities in plan-restricted features
- Add plan validation to custom domain saving (Domains.svelte)
- Add plan validation to certificate customization (Design.svelte)
- Add plan validation to document upload (AddDocumentToLesson.svelte)
- Add plan validation to video upload (UploadVideo.svelte)
- Enhance team member function validation (TeamMembers.svelte)

Prevents free users from bypassing UI restrictions via DOM manipulation.
All restricted functions now enforce server-side plan validation.
2025-12-03 10:01:50 +01:00
Rotimi Best 7014757ed5 fix: add PostHog and Umami analytics to CSP
- Added https://eu-assets.i.posthog.com for PostHog scripts
- Added https://eu.i.posthog.com for PostHog API calls
- Added https://umami.hz.oncws.com for Umami analytics
- Maintains XSS protection while enabling analytics
2025-12-03 09:44:31 +01:00
Rotimi Best 7b18c325da fix: cross site scripting with html content 2025-12-03 09:33:53 +01:00
Rotimi Best f2b719cd1b chore: more email validation 2025-12-03 07:31:35 +01:00
Rotimi Best 1e966aaf0f fix: redirect to 404 page after user closes welcome modal.
This is because when you close the modal we redirect you to /org/siteName/courses but if you click close before we get your organization siteName the route is just /courses which redirects to a 404.
2025-11-18 19:16:51 +01:00
Rotimi Best cc7868276a fix: use prebuilt carbon all.css without border 2025-11-18 14:40:10 +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 Best 2d7de6609c chore: split clean command into 2 (node_modules and pnpm) 2025-11-01 15:57:10 +01:00
Rotimi Best eb40b6dab6 fix: remove message from email verification response 2025-11-01 11:53:27 +01:00
Rotimi Best ba0fc32a87 chore: add a clean command 2025-11-01 11:25:32 +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
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
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 9c9f049917 chore: clean up docker-publish.yml by removing unused tag types 2025-10-11 14:41:47 +01:00
Rotimi Best 775e616d26 chore: update compose to use latest image 2025-10-11 14:33:26 +01:00
Rotimi Best 876a785b3c chore: pass port to cio-api 2025-10-11 14:26:14 +01:00
Rotimi Best f629aea625 chore: v0.1.12 add port to env for dashboard 2025-10-11 14:21:41 +01:00
Rotimi Best d6da36bec5 chore: update docker-compose to use version 0.1.11 for API and dashboard images 2025-10-11 14:08:57 +01:00
Rotimi Best 2a1db30916 chore: add port to start command in dashboard 2025-10-11 14:08:20 +01:00
Rotimi Best fcebabf1f0 chore: use v0.1.10 in compose 2025-10-11 14:04:40 +01:00
Rotimi Best 6a459b48f4 chore: use docker file for api 2025-10-11 13:51:14 +01:00
Rotimi Best 1275f4b7a5 chore: install pnpm global in railway config 2025-10-11 13:48:59 +01:00
Rotimi Best 884adecb63 chore: add install step for railway 2025-10-11 13:46:03 +01:00
Rotimi Best 2f98a5dca6 chore: remove port from start commands 2025-10-11 13:41:00 +01:00
Rotimi Best 41172d58b4 chore: add railway.json to api 2025-10-11 13:39:13 +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
Rotimi Best 9a7018eb34 chore: remove unused dependencies 2025-10-04 11:01:22 +01:00
Rotimi Best fd2e3f5d76 chore: clean up environment variable usage and formatting in configuration files
- Updated docker-compose.yaml to use double quotes for version and port mappings.
- Removed DEPLOYMENT_PROVIDER from global environment variables in turbo.json and Dockerfile.
- Adjusted dashboard build command in package.json to remove DEPLOYMENT_PROVIDER.
- Cleaned up .env.example by removing the DEPLOYMENT_PROVIDER comment.
- Simplified SvelteKit adapter condition in svelte.config.js.
2025-10-04 08:13:01 +01:00
Rotimi Best be9489a8e8 chore: add railway.json file 2025-10-04 08:01:50 +01:00
Rotimi Best 629753bcd0 chore: update docs of supabase instructions 2025-10-04 06:56:14 +01:00
Rotimi Best 3bbc5d0927 chore: vercel builds failing for dashboard and docs (#576)
* chore: improvements

* update README
2025-09-28 20:57:45 +01:00
Rotimi Best 51d30e27f0 chore: update docs 2025-09-28 20:09:22 +01:00
Rotimi Best 7e0443fc37 feat: add certificate and course HTML templates
- Introduced new HTML templates for certificate and course pages.
- The certificate template includes dynamic placeholders for student and course details.
- The course template features structured lesson notes and additional resources.
2025-09-28 19:54:50 +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
Rotimi Best bcd17dd0df feat: add unique constraint to lesson_completion table 2025-09-18 09:16:46 +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
Rotimi Best a078971064 fix: update loading state variable for input fields in invite page 2025-09-10 21:12:50 +01:00
Rotimi Best 01e9aa9700 chore: hide login fields if logged in user matches invite email 2025-09-10 21:01:17 +01:00
Rotimi Best f161e8dbfd debug: google auth + invite 2025-09-10 20:45:50 +01:00
Rotimi Best 98acd93133 fix: disable accept button if still fetching user details 2025-09-10 20:39:16 +01:00
Rotimi Best 47563410d8 fix: allow google invite user to accept invite 2025-09-10 20:05:37 +01:00
Rotimi Best f63b3021f6 feat: enhance AuthUI with redirectPathname prop for improved navigation 2025-09-10 18:49:50 +01:00
Rotimi Best 34a4e867bc debug: team member invite with google auth 2025-09-10 18:27:49 +01:00
Rotimi Best 06de8d44b8 chore: add orgname to org landing page header 2025-09-10 18:17:27 +01:00
Rotimi Best 8bafacb792 fix: remove loading state before adding group member 2025-09-10 17:26:22 +01:00
Rotimi Best f87a8beb17 chore: change node version to 20.19.3 2025-09-10 17:24:35 +01:00
Rotimi Best f60809a249 fix: only redirect in layout only if on redirect page 2025-09-10 17:18:01 +01:00
Rotimi Best 12c0f00007 debug: auth redirect 2025-09-10 16:50:31 +01:00
Rotimi Best b73f2cc150 debug: sign in with google 2025-09-10 16:35:47 +01:00
Rotimi Best 7a77bd6c79 chore: check permission only after org is loaded 2025-09-09 13:12:56 +01:00