Skip to content

Revert "Migrates to use module federation for plugins"#62

Merged
elliotBraem merged 1 commit intomainfrom
revert-61-fix/docker-build-native-modules
Feb 24, 2025
Merged

Revert "Migrates to use module federation for plugins"#62
elliotBraem merged 1 commit intomainfrom
revert-61-fix/docker-build-native-modules

Conversation

@elliotBraem
Copy link
Copy Markdown
Collaborator

@elliotBraem elliotBraem commented Feb 24, 2025

Reverts #61

Summary by CodeRabbit

  • New Features

    • Introduced a GPT-based content transformation plugin for AI-enhanced formatting.
    • Simplified integrations, streamlining distribution to external platforms like Notion, RSS, and Telegram.
  • Refactor

    • Overhauled backend services and deployment processes for improved performance and modular setup.
    • Standardized database operations and plugin management for greater reliability.
  • Documentation

    • Updated configuration guides and documentation to reflect renamed plugins and new setup instructions.
  • Chores

    • Removed obsolete tests, utility files, and internal documentation to maintain a lean codebase.

@elliotBraem elliotBraem marked this pull request as ready for review February 24, 2025 18:37
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
curatedotfun-app 🔄 Building (Inspect) Visit Preview 💬 Add feedback Feb 24, 2025 6:37pm
curatedotfun-docs 🔄 Building (Inspect) Visit Preview 💬 Add feedback Feb 24, 2025 6:37pm
curatedotfun-landing 🔄 Building (Inspect) Visit Preview 💬 Add feedback Feb 24, 2025 6:37pm

@elliotBraem elliotBraem merged commit d70fb30 into main Feb 24, 2025
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 24, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The pull request encompasses a comprehensive refactoring of the backend and frontend build configurations, service implementations, and plugin architecture. The Dockerfile build process is simplified, dependencies are restructured, and several outdated tests and configuration files have been removed. Major updates include a switch to Bun for both building and database operations, new plugin integrations for content transformation and distribution, and a re-engineered server initialization using the Elysia framework. Documentation and configuration files have been updated accordingly.

Changes

File(s) Change Summary
Dockerfile Simplified build stages; changed AS to lowercase as; removed unnecessary build dependencies; adjusted file copying and environment variable settings.
backend/package.json Switched build and startup commands from rspack to bun; added "type": "module"; removed unneeded dependencies (e.g., @module-federation/node, concurrently, wait-on); added @libsql/client and downgraded dotenv.
backend/rspack.config.js, various test files, mocks, and processor/transform service files Removed RSPack config, outdated processor tests, transformation tests, and mocks; eliminated the PluginService and related utilities.
backend/src/external/* Added new plugin implementations: GPTTransformer (gpt-transform.ts), NotionPlugin (index.ts), RssPlugin (index.ts), SimpleTransformer (simple-transform.ts), and TelegramPlugin (telegram.ts).
backend/src/index.ts and related route files Re-engineered server bootstrap using the Elysia framework with a new async main() function; updated API routes, middleware setup, and static file serving.
backend/src/services/db/* and backend/src/services/db/queries.ts (and related operations) Migrated from BetterSQLite3Database to BunSQLiteDatabase; modified methods to synchronous calls with .run(); simplified error handling and query execution.
backend/src/services/distribution/* and backend/src/services/submissions/* Reworked the DistributionService for a plugin-centric distribution flow; replaced ProcessorService with DistributionService calls; added new methods for transforming and processing outputs.
backend/src/services/config/config.service.ts and backend/src/types/config.ts Streamlined configuration loading; removed plugin/feed-specific methods; updated configuration interfaces to enforce stricter types.
Documentation and frontend files (curate.config.json, docs, frontend/rsbuild.config.ts, package.json) Updated plugin names, URLs, and configuration examples; removed outdated documentation and sidebar entries; adjusted the frontend build config and start script.

Sequence Diagram(s)

sequenceDiagram
  participant User as Client
  participant Main as Application (Elysia)
  participant TS as TwitterService
  participant DS as DistributionService
  participant PL as Plugin Loader
  User->>Main: Send API Request
  Main->>TS: Initialize Twitter Service
  Main->>DS: Initialize Distribution Service
  DS->>PL: Load plugins (GPTTransformer, NotionPlugin, RSSPlugin, etc.)
  PL-->>DS: Return plugin instances
  Main->>User: Respond to API Request
Loading

Possibly related PRs

  • Adds notion for grantwire feed #40: The changes in the main PR, particularly the modifications to the NotionPlugin class and the configuration for the Notion integration, are directly related to the updates made in the retrieved PR, which also involves enhancements to the NotionPlugin and its configuration for distributing content.

Poem

I'm a bunny with a code-filled heart,
Hop, hop—new plugins playing their part.
Docker layers slimmed and services aligned,
Bun moves in sync, making every query refined.
With a twitch of my ear, I celebrate each refactored line!

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

elliotBraem added a commit that referenced this pull request Feb 27, 2025
* Migrates to use module federation for plugins (#61)

* Adds module federation support for distributor + transformer plugins (#55)

* adds memory bank and plugin loader

* adds plugin service

* wip

* working distributor plugins w/ module federation, some TOODs

* working, nice, clean plugin service

* fmt

* addresses comments

* set the correct remotes

* update memory bank and documentation

* implements transform plugins

* update memories

* fmt

* fmt

* fix docs for ai-transform

* fmt

* remove broken link

* fix docs

* fmt

* passing tests

* adds tests

* adds multi item error

* add necessary dependencies for better-sqlite-3

* remove libsql and copy over frontend dist

* install @libsql/client

* adds externals

* fmt

* use node for building

* convert to better-sqlite-3

* improve docker image

* fmt

* Revert "Migrates to use module federation for plugins (#61)" (#62)

This reverts commit 6c48325.

* Migrates plugins to use module federation (#63)

* Adds module federation support for distributor + transformer plugins (#55)

* adds memory bank and plugin loader

* adds plugin service

* wip

* working distributor plugins w/ module federation, some TOODs

* working, nice, clean plugin service

* fmt

* addresses comments

* set the correct remotes

* update memory bank and documentation

* implements transform plugins

* update memories

* fmt

* fmt

* fix docs for ai-transform

* fmt

* remove broken link

* fix docs

* fmt

* passing tests

* adds tests

* adds multi item error

* add necessary dependencies for better-sqlite-3

* remove libsql and copy over frontend dist

* install @libsql/client

* adds externals

* fmt

* use node for building

* convert to better-sqlite-3

* improve docker image

* fmt

* migrate to hono and node

* clean up

* nodemon

* fmt

* replace bun

* fix bun command

* fix npm command

* fix scripts

* npx

* correct command

* node module hoisting

* fix packages

* fmt

* package.json

* wip for good deploy

* fmt

* normalizes db async

* fmt

* fix dist

* working plugins

* fmt
@elliotBraem elliotBraem deleted the revert-61-fix/docker-build-native-modules branch March 6, 2025 03:37
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.

1 participant