* feat: move community supabase request to api layer
* chore: pr review checkpoint
* chore: PR fixes
* feat: implement role-based authorization middleware and align the community features with the developer guide.
- Added role-based authorization middleware for organization and course membership checks, including `orgMemberMiddleware`, `orgTeamMemberMiddleware`, and `courseMemberMiddleware`.
- Introduced route-specific middleware for comment and question authorization, ensuring only authors or team members can modify content.
- Updated community routes to utilize the new middleware for enhanced security and access control.
- Refactored community services to streamline upvote functionality and improve error handling.
- Enhanced UI components for community interactions, including new comment and question pages, and improved state management for user actions.
- Updated documentation to reflect new middleware usage and best practices for authorization in the API layer.
* feat: enhance course and organization routes with middleware for improved access control
- Added `courseMemberMiddleware` to course download and clone routes to enforce membership checks.
- Updated lesson route to include `courseMemberMiddleware` for PDF downloads.
- Integrated `orgMemberMiddleware` into organization routes for team and audience access, ensuring only authorized members can retrieve data.
- Refactored lesson and organization routes for consistency and clarity in middleware usage.
* chore: streamline dashboard and API development scripts in package.json
- Consolidated dashboard and API development commands to include all relevant filters in a single line for improved clarity and ease of use.
- Removed redundant full command variants to simplify the script section.
---------
Co-authored-by: Rotimi Best <[email protected]>
* chore: fix storybook build
* chore: implement theming
* community list not showing properly
* refactor: migrate Chip component to @cio/ui/custom/chip
- Updated imports for the Chip component across multiple files to use the new location in the @cio/ui package.
- Replaced the previous Chip implementation with a new version that utilizes a Badge for better styling and functionality.
- Adjusted related components to ensure consistent usage of the updated Chip component.
* fix: align course sidebar design to match organization design (#611)
* fix: align course sidebar design to match organization design
* feat: add hideSearch prop to AppHeader and update sidebar layout
---------
Co-authored-by: Rotimi Best <[email protected]>
* refactor: replace PrimaryButton with Button component across multiple files
- Updated various components to use the new Button component from @cio/ui/base/button instead of the deprecated PrimaryButton.
- Ensured consistent button usage throughout the application for improved styling and functionality.
- Removed the PrimaryButton component and its associated constants from the codebase.
* refactor: standardize button and input usage across components
- Replaced instances of deprecated components such as TextField, TextArea, and IconButton with their updated counterparts (InputField, TextareaField, and updated IconButton).
- Ensured consistent event handling by changing `onClick` to `onclick` for better alignment with Svelte's event binding conventions.
- Removed unused components and streamlined imports to enhance code maintainability and readability.
* chore: themeing, course card, use $features
* refactor: centralize UI components and update modal implementations
- Refactored various components to centralize UI elements, improving discoverability and maintainability.
- Replaced deprecated modal components with the new Dialog component for consistent modal behavior across the application.
- Removed unused components and streamlined imports to enhance code clarity and reduce complexity.
* feat: add new documentation and refactor org and lms UI components
- Introduced new documentation files for Auth Flow, Breadcrumbs Refactoring, Page and Route Creation, and Route Page Setup to enhance developer onboarding and reference.
- Refactored various UI components, including the Course Sidebar and Lesson Modal, to improve layout and functionality.
- Removed deprecated components and streamlined imports for better maintainability.
- Updated translations across multiple languages to ensure consistency in user experience.
* refactor: update UI components and improve styling consistency
- Refactored various components to enhance styling consistency, including updates to button and text color classes.
- Removed deprecated components and streamlined imports for better maintainability.
- Replaced instances of PageBody with a more flexible Page component structure across multiple routes.
- Updated translations and UI elements to align with the new design system.
- Deleted unused components to reduce code complexity and improve clarity.
* update output.css
---------
Co-authored-by: Abdulmuizz Hamzat <[email protected]>
- 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.
- 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
* 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]>
* 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.
* 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 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.
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.
* 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
* 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]>
* 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
- 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.
* feat: Initial logic for the pdf upload
* feat: uploa logic, translations and ui flow complete
* chore:console log cleanup
* feat: fixed upload issue and added cancel upload button
* feat: fixing the download document ish
* feat: All done and ready for use
* feat: updated the document viewing logic
* feat: some minor refactor
* feat: added migration file
* fix: dark mode, translations, restyling,
---------
Co-authored-by: Rotimi Best <[email protected]>
* feat: setup secure presigned uploads and downloads
* clean up
* update lock
* Get presigned url finally working
* 557: Migrate backend to hono + ts
* chore: update Dockerfile and package.json for backend configuration
* add dev command
* remove unused packages
* Enhance backend API and frontend components for course management
- Updated CORS configuration in the backend to allow specific methods and headers.
- Refactored lesson download endpoint to use a new route for PDF downloads.
- Removed unused certificate download functionality from the lesson router.
- Updated frontend components to reflect changes in API endpoints and improve video upload functionality.
- Introduced new video upload component and adjusted video handling in lesson materials.
- Cleaned up unnecessary imports and optimized component structure for better performance.
* PR cleanups
* Enhance email configuration by adding SMTP_SENDER environment variable
- Updated docker-compose.yaml to include SMTP_SENDER.
- Modified Dockerfile to accept SMTP_SENDER as an argument.
- Updated environment schema in env.ts to define SMTP_SENDER as optional.
- Adjusted mail service to use SMTP_SENDER for the email 'from' field.
- Updated documentation to reflect the new SMTP_SENDER variable.
* Remove debug log statement from sendEmail function
---------
Co-authored-by: Iniubong Obonguko <[email protected]>