Skip to content

Conversation

@abhishek-nexgen-dev
Copy link
Collaborator

Description

  • Add File System Utils Class for Backend

Related Issue

Fixes #134

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Other

Checklist

  • My code follows the project’s style guidelines.
  • I have tested my changes locally.
  • I have updated documentation (if applicable).

Additional Notes

Add anything else reviewers should know.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a comprehensive File System Utils Class for the TypeScript backend, providing utilities for reading various file formats including CSV, XLSX, PDF, and DOCX files with LangChain integration.

Key changes include:

  • Added FileSystemUtility class with methods for file operations and format-specific readers
  • Added type definitions for file system operations
  • Updated code formatting and removed trailing whitespace across multiple files

Reviewed Changes

Copilot reviewed 11 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
templates/mern/Ts-Backend/src/utils/FileSystem.utility.ts New utility class with comprehensive file system operations and document processing
templates/mern/Ts-Backend/src/type/FileSystem.type.ts Type definitions for document and row interfaces
templates/mern/Ts-Backend/package.json Added dependencies for LangChain, xlsx, csv-parser, and pdf-parse
templates/mern/Ts-Backend/src/validator/env.validator.ts Code formatting improvements (quote consistency and line breaks)
templates/mern/Ts-Backend/src/utils/SendResponse.utils.ts Code formatting improvements for better readability
Multiple config/source files Removed trailing whitespace and empty lines

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +102 to +104
const firstSheet = sheetNames[0]
? workbook.Sheets[sheetNames[0]]
: undefined;
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The conditional assignment can be simplified using optional chaining and nullish coalescing for better readability: const firstSheet = workbook.Sheets[sheetNames[0]];

Suggested change
const firstSheet = sheetNames[0]
? workbook.Sheets[sheetNames[0]]
: undefined;
const firstSheet = workbook.Sheets?.[sheetNames[0]] ?? undefined;

Copilot uses AI. Check for mistakes.
@abhishek-nexgen-dev
Copy link
Collaborator Author

@JoeCelaster

@JoeCelaster
Copy link
Member

@abhishek-nexgen-dev , Yeah will see to it. Pls take a look on #149 , #148 .

@abhishek-nexgen-dev
Copy link
Collaborator Author

@abhishek-nexgen-dev , Yeah will see to it. Pls take a look on #149 , #148 .

@JoeCelaster okay

@JoeCelaster
Copy link
Member

@abhishek-nexgen-dev , Pls make sure the backend runs properly after selecting typescript as preffered language. Add a sample video of working !. Once done we can merge !

Copy link
Member

@JoeCelaster JoeCelaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abhishek-nexgen-dev , Pls make sure the backend runs properly after selecting typescript as preffered language. Add a sample video of working !. Once done we can merge !

@abhishek-nexgen-dev
Copy link
Collaborator Author

@abhishek-nexgen-dev , Pls make sure the backend runs properly after selecting typescript as preffered language. Add a sample video of working !. Once done we can merge !

Working on it

@abhishek-nexgen-dev
Copy link
Collaborator Author

@JoeCelaster Bro when you Review it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Logging, Rate Limiting, File Utils, Notifications, and Auth with Role-Based Access

3 participants