Skip to content
CAI
Software that uses CAICheck a score

abinth11/TutorTrek

38.3

Weak · 21 September 2026

22.1k

lines of production code

TypeScript

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

TutorTrek is a full-stack educational platform connecting students, instructors, and administrators. The system facilitates course creation, enrollment, and interactive learning through features like quizzes, discussions, and video streaming. It supports role-based access for students, instructors, and admins, while handling payments via Stripe and authentication via Google OAuth. The architecture is containerized with Docker, using React for the frontend and Node.js for the backend, communicating through a structured API layer.

Features

Added Stripe payment endpoint functions

A new file, client/src/api/endpoints/payment/stripe.ts, was added to expose Stripe payment functionality. This file defines two exported functions, createStripePayment and getConfig, which call corresponding service methods to handle payment processing and configuration retrieval.

client/src/api/endpoints/payment · high confidence

Added TypeScript interfaces for API responses and authentication

New TypeScript interfaces have been introduced to define the structure of API responses and authentication data across the client application. This includes type definitions for admin, instructor, and student authentication flows (login and registration), as well as detailed response models for dashboards, lessons, categories, discussions, quizzes, and user profiles. These interfaces provide a consistent contract for the frontend to interact with the backend API, ensuring type safety for data such as course listings, instructor details, student information, and administrative dashboard metrics.

client/src/api/types · high confidence

Added TypeScript interfaces for course, lesson, and student data models

New TypeScript type definitions have been introduced to structure client-side data models. The \course.ts\ file defines \CourseInterface\ and \Media\ interfaces, providing a typed schema for course metadata, content, and media references. The \lesson.ts\ file introduces \FormValuesLesson\, \Question\, and \Option\ interfaces to handle lesson content, including quiz questions and multiple-choice options. Additionally, \student.ts\ adds the \StudentData\ interface to represent student registration and profile information. These changes improve type safety and developer experience when working with these entities in the client application.

client/src/types · high confidence

Added authentication use cases for admin, instructor, student, and token refresh

Introduced new authentication logic for four distinct user roles: admin, instructor, student, and a generic refresh token handler. Each role-specific file (adminAuth, instructorAuth, studentAuth) implements login and/or registration flows that validate credentials, generate access and refresh tokens, and persist the refresh token in the database. The studentAuth module also includes Google sign-in support, while instructorAuth handles profile picture and certificate uploads via a cloud service. The refreshToken module validates existing refresh tokens and issues new access tokens.

server/src/app/usecases/auth · high confidence

Added client-side validation schemas for authentication, user profiles, and content management

The application now enforces structured input validation using Yup schemas across multiple domains. Authentication flows for both instructors and students now include dedicated validation schemas for login and registration, with the latter enforcing mobile number formats and password matching. Content creation and management are also validated: course creation requires title, duration, category, level, tags, and syllabus; lesson editing requires title, description, and contents; and password updates require current and new passwords to match. Additionally, category and quiz question validations are now enforced on the client side.

client/src/validations · high confidence

Added static assets for the TutorTrek app

Added the core static files for the client application: an HTML entry point with the 'TutorTrek' title and a Tailwind CSS background class, a PWA manifest defining the app name, icons, and theme colors, and a robots.txt file to control search engine indexing.

client/public · high confidence

Added utility functions for API errors, JWT decoding, and data formatting

The client now includes new utility modules to support core application features. A CustomApiError class was added to handle and inspect API error responses. A JWT decoding utility was introduced to parse and validate authentication tokens. Additionally, helper functions were added to format dates, capitalize strings, format currency in INR, and display elapsed time in a human-readable format.

client/src/utils · high confidence

Adds common UI components and page templates to the client

The client application now includes a suite of reusable UI components and page templates, including a breadcrumb navigation, error and offline state displays, a search bar with suggestions, and modals for login confirmation, session expiration, and logout. Additionally, new page templates for About Us and Course creation/editing (including media and description forms) have been added to support the platform's core functionality.

client/src/components · high confidence

Admin dashboard data fetching logic

Added the usecase layer for fetching admin dashboard data, including total counts for courses, instructors, and students, monthly revenue, and detailed graph data such as trending courses, revenue per month, and course enrollment statistics.

server/src/app/usecases/admin · high confidence

Centralized API endpoint and static asset constants

The application now uses dedicated constant files to manage API routes and static resources. The \endpoints.ts\ file defines a comprehensive set of API paths for authentication (student, instructor, admin, Google login), course and lesson management, discussion forums, payments, and user profiles. Additionally, \common.ts\ centralizes static assets, including a Google client ID, redirect URI, and default avatar/logo URLs.

client/src/constants · high confidence

Client app bootstrapped with Docker, Tailwind CSS, and TypeScript

The client application has been initialized with a complete build and deployment configuration. A Dockerfile is provided to build the React app using Node 16 and serve it via Nginx, while a .dockerignore file optimizes the build context. Tailwind CSS is integrated via postcss and tailwind config files, establishing a custom design system with specific color palettes and font families. Additionally, the project is configured with TypeScript (tsconfig.json) to enforce strict type checking, and environment variables for Google Auth, redirect URIs, and Stripe are templated in .env.example.

client · high confidence

Establish Redux store with persistence and modular slices

The application now uses a centralized Redux store configured with multiple feature-specific slices (auth, course, student, instructor, helper) and integrates redux-persist to preserve state across app refreshes. This ensures that critical user data is retained locally, preventing data loss when the application is reloaded.

client/src/redux · high confidence

Initial client application structure and routing setup

The client application is initialized with a new entry point (index.tsx) that configures global providers for state management (Redux, Redux-Persist), UI styling (Tailwind, Material Tailwind), and authentication (Google OAuth). The App component defines distinct layout wrappers for Student, Instructor, and Admin user types, each featuring side navigation, headers, and offline detection. Routing is established via react-router-dom with lazy-loaded components for all major pages, including student dashboards, course/lesson management, instructor profiles, and admin panels.

client/src · high confidence

New API endpoint files for course, lesson, quiz, and discussion features

The client-side API layer has been restructured into dedicated endpoint files for authentication, course management, lessons, quizzes, and discussions. New endpoints have been added to support fetching recommended and trending courses, searching and filtering courses, enrolling students, and managing course content including lessons, quizzes, and discussion threads. This change introduces the necessary client-side API calls to support these features.

client/src/api/endpoints/course · high confidence

New API endpoint modules for admin and user management

The application now exposes dedicated API endpoint modules for managing categories, contacts, dashboard data, instructors, and students. This includes functions for creating, retrieving, and editing categories; submitting contact responses; fetching dashboard and graph data; managing instructor requests and profiles; and handling student blocking and profile updates.

client/src/api/endpoints · high confidence

New API service layer for authentication, courses, and user management

The client now includes a comprehensive set of new API service files that encapsulate HTTP requests for authentication (admin, instructor, student, and token refresh), course management (add, edit, retrieve, enroll, search), discussion forums, lessons, quizzes, payments (Stripe), and user management (instructors and students). These services standardize how the frontend communicates with the backend, supporting features like login, registration, profile updates, and course enrollment.

client/src/api/services · high confidence

New React hooks for API calls, pagination, search, and more

Added several new React hooks in the client hooks directory to enhance frontend functionality. These include useApiData for managing API call states, useIsOnline for tracking network connectivity, usePagination for handling list pagination, usePreventBackButton to manage browser history navigation, useScroll for header visibility on scroll, useSearch for debounced client-side filtering, and useTimeAgo for relative time formatting.

client/src/hooks · high confidence

New Redux slices for authentication, course, helper, instructor, and student state management

Added new Redux slices to manage application state for authentication, courses, UI helpers, and user roles (instructor/student). The auth slice handles token storage and login status, while the student slice introduces async thunks to fetch and manage student data, including loading and error states. New slices for courses, helpers, and instructors provide structured state management for these domains.

client/src/redux/reducers · high confidence

New server-side controllers and repository layer for authentication, course, and user management

The server's \src\ directory now includes a comprehensive set of new controller files (\adminController\, \authController\, \categoryController\, \courseController\, \instructorController\, \paymentController\, \refreshTokenController\, \studentController\, and \videoStreamController\) that implement the API endpoints for the application. These controllers are supported by a new repository layer in \src/app/repositories\ (e.g., \adminDbRepository\, \studentDbRepository\, \courseDbRepository\) which abstracts database interactions. Additionally, the main application entry point (\app.ts\) has been updated to wire up these routes, connect to MongoDB and Redis, and configure the Socket.IO server. This change introduces the core backend logic for user registration, login, course management, and payment processing.

server/src · high confidence

Project initialization with full-stack Docker deployment and documentation

The repository was initialized with a complete project structure, including a docker-compose.yml file that defines services for the client, server, Redis, and Nginx (as a load balancer). Documentation files (CONTRIBUTING.md, LICENSE, and an updated README.md) were added to guide contributors and explain the technology stack (React, Node.js, MongoDB, Redis). The .gitignore file was updated to reflect the new directory structure and exclude generated files.

(repo-wide) · high confidence

Behavioural changes

Nginx configuration for tutortrek.online added

A new Nginx configuration file (conf.d/tutortrek.online.conf) was added to serve the tutortrek.online domain. The configuration sets up HTTP to HTTPS redirection, serves static files, and proxies API requests to a backend server on port 4000. It also includes SSL certificate paths and security headers.

conf.d · high confidence

Removal of environment-specific configuration files

The environment-specific configuration files for development, production, and test environments have been removed from the server. This change eliminates the local environment variable definitions for server ports, host settings, logging modes, and authentication secrets, which will require a new method for managing these configurations.

server/env · high confidence

Separation of general and protected API interceptors

The client-side API layer has been refactored to separate general error handling from protected route logic. A new \interceptor.ts\ file now handles standard HTTP error mapping (400, 401, 404, 409) for all requests. A new \protected-interceptor.ts\ file manages authenticated requests, automatically attaching access tokens to headers and implementing a token refresh mechanism for 401 errors, while also handling session expiration for 403 errors.

client/src/api/middlewares · high confidence

Server build and configuration refactored for Docker and modern tooling

The server's build and development environment has been restructured to support Dockerization and modern code quality tools. A new Dockerfile and .dockerignore file were added to containerize the Node.js 18 application. Configuration files were updated to use ESLint and Prettier for code formatting and linting, replacing the previous TypeScript-specific ESLint setup. Additionally, the TypeScript configuration was updated to change the output directory from 'dist' to 'build' and removed the separate 'build.ts' script, streamlining the build process.

server · high confidence

Test coverage

Removed server-side test suite and configuration

The entire \server/spec\ directory has been removed, including the Jasmine test runner (\index.ts\), configuration files (\nodemon.json\, \jasmine.json\), type definitions (\support/types.ts\, \types/supertest/index.d.ts\), and the \users.spec.ts\ test file. This eliminates the server-side unit and integration tests for the user routes.

server/spec · high confidence

Dependencies

Initial project setup with client and server dependencies

The project's client and server directories are now fully configured with their respective package manifests and lockfiles. The client (client/package.json) introduces a React-based frontend stack including Redux, React Router, Stripe integration, and various UI and testing libraries. The server (server/package.json) establishes a Node.js backend using Express, MongoDB, Socket.io, AWS SDK for S3/CloudFront, and authentication libraries like bcrypt and jsonwebtoken. These changes provide the foundational dependencies required to build and run the application's client and server components.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 40 → 38 (-1.3)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 81 → 78 (-2.9)
  • Architecture 85 → 87 (+2.1)
  • Maturity 57 → 53 (-4.3)
  • Readiness 20 → 20 (+0.2)
  • Security 77 → 73 (-4.1)
  • Accessibility 40 → 42 (+1.4)

Resolved (57)

  • Boundary-crossing change coupling: listCourse.ts ↔ courseReposMongoDb.ts (server/src/app/usecases/course/listCourse.ts)
  • Critical CVE: [GHSA redacted] (client/yarn.lock)
  • Critical CVE: [GHSA redacted] (client/yarn.lock)
  • Critical CVE: [GHSA redacted] (client/yarn.lock)
  • Critical CVE: [GHSA redacted] (client/yarn.lock)
  • Critical CVE: [GHSA redacted] (server/yarn.lock)
  • Critical CVE: [GHSA redacted] (server/yarn.lock)
  • Critical CVE: [GHSA redacted] (client/yarn.lock)
  • Critical CVE: [GHSA redacted] (client/yarn.lock)
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • High CVE: [GHSA redacted] (client/yarn.lock)
  • High CVE: [GHSA redacted] (client/yarn.lock)
  • High CVE: [GHSA redacted] (client/yarn.lock)
  • High CVE: [GHSA redacted] (client/yarn.lock)
  • High CVE: [GHSA redacted] (client/yarn.lock)
  • High CVE: [GHSA redacted] (server/yarn.lock)
  • High CVE: [GHSA redacted] (client/yarn.lock)
  • High CVE: [GHSA redacted] (client/yarn.lock)
  • High CVE: [GHSA redacted] (client/yarn.lock)
  • High CVE: [GHSA redacted] (client/yarn.lock)
  • …and 37 more

New (236)

  • Change coupling: App.tsx ↔ tailwind.config.js (client/src/App.tsx)
  • Change coupling: common.ts ↔ endpoints.ts (client/src/constants/common.ts)
  • Change coupling: course.ts ↔ course.ts (server/src/frameworks/database/mongodb/models/course.ts)
  • Change coupling: student-auth-services.ts ↔ google-auth-component.tsx (client/src/api/services/auth/student-auth-services.ts)
  • Change-coupling hub: course-service.ts → endpoints.ts, courseController.ts, course.ts, course.ts (client/src/api/services/course/course-service.ts)
  • Change-coupling hub: course.ts → courseController.ts, course.ts, course.ts (client/src/api/endpoints/course/course.ts)
  • Change-coupling hub: student-login-page.tsx → student-auth-services.ts, student-registration-page.tsx, student-header.tsx (client/src/components/pages/students/student-login-page.tsx)
  • Critical CVE: [GHSA redacted] (client/yarn.lock)
  • Critical CVE: [GHSA redacted] (client/yarn.lock)
  • Critical CVE: [GHSA redacted] (client/yarn.lock)
  • Critical CVE: [GHSA redacted] (client/yarn.lock)
  • Critical CVE: [GHSA redacted] (server/yarn.lock)
  • Critical CVE: [GHSA redacted] (server/yarn.lock)
  • Critical CVE: [GHSA redacted] (client/yarn.lock)
  • Critical CVE: [GHSA redacted] (client/yarn.lock)
  • FileTooLong: instructors/instructor-register-page.tsx (client/src/components/pages/instructors/instructor-register-page.tsx)
  • FunctionTooLong: add-course-form.CombinedForm (client/src/components/pages/add-course/add-course-form.tsx)
  • FunctionTooLong: add-lessons-form.AddLessonForm (client/src/components/pages/add-lesson/add-lessons-form.tsx)
  • FunctionTooLong: admin-login-page.AdminLoginPage (client/src/components/pages/admin/admin-login-page.tsx)
  • FunctionTooLong: authController.authController (server/src/adapters/controllers/authController.ts)
  • …and 216 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

abinth11/TutorTrek was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 5a008fc189922878514d9732a0ffee67b78a9103 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-b84573e22831.