Repost on my Socials
RomS is a Node.js tool to download content from social platforms (Instagram, TikTok, YouTube, generic media) and re-upload it to multiple destinations (Instagram, TikTok, YouTube, Telegram channels/groups).
RomS is designed for modularity and extensibility, leveraging several classic software design patterns:
- Where:
downloader/src/downloaderStrategy.js(DownloaderContext)uploader/src/uploaderFactory.js(UploaderFactory)
- Why:
Allows dynamic selection of the download/upload strategy at runtime based on the platform (Instagram, TikTok, YouTube, etc.). - How:
Each platform has its own strategy class implementing a common interface (download(url)orupload(url, data)).
- Where:
- Why:
Centralizes the creation of uploader instances for different platforms. - How:
The factory returns the correct uploader strategy based on a string identifier.
- Where:
uploader/src/uploaderBase.js(CompositeUploader)
- Why:
Enables uploading to multiple platforms in parallel as a single operation. - How:
The composite uploader aggregates multiple platform uploaders and manages their execution and result aggregation.
- Where:
uploader/src/uploaderBase.js(UploaderComponent)
- Why:
Provides a base class with a default workflow for uploaders, allowing subclasses to override specific steps.
-
Downloader:
downloader/src/downloader.js: Main entry point for downloading content.- Platform strategies:
downloader/src/downloader-IG.js(InstagramDownloader)downloader/src/downloader-TT.js(TikTokDownloader)downloader/src/downloader-YT.js(YoutubeDownloader)downloader/src/downloader-Media.js(MediaDownloader)
-
Uploader:
uploader/src/uploader.js: Main entry point for uploading content.- Platform strategies:
uploader/src/uploader-IG.js(InstagramUploader)uploader/src/uploader-TT.js(TikTokUploader)uploader/src/uploader-YT.js(YoutubeUploader)uploader/src/uploader-TG.js(TelegramChannelUploader,TelegramGroupUploader)
-
Install dependencies:
npm install
-
Configure environment variables:
Copy.env.exampleto.envand fill in your API keys and credentials. -
Run the main script:
node main.js
-
Telegram Integration:
The bot listens for messages and can forward media or links to Instagram and other platforms.
-
Add a new platform:
- Implement a new strategy class in the appropriate folder.
- Register it in the factory/context.
-
Change workflow:
- Modify the context or composite classes to adjust how downloads/uploads are orchestrated.
MIT License