Commit graph

7 commits

Author SHA1 Message Date
1b78e5425a **refactor: add async error handler utility and standardize route handlers**
### Changes:
- Introduced `asyncHandler` utility to simplify error handling in asynchronous route handlers.
- Updated all route definitions in `cloud-wrapper/src/routes.ts` to use the new `asyncHandler` wrapper:
  - Standardized error management across CRUD operations for nouns, verbs, and search functionality.
  - Replaced redundant `try-catch` blocks with the `asyncHandler` wrapper to streamline code.
- Added `NextFunction` and adjusted TypeScript typings for improved clarity and error handling.

### Purpose:
Refactored route handlers to enhance maintainability, readability, and consistency by centralizing asynchronous error handling with a reusable `asyncHandler` utility. This reduces redundancy and simplifies debugging for API routes.
2025-06-19 16:03:04 -07:00
c385f3fcff **chore: add package-lock.json for cloud-wrapper**
### Changes:
- Introduced `package-lock.json` file for the `cloud-wrapper` package.
- Includes configuration details for dependencies:
  - Runtime dependencies: `@soulcraft/brainy`, `cors`, `dotenv`, `express`, `helmet`, `morgan`, `uuid`, `ws`.
  - Development dependencies: TypeScript, nodemon, and type definitions for key libraries.
- Specifies supported Node.js version (`>=23.11.0`).

### Purpose:
Committed the `package-lock.json` to ensure consistency in dependency resolution during installation. This facilitates improved reliability across development and production environments.
2025-06-19 15:13:30 -07:00
487bfa473b **feat: enhance BrainyData storage configuration with support for custom S3 endpoints and extended types**
### Changes:
- Introduced `ExtendedBrainyDataConfig` interface to include `rootDirectory` in the storage configuration.
- Enhanced S3 storage setup:
  - Added support for `customS3Storage` when `S3_ENDPOINT` is provided.
  - Retained standard `s3Storage` configuration for AWS S3 without custom endpoints.
- Updated fallback logic for default storage types (`filesystem`, `memory`) with consistent handling for `rootDirectory`.
- Refined `initializeBrainy` function to improve readability and configuration extensibility.
- Updated TypeScript typings for improved clarity and maintainability.

### Purpose:
Improved the `initializeBrainy` function by extending storage configuration capabilities, allowing seamless integration of custom S3 endpoints alongside standard AWS S3 settings. Enhanced overall code readability and adaptability for diverse storage configurations.
2025-06-19 15:12:51 -07:00
126fe08379 **refactor: streamline initializeBrainy embedding configuration and cleanup code style**
### Changes:
- Removed conditional configuration for `USE_SIMPLE_EMBEDDING` as Universal Sentence Encoder is now the sole embedding option.
- Updated comments to reflect the exclusive use of TensorFlow.js for embedding functionality.
- Cleaned up unnecessary blank lines and whitespace for improved code readability.

### Purpose:
Simplified the `initializeBrainy` function by consolidating embedding configuration and eliminating outdated options. This refinement aligns with the project's transition to TensorFlow-based embeddings and improves code clarity.
2025-06-19 15:02:53 -07:00
0b7b3f947b chore: update README.md and docs with Brainy logo and enhanced formatting
Standardized documentation by adding a centered Brainy logo across README files, examples, and guides. Adjusted text formatting for consistency, improved alignment, and readability of feature descriptions and examples.
2025-06-11 08:49:30 -07:00
e00f1a92ce feat: add WebSocket API, REST API routes, and server setup for Brainy
Implemented a WebSocket API for real-time communication and REST API routes for CRUD operations on nouns and verbs. Added a server initialization script with WebSocket server integration and improved application structure with modularized routing and services.
2025-06-06 09:09:07 -07:00
6feab06f34 feat: add cloud deployment support and contribution guidelines
Introduced a cloud deployment wrapper for Brainy supporting AWS Lambda, Google Cloud Run, and Cloudflare Workers. Added configuration options, deployment scripts, and API reference. Updated `README.md` with contribution guidelines and cloud deployment documentation.
2025-06-06 09:08:33 -07:00