Skip to content

Dev#91

Merged
felix-schultz merged 50 commits intomainfrom
dev
Jun 19, 2025
Merged

Dev#91
felix-schultz merged 50 commits intomainfrom
dev

Conversation

@felix-schultz
Copy link
Copy Markdown
Member

This pull request introduces significant changes to the backend architecture, focusing on modularizing the backend into separate AWS Lambda-based services, updating configuration files, and enhancing build workflows. Below is a summary of the key changes:

Backend Modularization and Service Additions:

  • Refactored the backend structure in Cargo.toml to include new AWS Lambda services (aws/api, aws/media-transformer, aws/runtime, aws/runtime-async) and their dependencies. Added workspace dependencies for shared components like flow-like-* libraries.
  • Removed the old monolithic backend configuration (apps/backend/Cargo.toml) and replaced it with modularized services, each with its own Cargo.toml and implementation files. [1] [2] [3] [4] [5]

New AWS Lambda Services:

  1. AWS API Service (aws/api):
    • Added a new Lambda service for handling API requests, including S3 integration, catalog management, and Sentry for error tracking. [1] [2]
  2. Media Transformer (aws/media-transformer):
    • Implemented an S3-triggered Lambda function for processing media files (e.g., resizing images and converting to WebP format). [1] [2] [3]
  3. Runtime Services (aws/runtime and aws/runtime-async):
    • Added runtime services for handling generic Lambda executions, including SQS event processing (runtime-async) and HTTP-based APIs (runtime). [1] [2] [3] [4] [5]

Build and Workflow Enhancements:

  • Updated .github/workflows/alpha-release.yml to include platform-specific Tauri configuration files for macOS, Linux, and Windows builds.
  • Removed redundant checks for llamafile in the setup-environment GitHub Action to streamline the CI process.

Configuration and Ignore File Updates:

  • Updated .dockerignore to include additional directories and files like .github, .env, and .vscode to streamline Docker builds.
  • Removed environment-specific .env files and hub.config.json from apps/backend/.gitignore to align with the new modularized structure.

These changes collectively improve the scalability, maintainability, and deployment flexibility of the backend by leveraging AWS Lambda services and enhancing build processes.

felix-schultz and others added 30 commits May 23, 2025 23:13
- Updated `template.rs` and `user.rs` entities to include new fields and relations.
- Added JWT middleware for handling authentication in `jwt.rs`.
- Enhanced the main application to include CORS and compression layers.
- Introduced a new `DesktopAuthProvider` for handling OpenID authentication in the desktop app.
- Created a new API utility module for handling requests in the desktop app.
- Updated package dependencies for OIDC and improved API integration.
- Refactored state management to include token validation and JWKS handling.
- Added OpenID configuration endpoint to the authentication routes.
- Improved error handling and response structures across various modules.
- Api logic into separate package
- Created AWS Credential Management for the Runtime
- Implemented the first /app endpoints (upsert_app, delete, list_apps)
- Added `get_boards` endpoint to retrieve boards for a specific app.
- Introduced `upsert_board` endpoint for creating or updating boards.
- Created `version_board` endpoint to manage board versions.
- Implemented `get_nodes` endpoint to fetch nodes.
- Added `search_bits` and `get_bit` endpoints for bit management.
- Introduced `upsert_bit` and `delete_bit` endpoints for bit creation and deletion.
- Enhanced template management with `get_template`, `delete_template`, and `upsert_template` endpoints.
- Updated state management to support scoped board and template retrieval.
- Refactored bit metadata structure to include additional fields like icon and thumbnail.
- Updated protobuf definitions to reflect changes in bit metadata.
…node commands

feat(schema): introduce bit-search-query schema for searching bits with limit and offset

feat(schema): enhance hub schema with new properties including authentication and features

feat(schema): update profile schema to include interests, tags, and apps with new definitions

fix(types): update build script to compile metadata.proto instead of bit.proto

feat(app): add AppCategory enum and update App message structure

refactor(bit): remove Meta message and replace with Metadata in bit schema

feat(metadata): create new metadata.proto for detailed app metadata structure

feat(ui): implement global and role permission classes for permission management

feat(ui): update app schema to include templates and remove deprecated meta structure

feat(ui): enhance bit schema with new metadata fields and system time interface

feat(ui): add move-node command to include current_layer property

feat(ui): create bit-search-query interface for bit search functionality

feat(ui): expand hub interface with authentication and contact details

refactor(ui): update index schema to reflect changes in bit and app schemas

feat(profile): enhance profile schema with new settings and connection modes

feat(time): add utility function to get current system time in ISystemTime format

fix(state): update backend state interface to include new app and bit search functionalities
- Cleaned up imports and improved code formatting in `bit.rs` and `profiles.rs`.
- Updated `lib.rs` to include the HTTP plugin for enhanced functionality.
- Modified `bun.lock` to include new dependencies and updated versions.
- Enhanced API routes in `lib.rs` and `routes.rs` to support language parameters.
- Implemented new metadata handling in `bit.rs` to manage bit metadata more effectively.
- Added `push_meta` route to handle metadata updates for bits.
- Improved `search_bits` functionality to filter results based on language.
- Created a new `Slider` component in the UI for better user interaction.
- Updated package dependencies in `package.json` and `schema/index.ts` for better type management.
…ile template

- Implemented `GET /admin/profiles/media` to generate signed URLs for profile images.
- Added `PUT /admin/profiles/{profile_id}` to upsert profile templates, allowing for both creation and updates.

refactor(bit): clean up bit routes and improve metadata handling

- Removed unused delete and upsert routes from bit module.
- Enhanced metadata handling in bit retrieval and search functions.

fix(ui): improve BitCard component and add type icons

- Updated BitCard to handle missing metadata gracefully.
- Introduced TypeToIcon component to display icons based on bit types.

style: standardize code formatting and clean up imports

- Reformatted code for consistency and readability across various files.
- Removed unnecessary imports and added missing ones where applicable.

chore: update protobuf and schema generation

- Adjusted protobuf module imports and metadata handling.
- Improved schema generation for better type definitions.
- Updated `get_apps` to include language filtering and metadata retrieval.
- Introduced `search_apps` endpoint for searching apps with various filters and sorting options.
- Modified `upsert_app` to handle app visibility and status updates.
- Refactored app metadata handling in `search_bits` and `get_bit` routes.
- Added new enums for AppStatus and AppVisibility to improve app state management.
- Updated protobuf definitions to include new fields for app metadata and status.
- Enhanced app schema generation to reflect recent changes in app structure.
- Improved test data for embedding bits to align with new app metadata structure.
…and adjust state handling

feat(auth): integrate TauriBackend for authentication context management
feat(tauri): enhance TauriBackend to manage authentication context
feat(api): implement caching for profile templates retrieval
feat(core): refactor Hub methods to construct URLs and improve profile fetching
fix(http): log response details for better debugging
- Implemented AppCard component with extended and small variants.
- Added star rating display and visibility indicators for apps.
- Integrated metadata handling for app icons and descriptions.
- Enhanced UI with hover effects and responsive design.

feat: refactor BitCard component for improved UI/UX

- Converted BitCard to use Card and CardContent components for better structure.
- Added hover effects and action buttons for user interactions.
- Improved layout with dynamic visibility of action buttons.
- Enhanced type indicators and installed status display.

fix: update BitHover component for better data handling

- Refactored BitHover to use useCallback for fetching size.
- Improved layout and styling for better user experience.
- Added language badges and file size display.

feat: add app search query schema

- Introduced IAppSearchQuery interface for app search functionality.
- Defined IAppCategory and IAppSearchSort enums for categorization and sorting.

feat: extend app schema with additional properties

- Added avg_rating, download_count, and visibility properties to IApp interface.
- Introduced IAppStatus and IAppVisibility enums for app state management.

feat: enhance backend state management

- Added updateApp method to IBackendState interface for app updates.
- Improved download manager to check backend capabilities before downloading.

fix: minor adjustments in profile schema and download manager
- Removed the base64FilesToString function and adjusted the send function to directly pass images as an array.
- Added a link to the AI Playground in the main application page.
- Updated package.json scripts for better Windows and Linux support.
- Added multiple binary files for Linux and Windows ARM/x64 architectures.
- Removed obsolete Linux configuration and added new configurations for Linux x64 and Windows ARM/x64.
- Enhanced the AI invoke function to handle images more effectively by introducing a new Content structure.
- Updated local model to include health check functionality and improved server startup logic.
- Refactored history message handling to support new image URL structure and optimized image processing.
…ty and maintainability

- Refactored JSX structure in AppCard for consistent formatting and indentation.
- Enhanced conditional rendering for visibility and price badges in AppCard.
- Updated BitCard to streamline the layout and improve hover effects.
- Organized imports in BitCard for clarity and removed unused imports.
- Improved action button visibility and functionality in BitCard.
- Added gradient overlay for visual appeal in BitCard.
- Introduced EventCard and EventForm components for displaying and managing events.
- Implemented EventTypeConfig for configuring event-specific settings.
- Added new interfaces for event payloads (IEventPayload, IEventPayloadChat, IEventPayloadMail, IEventPayloadAPI).
- Updated IApp interface to include events array.
- Enhanced backend state management with event-related methods (getEvent, getEvents, upsertEvent, deleteEvent).
- Created new event schema (IEvent, ICanaryEvent) for better event structure.
- Updated global styles for improved UI consistency.
- Refactored existing components to support new event features and ensure compatibility.
feature / extended onnx inference
…onfiguration UI, and implement chat interface
felix-schultz and others added 20 commits June 15, 2025 11:43
- Added FileManagerDialog component for managing file uploads with a hierarchical view.
- Introduced MessageComponent for displaying chat messages with user and bot differentiation.
- Created ChatWelcome component to provide a welcoming interface with example prompts and fuzzy search functionality.
- Updated interfaces and payload schemas to support new features such as voice input/output and example messages.
- Enhanced index exports to include new components and types.
- Added `attachment.tsx` to manage file attachments, including conversion to attachment format and rendering previews.
- Introduced `chat-db.ts` to define message and attachment types, utilizing Dexie for local storage.
- Updated `chat.tsx` to support new message structure and manage local message state.
- Refactored `chatbox.tsx` to use a new `ISendMessageFunction` type for sending messages with attachments.
- Enhanced `message.tsx` to display attachments with appropriate previews and handling for different file types.
- Implemented fullscreen viewing for images and files in messages.
- Modified `welcome.tsx` to align with new message sending structure.
- Updated `backend-state.ts` to include a method for converting files to URLs.
… system

- Added `ISession` interface for session tracking in chat.
- Updated `IMessage` interface to include rating and rating settings.
- Introduced `ChatHistory` component for managing chat sessions with search and delete functionality.
- Enhanced `MessageComponent` to support user feedback with thumbs up/down and additional feedback dialog.
- Implemented `Container` component for responsive sidebar management.
- Created `Header` component for event selection and toolbar actions.
- Added `useSetQueryParams` hook for managing query parameters in navigation.
- Updated backend state interface to include `upsertEventFeedback` method for handling feedback submissions.
- Introduced EVENT_CONFIG to manage event mappings for chat, mail, API, and simple actions.
- Created configuration interfaces for SimpleChat, UserMail, API, and Webhook.
- Updated ChatInterface to support memoization and improved loading states for messages.
- Enhanced event form to handle dynamic event types and configurations based on selected nodes.
- Refactored interfaces to include new configuration props and types for better type safety.
feat: add event configuration for chat, mail, API, and webhooks
feat: add GlobalAnchorHandler for multi window usage component and en…
- Updated capabilities.json to include window-state permissions.
- Enhanced desktop-schema.json and macOS-schema.json with new window state permissions and descriptions.
- Integrated window state plugin in lib.rs for better window management.
- Added @tauri-apps/plugin-window-state dependency in bun.lock.
- Updated versions of several dependencies in Cargo.lock, including:
  - aws-config to 1.8.0
  - aws-runtime to 1.5.8
  - aws-sdk-sso to 1.73.0
  - aws-sdk-ssooidc to 1.74.0
  - aws-sdk-sts to 1.75.0
  - aws-sigv4 to 1.3.3
  - aws-smithy-eventstream to 0.60.9
  - aws-smithy-json to 0.61.4
  - aws-smithy-runtime-api to 1.8.1
  - aws-smithy-types to 1.3.2
  - aws-smithy-xml to 0.60.10
  - aws_lambda_events to 0.16.1
  - jiff to 0.2.15
  - lambda_runtime to 0.14.2
  - sea-orm to 1.1.12
  - tower-http to 0.6.6
  - Updated Windows dependencies to version 0.61.3

- Added new binary files for Windows in the tauri application:
  - ggml-base.dll
  - ggml-cpu-alderlake.dll
  - ggml-cpu-haswell.dll
  - ggml-cpu-icelake.dll
  - ggml-cpu-sandybridge.dll
  - ggml-cpu-sapphirerapids.dll
  - ggml-cpu-skylakex.dll
  - ggml-cpu-sse42.dll
  - ggml-cpu-x64.dll
  - ggml-rpc.dll
  - ggml-vulkan.dll
  - ggml.dll
  - libcurl-x64.dll
  - libomp140.x86_64.dll
  - llama-server-x86_64-pc-windows-msvc.exe
  - llama.dll
  - mtmd.dll

- Updated tauri configuration to include new binaries and resources.
- Added new permission sets and descriptions in the windows schema.
@felix-schultz felix-schultz merged commit 35e4685 into main Jun 19, 2025
3 of 12 checks passed
@deepsource-io
Copy link
Copy Markdown

deepsource-io bot commented Jun 19, 2025

Here's the code health analysis summary for commits 47181ef..8c5f106. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Docker LogoDocker✅ Success
🎯 12 occurences resolved
View Check ↗
DeepSource Rust LogoRust❌ Failure
❗ 492 occurences introduced
🎯 287 occurences resolved
View Check ↗
DeepSource JavaScript LogoJavaScript❌ Failure
❗ 993 occurences introduced
🎯 164 occurences resolved
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

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.

2 participants