### Environment Configuration Example Source: https://context7.com/synzen/monitorss/llms.txt Example .env file configuration for MonitoRSS services. ```bash # .env file example MONITORSS_VERSION=7 # Bot presence settings BOT_PRESENCE_DISCORD_BOT_TOKEN="your_bot_token" BOT_PRESENCE_DISCORD_BOT_CLIENT_ID="your_client_id" BOT_PRESENCE_STATUS="online" BOT_PRESENCE_ACTIVITY_TYPE="watching" BOT_PRESENCE_ACTIVITY_NAME="RSS feeds" # Backend API settings BACKEND_API_MONGODB_URI=mongodb://mongo:27017/rss BACKEND_API_DEFAULT_REFRESH_RATE_MINUTES=10 BACKEND_API_DEFAULT_MAX_USER_FEEDS=10000 BACKEND_API_MAX_DAILY_ARTICLES_DEFAULT=100000 BACKEND_API_DISCORD_BOT_TOKEN="your_bot_token" BACKEND_API_DISCORD_CLIENT_ID="your_client_id" BACKEND_API_DISCORD_CLIENT_SECRET="your_client_secret" BACKEND_API_SESSION_SECRET="random_64_char_string" BACKEND_API_SESSION_SALT="random_16_char" BACKEND_API_LOGIN_REDIRECT_URI=http://localhost:8000 BACKEND_API_DISCORD_REDIRECT_URI=http://localhost:8000/api/v1/discord/callback-v2 # Email notifications (optional) BACKEND_API_SMTP_HOST="smtp.example.com" BACKEND_API_SMTP_USERNAME="your_username" BACKEND_API_SMTP_PASSWORD="your_password" BACKEND_API_SMTP_FROM="noreply@example.com" # User feeds service USER_FEEDS_DISCORD_CLIENT_ID="your_client_id" USER_FEEDS_DISCORD_API_TOKEN="your_bot_token" USER_FEEDS_DELIVERY_RECORD_PERSISTENCE_MONTHS=1 USER_FEEDS_ARTICLE_PERSISTENCE_MONTHS=12 # Feed requests service FEED_REQUESTS_FEEDS_MONGODB_URI=mongodb://mongo:27017/rss?replicaSet=dbrs&directConnection=true FEED_REQUESTS_FEED_REQUEST_DEFAULT_USER_AGENT="MonitoRSS [Self-Hosted]/1.0 your@email.com" FEED_REQUESTS_HISTORY_PERSISTENCE_MONTHS=1 FEED_REQUESTS_MAX_FAIL_ATTEMPTS=11 FEED_REQUESTS_REQUEST_TIMEOUT_MS=15000 ``` -------------------------------- ### Install dependencies Source: https://github.com/synzen/monitorss/blob/main/services/user-feeds/README.md Use this command to install all required project dependencies defined in package.json. ```bash $ npm install ``` -------------------------------- ### Docker Deployment - Basic Setup Source: https://context7.com/synzen/monitorss/llms.txt Instructions for deploying MonitoRSS using Docker Compose. ```APIDOC ## Docker Deployment - Basic Setup ### Description Deploy MonitoRSS using Docker Compose with the provided configuration files. ### Steps 1. **Clone the repository** ```bash git clone https://github.com/synzen/MonitoRSS.git cd MonitoRSS ``` 2. **Create environment file** ```bash cp .env.example .env ``` 3. **Edit .env with your configuration** Required variables: - BOT_PRESENCE_DISCORD_BOT_TOKEN - BACKEND_API_DISCORD_BOT_TOKEN - BACKEND_API_DISCORD_CLIENT_ID - BACKEND_API_DISCORD_CLIENT_SECRET - BACKEND_API_SESSION_SECRET (64-char random string) - BACKEND_API_SESSION_SALT (16-char random string) 4. **Start all services** ```bash docker compose up -d ``` 5. **Verify all containers are running** ```bash docker ps ``` 6. **View logs** ```bash docker logs monitorss-prod-monolith-1 --tail 100 ``` 7. **Access the control panel** Open `http://localhost:8000` in your browser. ``` -------------------------------- ### Start Docker Development Stack Source: https://github.com/synzen/monitorss/blob/main/services/backend-api/e2e/README.md Starts the required Docker stack for testing. Changes to source code will trigger automatic container restarts. ```bash docker compose -f docker-compose.dev.yml watch ``` -------------------------------- ### Migrate from v6 Source: https://github.com/synzen/monitorss/blob/main/README.md Commands to build and start containers during the migration process from v6. ```bash docker compose --parallel 1 up -d --build ``` ```bash docker compose --parallel 1 up -d ``` -------------------------------- ### Install Cloudflare Tunnel Source: https://github.com/synzen/monitorss/blob/main/services/backend-api/e2e/README.md Installs the cloudflared utility required for Paddle checkout tests. ```bash winget install cloudflare.cloudflared ``` -------------------------------- ### Deploy MonitoRSS with Docker Source: https://context7.com/synzen/monitorss/llms.txt Commands to clone the repository, configure environment variables, and start services. ```bash # Clone the repository git clone https://github.com/synzen/MonitoRSS.git cd MonitoRSS # Create environment file from example cp .env.example .env # Edit .env with your configuration # Required variables: # - BOT_PRESENCE_DISCORD_BOT_TOKEN # - BACKEND_API_DISCORD_BOT_TOKEN # - BACKEND_API_DISCORD_CLIENT_ID # - BACKEND_API_DISCORD_CLIENT_SECRET # - BACKEND_API_SESSION_SECRET (64-char random string) # - BACKEND_API_SESSION_SALT (16-char random string) # Start all services docker compose up -d # Verify all containers are running docker ps # View logs docker logs monitorss-prod-monolith-1 --tail 100 # Access the control panel # Open http://localhost:8000 in your browser ``` -------------------------------- ### Run the application Source: https://github.com/synzen/monitorss/blob/main/services/user-feeds/README.md Commands to start the application in different modes, including development, watch, and production environments. ```bash # development $ npm run start # watch mode $ npm run start:dev # production mode $ npm run start:prod ``` -------------------------------- ### Docker Deployment - Environment Configuration Source: https://context7.com/synzen/monitorss/llms.txt Example `.env` file for configuring MonitoRSS environment variables. ```APIDOC ## Docker Deployment - Environment Configuration ### Description Example `.env` file for configuring MonitoRSS environment variables. ### Example `.env` file ```bash MONITORSS_VERSION=7 # Bot presence settings BOT_PRESENCE_DISCORD_BOT_TOKEN="your_bot_token" BOT_PRESENCE_DISCORD_BOT_CLIENT_ID="your_client_id" BOT_PRESENCE_STATUS="online" BOT_PRESENCE_ACTIVITY_TYPE="watching" BOT_PRESENCE_ACTIVITY_NAME="RSS feeds" # Backend API settings BACKEND_API_MONGODB_URI=mongodb://mongo:27017/rss BACKEND_API_DEFAULT_REFRESH_RATE_MINUTES=10 BACKEND_API_DEFAULT_MAX_USER_FEEDS=10000 BACKEND_API_MAX_DAILY_ARTICLES_DEFAULT=100000 BACKEND_API_DISCORD_BOT_TOKEN="your_bot_token" BACKEND_API_DISCORD_CLIENT_ID="your_client_id" BACKEND_API_DISCORD_CLIENT_SECRET="your_client_secret" BACKEND_API_SESSION_SECRET="random_64_char_string" BACKEND_API_SESSION_SALT="random_16_char" BACKEND_API_LOGIN_REDIRECT_URI=http://localhost:8000 BACKEND_API_DISCORD_REDIRECT_URI=http://localhost:8000/api/v1/discord/callback-v2 # Email notifications (optional) BACKEND_API_SMTP_HOST="smtp.example.com" BACKEND_API_SMTP_USERNAME="your_username" BACKEND_API_SMTP_PASSWORD="your_password" BACKEND_API_SMTP_FROM="noreply@example.com" # User feeds service USER_FEEDS_DISCORD_CLIENT_ID="your_client_id" USER_FEEDS_DISCORD_API_TOKEN="your_bot_token" USER_FEEDS_DELIVERY_RECORD_PERSISTENCE_MONTHS=1 USER_FEEDS_ARTICLE_PERSISTENCE_MONTHS=12 # Feed requests service FEED_REQUESTS_FEEDS_MONGODB_URI=mongodb://mongo:27017/rss?replicaSet=dbrs&directConnection=true FEED_REQUESTS_FEED_REQUEST_DEFAULT_USER_AGENT="MonitoRSS [Self-Hosted]/1.0 your@email.com" FEED_REQUESTS_HISTORY_PERSISTENCE_MONTHS=1 FEED_REQUESTS_MAX_FAIL_ATTEMPTS=11 FEED_REQUESTS_REQUEST_TIMEOUT_MS=15000 ``` ``` -------------------------------- ### Get Discord Server Source: https://context7.com/synzen/monitorss/llms.txt Retrieves information about a Discord server where the bot is present. ```bash curl -X GET "http://localhost:8000/api/v1/discord-servers/SERVER_ID" \ -H "Cookie: session=YOUR_SESSION_COOKIE" ``` -------------------------------- ### Get Server Roles via API Source: https://context7.com/synzen/monitorss/llms.txt Retrieves roles in a Discord server for mention configuration. ```bash curl -X GET "http://localhost:8000/api/v1/discord-servers/SERVER_ID/roles" \ -H "Cookie: session=YOUR_SESSION_COOKIE" ``` -------------------------------- ### Get Article Properties Source: https://context7.com/synzen/monitorss/llms.txt Lists available placeholder properties for a feed, including custom placeholders defined by transformation steps. ```bash curl -X POST "http://localhost:8000/api/v1/user-feeds/FEED_ID/get-article-properties" \ -H "Cookie: session=YOUR_SESSION_COOKIE" \ -H "Content-Type: application/json" \ -d '{ "customPlaceholders": [ { "referenceName": "custom1", "sourcePlaceholder": "title", "steps": [{ "type": "UPPERCASE" }] } ] }' ``` -------------------------------- ### GET /api/v1/discord-servers/SERVER_ID Source: https://context7.com/synzen/monitorss/llms.txt Retrieves information about a Discord server where the bot is present. ```APIDOC ## GET /api/v1/discord-servers/SERVER_ID ### Description Retrieves information about a Discord server where the bot is present. ### Method GET ### Endpoint /api/v1/discord-servers/SERVER_ID ``` -------------------------------- ### Get Server Roles API Source: https://context7.com/synzen/monitorss/llms.txt Retrieves roles in a Discord server for mention configuration. ```APIDOC ## GET /api/v1/discord-servers/{SERVER_ID}/roles ### Description Retrieves roles in a Discord server for mention configuration. ### Method GET ### Endpoint /api/v1/discord-servers/{SERVER_ID}/roles ### Parameters #### Path Parameters - **SERVER_ID** (string) - Required - The ID of the Discord server. ### Request Example ```bash curl -X GET "http://localhost:8000/api/v1/discord-servers/SERVER_ID/roles" \ -H "Cookie: session=YOUR_SESSION_COOKIE" ``` ### Response #### Success Response (200) - **result** (array) - A list of roles with their IDs, names, and colors. #### Response Example ```json { "result": [ { "id": "role_id", "name": "Moderators", "color": 3447003 }, { "id": "role_id_2", "name": "Subscribers", "color": 15844367 } ] } ``` ``` -------------------------------- ### Initiate Discord OAuth2 Login Source: https://context7.com/synzen/monitorss/llms.txt Use this endpoint to start the Discord OAuth2 login flow. It redirects the user to Discord's authorization page. The callback endpoint handles the token exchange after successful authorization. ```bash curl -X GET "http://localhost:8000/api/v1/discord/login-v2" ``` -------------------------------- ### Get Discord Webhook via API Source: https://context7.com/synzen/monitorss/llms.txt Retrieves information about a Discord webhook for validation. ```bash curl -X GET "http://localhost:8000/api/v1/discord-webhooks/WEBHOOK_ID" \ -H "Cookie: session=YOUR_SESSION_COOKIE" ``` -------------------------------- ### Get Feed Delivery Logs Source: https://context7.com/synzen/monitorss/llms.txt Retrieves the history of article deliveries for a specific feed. ```bash curl -X GET "http://localhost:8000/api/v1/user-feeds/FEED_ID/delivery-logs?limit=25&skip=0" \ -H "Cookie: session=YOUR_SESSION_COOKIE" ``` -------------------------------- ### Get Feed Details Source: https://context7.com/synzen/monitorss/llms.txt Retrieves detailed information about a specific feed, including all its connections and configuration. Use this endpoint to inspect the current state of a feed. ```bash curl -X GET "http://localhost:8000/api/v1/user-feeds/FEED_ID" \ -H "Cookie: session=YOUR_SESSION_COOKIE" ``` -------------------------------- ### Get Server Channels via API Source: https://context7.com/synzen/monitorss/llms.txt Retrieves available text channels in a Discord server for feed delivery. ```bash curl -X GET "http://localhost:8000/api/v1/discord-servers/SERVER_ID/channels" \ -H "Cookie: session=YOUR_SESSION_COOKIE" ``` -------------------------------- ### GET /api/v1/discord/login-v2 Source: https://context7.com/synzen/monitorss/llms.txt Initiates the Discord OAuth2 login flow by redirecting the user to the Discord authorization page. ```APIDOC ## GET /api/v1/discord/login-v2 ### Description Initiates Discord OAuth2 login flow to authenticate users. Returns a redirect URL for the Discord authorization page. ### Method GET ### Endpoint /api/v1/discord/login-v2 ``` -------------------------------- ### Get Feed Daily Limit Source: https://context7.com/synzen/monitorss/llms.txt Checks the current daily delivery count against the feed's maximum limit. ```bash curl -X GET "http://localhost:8000/api/v1/user-feeds/FEED_ID/daily-limit" \ -H "Cookie: session=YOUR_SESSION_COOKIE" ``` -------------------------------- ### Get Feed Articles Source: https://context7.com/synzen/monitorss/llms.txt Retrieves articles from a feed with support for pagination, property selection, and logical filtering expressions. ```bash curl -X POST "http://localhost:8000/api/v1/user-feeds/FEED_ID/get-articles" \ -H "Cookie: session=YOUR_SESSION_COOKIE" \ -H "Content-Type: application/json" \ -d '{ "limit": 25, "skip": 0, "random": false, "selectProperties": ["title", "link", "description", "pubDate"], "filters": { "returnType": "include-no-match-details", "expression": { "type": "LOGICAL", "op": "AND", "children": [ { "type": "RELATIONAL", "op": "CONTAINS", "left": { "type": "ARTICLE", "value": "title" }, "right": { "type": "STRING", "value": "technology" } } ] } }, "formatter": { "options": { "formatTables": true, "stripImages": false, "disableImageLinkPreviews": false }, "customPlaceholders": [ { "referenceName": "shortdesc", "sourcePlaceholder": "description", "steps": [ { "type": "REGEX", "regexSearch": "^(.{0,200}).*", "replacementString": "$1..." } ] } ] } }' ``` -------------------------------- ### GET /api/v1/users/@me Source: https://context7.com/synzen/monitorss/llms.txt Retrieves information about the currently authenticated user, including their Discord profile and supporter status. ```APIDOC ## GET /api/v1/users/@me ### Description Retrieves information about the currently authenticated user including their Discord profile and supporter status. ### Method GET ### Endpoint /api/v1/users/@me ### Response #### Success Response (200) - **result** (object) - The user profile object containing ID, discordUserId, discordUsername, discordAvatar, email, preferences, isSupporter, maxFeeds, and refreshRateSeconds. ``` -------------------------------- ### Get Authenticated User Information Source: https://context7.com/synzen/monitorss/llms.txt Retrieves the profile details of the currently logged-in user, including their Discord information, email, and supporter status. Requires a valid session cookie. ```bash curl -X GET "http://localhost:8000/api/v1/users/@me" \ -H "Cookie: session=YOUR_SESSION_COOKIE" ``` ```json { "result": { "id": "user_mongo_id", "discordUserId": "123456789012345678", "discordUsername": "username", "discordAvatar": "avatar_hash", "email": "user@example.com", "preferences": { "dateFormat": "YYYY-MM-DD", "dateTimezone": "America/New_York", "dateLocale": "en" }, "isSupporter": false, "maxFeeds": 10000, "refreshRateSeconds": 600 } } ``` -------------------------------- ### Get Server Channels API Source: https://context7.com/synzen/monitorss/llms.txt Retrieves available text channels in a Discord server for feed delivery. The response includes channels the bot can access and their types (text, forum, thread). ```APIDOC ## GET /api/v1/discord-servers/{SERVER_ID}/channels ### Description Retrieves available text channels in a Discord server for feed delivery. ### Method GET ### Endpoint /api/v1/discord-servers/{SERVER_ID}/channels ### Parameters #### Path Parameters - **SERVER_ID** (string) - Required - The ID of the Discord server. ### Request Example ```bash curl -X GET "http://localhost:8000/api/v1/discord-servers/SERVER_ID/channels" \ -H "Cookie: session=YOUR_SESSION_COOKIE" ``` ### Response #### Success Response (200) - **result** (object) - Contains a list of channels and their types. #### Response Example ```json { "result": { "id": "SERVER_ID", "name": "My Discord Server", "iconUrl": "https://cdn.discordapp.com/icons/...", "ownerDiscordUserId": "owner_user_id" } } ``` ``` -------------------------------- ### GET /api/v1/user-feeds/FEED_ID/delivery-logs Source: https://context7.com/synzen/monitorss/llms.txt Retrieves recent article delivery history for a feed. ```APIDOC ## GET /api/v1/user-feeds/FEED_ID/delivery-logs ### Description Retrieves the recent article delivery history for a specific feed, including status and timestamps. ### Method GET ### Endpoint /api/v1/user-feeds/FEED_ID/delivery-logs ### Parameters #### Query Parameters - **FEED_ID** (string) - Required - The ID of the feed to retrieve logs for. - **limit** (integer) - Optional - The maximum number of logs to return. - **skip** (integer) - Optional - The number of logs to skip from the beginning. ### Request Example ```bash curl -X GET "http://localhost:8000/api/v1/user-feeds/FEED_ID/delivery-logs?limit=25&skip=0" \ -H "Cookie: session=YOUR_SESSION_COOKIE" ``` ### Response #### Success Response (200) - **result** (object) - The result of the request. - **logs** (array of objects) - An array of delivery log objects. - **id** (string) - The unique identifier of the log entry. - **status** (string) - The delivery status (e.g., "sent"). - **mediumId** (string) - The identifier of the delivery medium. - **articleId** (string) - The ID of the article that was delivered. - **createdAt** (string) - The timestamp when the delivery occurred. - **total** (integer) - The total number of delivery logs available. ``` -------------------------------- ### GET /api/v1/user-feeds/FEED_ID/requests Source: https://context7.com/synzen/monitorss/llms.txt Retrieves recent HTTP request history for fetching a feed. ```APIDOC ## GET /api/v1/user-feeds/FEED_ID/requests ### Description Retrieves the recent HTTP request history for fetching a specific feed. This includes information about when the feed was requested, the status code, and response times. ### Method GET ### Endpoint /api/v1/user-feeds/FEED_ID/requests ### Parameters #### Query Parameters - **FEED_ID** (string) - Required - The ID of the feed to retrieve request history for. - **limit** (integer) - Optional - The maximum number of requests to return. - **skip** (integer) - Optional - The number of requests to skip from the beginning. ### Request Example ```bash curl -X GET "http://localhost:8000/api/v1/user-feeds/FEED_ID/requests?limit=25&skip=0" \ -H "Cookie: session=YOUR_SESSION_COOKIE" ``` ### Response #### Success Response (200) - Response includes request timestamps, status codes, and response times. ``` -------------------------------- ### Test Connection Article Source: https://context7.com/synzen/monitorss/llms.txt Sends a test article through a specific connection to preview delivery. ```bash curl -X POST "http://localhost:8000/api/v1/user-feeds/FEED_ID/connections/discord-channels/CONNECTION_ID/test" \ -H "Cookie: session=YOUR_SESSION_COOKIE" \ -H "Content-Type: application/json" \ -d '{ "article": { "id": "article_hash_id" }, "content": "{{title}}", "embeds": [], "includeCustomPlaceholderPreviews": true }' ``` -------------------------------- ### Preview Date Formatting Source: https://context7.com/synzen/monitorss/llms.txt Use this endpoint to preview how dates will be formatted based on provided format options, timezone, and locale. ```bash curl -X POST "http://localhost:8000/api/v1/user-feeds/FEED_ID/date-preview" \ -H "Cookie: session=YOUR_SESSION_COOKIE" \ -H "Content-Type: application/json" \ -d '{ "dateFormat": "dddd, MMMM D, YYYY [at] h:mm A", "dateTimezone": "America/New_York", "dateLocale": "en-us" }' ``` ```json { "result": { "valid": true, "output": "Monday, January 15, 2024 at 10:30 AM" } } ``` -------------------------------- ### Get Discord Webhook API Source: https://context7.com/synzen/monitorss/llms.txt Retrieves information about a Discord webhook for validation. ```APIDOC ## GET /api/v1/discord-webhooks/{WEBHOOK_ID} ### Description Retrieves information about a Discord webhook for validation. ### Method GET ### Endpoint /api/v1/discord-webhooks/{WEBHOOK_ID} ### Parameters #### Path Parameters - **WEBHOOK_ID** (string) - Required - The ID of the Discord webhook. ### Request Example ```bash curl -X GET "http://localhost:8000/api/v1/discord-webhooks/WEBHOOK_ID" \ -H "Cookie: session=YOUR_SESSION_COOKIE" ``` ### Response #### Success Response (200) - **result** (object) - Information about the webhook including its ID, name, channel ID, guild ID, and avatar URL. #### Response Example ```json { "result": { "id": "WEBHOOK_ID", "name": "Webhook Name", "channelId": "channel_id", "guildId": "guild_id", "avatarUrl": "https://cdn.discordapp.com/avatars/..." } } ``` ``` -------------------------------- ### Docker Deployment - Updating MonitoRSS Source: https://context7.com/synzen/monitorss/llms.txt Instructions for updating MonitoRSS to a new version using Docker. ```APIDOC ## Docker Deployment - Updating MonitoRSS ### Description Instructions for updating MonitoRSS to a new version using Docker. ### Steps 1. **Back up MongoDB data** ```bash docker exec monitorss-prod-mongo-1 mongodump --out /backup ``` 2. **Stop containers** ```bash docker compose rm --stop -f ``` 3. **Update version in .env** Change `MONITORSS_VERSION=7` to `MONITORSS_VERSION=8` (or the desired new version). 4. **Pull latest images** ```bash docker compose pull ``` 5. **Start containers** ```bash docker compose up -d ``` ``` -------------------------------- ### Get Feed Request History Source: https://context7.com/synzen/monitorss/llms.txt Retrieves the HTTP request history for fetching the feed. ```bash curl -X GET "http://localhost:8000/api/v1/user-feeds/FEED_ID/requests?limit=25&skip=0" \ -H "Cookie: session=YOUR_SESSION_COOKIE" ``` -------------------------------- ### Run tests Source: https://github.com/synzen/monitorss/blob/main/services/user-feeds/README.md Commands to execute unit tests, end-to-end tests, and generate test coverage reports. ```bash # unit tests $ npm run test # e2e tests $ npm run test:e2e # test coverage $ npm run test:cov ``` -------------------------------- ### Copy Connection Settings Source: https://context7.com/synzen/monitorss/llms.txt Copies specific settings from one connection to multiple other connections. ```bash curl -X POST "http://localhost:8000/api/v1/user-feeds/FEED_ID/connections/discord-channels/CONNECTION_ID/copy-connection-settings" \ -H "Cookie: session=YOUR_SESSION_COOKIE" \ -H "Content-Type: application/json" \ -d '{ "properties": [ "embeds", "content", "filters", "customPlaceholders", "splitOptions", "messageMentions", "placeholderLimits" ], "targetDiscordChannelConnectionIds": [ "target_connection_1", "target_connection_2" ] }' ``` -------------------------------- ### GET /api/v1/user-feeds/FEED_ID Source: https://context7.com/synzen/monitorss/llms.txt Retrieves detailed information about a specific feed, including its connections and configuration. ```APIDOC ## GET /api/v1/user-feeds/FEED_ID ### Description Retrieves detailed information about a specific feed including all connections and configuration. ### Method GET ### Endpoint `/api/v1/user-feeds/FEED_ID` ### Parameters #### Path Parameters - **FEED_ID** (string) - Required - The unique identifier of the feed to retrieve. ### Request Example ```bash curl -X GET "http://localhost:8000/api/v1/user-feeds/FEED_ID" -H "Cookie: session=YOUR_SESSION_COOKIE" ``` ### Response #### Success Response (200) - **result** (object) - Contains the feed details. - **id** (string) - The feed's unique identifier. - **title** (string) - The title of the feed. - **url** (string) - The feed's URL. - **inputUrl** (string) - The original URL provided for the feed. - **connections** (array) - A list of connections associated with the feed. - **disabledCode** (null) - Placeholder for disabled status code. - **healthStatus** (string) - The health status of the feed (e.g., "ok"). - **passingComparisons** (array) - List of comparison keys that are passing. - **blockingComparisons** (array) - List of comparison keys that are blocking. - **formatOptions** (object) - Options for formatting feed content. - **refreshRateSeconds** (integer) - The interval in seconds for refreshing the feed. #### Response Example ```json { "result": { "id": "FEED_ID", "title": "Tech News", "url": "https://technews.com/rss", "inputUrl": "https://technews.com/rss", "connections": [ { "id": "connection_id", "name": "Main Channel", "key": "discord-channel", "details": { "channel": { "id": "channel_id", "guildId": "guild_id" }, "content": "New article: {{title}}", "embeds": [] }, "disabledCode": null } ], "disabledCode": null, "healthStatus": "ok", "passingComparisons": ["title"], "blockingComparisons": [], "formatOptions": { "dateFormat": "YYYY-MM-DD HH:mm", "dateTimezone": "UTC", "dateLocale": "en" }, "refreshRateSeconds": 600 } } ``` ``` -------------------------------- ### Docker Deployment - Legacy Feed Migration Source: https://context7.com/synzen/monitorss/llms.txt Instructions for migrating legacy feeds using a provided script. ```APIDOC ## Docker Deployment - Legacy Feed Migration ### Description Instructions for migrating legacy feeds using a provided script. ### Steps 1. **Enter the monolith container** ```bash docker compose exec monolith sh ``` 2. **Preview migration (dry run)** ```bash node dist/scripts/migrate-all-legacy-feeds.js \ --user YOUR_DISCORD_USER_ID \ --guild "*" \ --dry-run ``` 3. **Run actual migration** ```bash node dist/scripts/migrate-all-legacy-feeds.js \ --user YOUR_DISCORD_USER_ID \ --guild "*" ``` ``` -------------------------------- ### Update MonitoRSS Source: https://context7.com/synzen/monitorss/llms.txt Steps to back up data, stop containers, and pull the latest images. ```bash # Back up MongoDB data first docker exec monitorss-prod-mongo-1 mongodump --out /backup # Stop containers docker compose rm --stop -f # Update version in .env # MONITORSS_VERSION=8 # Pull latest images docker compose pull # Start containers docker compose up -d ``` -------------------------------- ### Send Test Article Source: https://context7.com/synzen/monitorss/llms.txt Sends a preview of an article to a Discord channel using custom content and embed formatting. ```bash curl -X POST "http://localhost:8000/api/v1/user-feeds/FEED_ID/test-send" \ -H "Cookie: session=YOUR_SESSION_COOKIE" \ -H "Content-Type: application/json" \ -d '{ "article": { "id": "article_hash_id" }, "channelId": "discord_channel_id", "content": "**New Article:** {{title}}\n{{link}}", "embeds": [ { "title": "{{title}}", "description": "{{description}}", "url": "{{link}}", "color": 5814783, "timestamp": "article", "footer": { "text": "Published: {{pubDate}}" }, "thumbnail": { "url": "{{image}}" } } ], "webhook": { "name": "RSS Bot", "iconUrl": "https://example.com/icon.png" }, "userFeedFormatOptions": { "dateFormat": "YYYY-MM-DD", "dateTimezone": "UTC" } }' ``` -------------------------------- ### GET /api/v1/user-feeds/FEED_ID/daily-limit Source: https://context7.com/synzen/monitorss/llms.txt Retrieves the current daily article delivery count and maximum limit for a feed. ```APIDOC ## GET /api/v1/user-feeds/FEED_ID/daily-limit ### Description Retrieves the current daily article delivery count and the maximum allowed limit for a specific feed. This helps in monitoring usage against daily quotas. ### Method GET ### Endpoint /api/v1/user-feeds/FEED_ID/daily-limit ### Parameters #### Query Parameters - **FEED_ID** (string) - Required - The ID of the feed to check the daily limit for. ### Request Example ```bash curl -X GET "http://localhost:8000/api/v1/user-feeds/FEED_ID/daily-limit" \ -H "Cookie: session=YOUR_SESSION_COOKIE" ``` ### Response #### Success Response (200) - **result** (object) - The result of the request. - **current** (integer) - The current number of articles delivered today. - **max** (integer) - The maximum number of articles allowed for delivery per day. ``` -------------------------------- ### Initialize and use the MonitoRSS logger Source: https://context7.com/synzen/monitorss/llms.txt Configures the logger with environment settings and Datadog credentials. Supports standard log levels and a dedicated Datadog-only logging method. ```typescript import setupLogger from '@monitorss/logger'; // Initialize logger const logger = setupLogger({ env: process.env.NODE_ENV || 'development', enableDebugLogs: process.env.LOG_LEVEL === 'debug', disableConsole: false, datadog: { apiKey: process.env.DATADOG_API_KEY, service: 'my-service-name', source: 'nodejs' } }); // Log levels logger.debug('Detailed debugging information', { userId: '123', action: 'fetch' }); logger.info('General operational information', { feedUrl: 'https://example.com/feed.xml' }); logger.warn('Warning: something unexpected happened', { error: 'Rate limit approaching' }); logger.error('Error: operation failed', { error: err.message, stack: err.stack }); // Datadog-only logging (skips console) logger.datadog('Metric data for monitoring', { duration: 150, feedId: 'feed_123', articlesDelivered: 5 }); ``` -------------------------------- ### Preview Connection Message Source: https://context7.com/synzen/monitorss/llms.txt Generates a preview of how a message will look without actually sending it. ```bash curl -X POST "http://localhost:8000/api/v1/user-feeds/FEED_ID/connections/discord-channels/CONNECTION_ID/preview" \ -H "Cookie: session=YOUR_SESSION_COOKIE" \ -H "Content-Type: application/json" \ -d '{ "article": { "id": "article_hash_id" }, "content": "New post: {{title}}", "embeds": [{ "title": "{{title}}", "description": "{{description}}" }], "connectionFormatOptions": { "formatTables": true, "stripImages": true }, "includeCustomPlaceholderPreviews": true }' # Response includes rendered content with placeholders replaced ``` -------------------------------- ### Run end-to-end tests for backend API Source: https://github.com/synzen/monitorss/blob/main/services/backend-api/e2e/README.md Execute the full suite of end-to-end tests within the backend-api service directory. ```bash cd services/backend-api npm run e2e ``` -------------------------------- ### GET /api/v1/user-feeds Source: https://context7.com/synzen/monitorss/llms.txt Retrieves a list of feeds owned by or shared with the authenticated user with support for pagination and filtering. ```APIDOC ## GET /api/v1/user-feeds ### Description Retrieves all feeds owned by or shared with the authenticated user with pagination, filtering, and sorting options. ### Method GET ### Endpoint /api/v1/user-feeds ### Parameters #### Query Parameters - **limit** (integer) - Required - Number of feeds to return - **offset** (integer) - Required - Number of feeds to skip - **search** (string) - Optional - Filter by title or URL - **sort** (string) - Optional - Sort key (createdAt, -createdAt, title, -title) - **filters[disabledCodes]** (string) - Optional - Comma-separated disabled codes - **filters[computedStatuses]** (string) - Optional - Comma-separated statuses (ok, failing, disabled) - **filters[ownedByUser]** (boolean) - Optional - Filter by ownership ``` -------------------------------- ### Update MonitoRSS via Docker Source: https://github.com/synzen/monitorss/blob/main/README.md Commands to stop, update, and restart MonitoRSS containers. ```bash docker compose rm --stop -f ``` ```bash docker compose pull ``` ```bash docker compose up -d ``` -------------------------------- ### Preview Feed by URL Source: https://context7.com/synzen/monitorss/llms.txt Fetches and parses a feed URL to preview its content without creating a feed entry. This allows for content inspection before commitment. ```bash curl -X POST "http://localhost:8000/api/v1/user-feeds/preview-by-url" \ -H "Cookie: session=YOUR_SESSION_COOKIE" \ -H "Content-Type: application/json" \ -d '{ "url": "https://example.com/feed.xml" }' ``` -------------------------------- ### Migrate Legacy Feeds Source: https://context7.com/synzen/monitorss/llms.txt Commands to run the migration script within the monolith container. ```bash # Enter the monolith container docker compose exec monolith sh # Preview migration (dry run) node dist/scripts/migrate-all-legacy-feeds.js \ --user YOUR_DISCORD_USER_ID \ --guild "*" \ --dry-run # Run actual migration node dist/scripts/migrate-all-legacy-feeds.js \ --user YOUR_DISCORD_USER_ID \ --guild "*" ``` -------------------------------- ### POST /api/v1/user-feeds/FEED_ID/connections/discord-channels/CONNECTION_ID/copy-connection-settings Source: https://context7.com/synzen/monitorss/llms.txt Copies specific settings from one connection to multiple other connections. ```APIDOC ## POST /api/v1/user-feeds/FEED_ID/connections/discord-channels/CONNECTION_ID/copy-connection-settings ### Description Copies specific settings from one connection to multiple other connections. ### Method POST ### Endpoint /api/v1/user-feeds/FEED_ID/connections/discord-channels/CONNECTION_ID/copy-connection-settings ``` -------------------------------- ### Convert Legacy Feeds Source: https://github.com/synzen/monitorss/blob/main/README.md Commands to enter the monolith container and execute the migration script for legacy feeds. ```bash # Enter the monolith container docker compose exec monolith sh # Dry run first to preview (replace YOUR_DISCORD_USER_ID) node dist/scripts/migrate-all-legacy-feeds.js --user YOUR_DISCORD_USER_ID --guild "*" --dry-run # Run the actual migration node dist/scripts/migrate-all-legacy-feeds.js --user YOUR_DISCORD_USER_ID --guild "*" ``` -------------------------------- ### Bulk Enable Feeds Source: https://context7.com/synzen/monitorss/llms.txt Performs a bulk enable operation on multiple feeds. Requires a list of feed IDs to be enabled. ```bash curl -X PATCH "http://localhost:8000/api/v1/user-feeds" \ -H "Cookie: session=YOUR_SESSION_COOKIE" \ -H "Content-Type: application/json" \ -d '{ "op": "bulk-enable", "data": { "feeds": [{ "id": "feed_id_1" }] }' }' ``` -------------------------------- ### POST /api/v1/user-feeds/{FEED_ID}/date-preview Source: https://context7.com/synzen/monitorss/llms.txt Previews how dates will be formatted with given format options. ```APIDOC ## POST /api/v1/user-feeds/{FEED_ID}/date-preview ### Description Previews how dates will be formatted with given format options. ### Method POST ### Endpoint /api/v1/user-feeds/{FEED_ID}/date-preview ### Parameters #### Path Parameters - **FEED_ID** (string) - Required - The ID of the feed to preview date formatting for. #### Request Body - **dateFormat** (string) - Required - The desired date format string. - **dateTimezone** (string) - Optional - The timezone for the date formatting. - **dateLocale** (string) - Optional - The locale for the date formatting. ### Request Example ```json { "dateFormat": "dddd, MMMM D, YYYY [at] h:mm A", "dateTimezone": "America/New_York", "dateLocale": "en-us" } ``` ### Response #### Success Response (200) - **result** (object) - The result of the date preview. - **valid** (boolean) - Indicates if the formatting is valid. - **output** (string) - The formatted date string. #### Response Example ```json { "result": { "valid": true, "output": "Monday, January 15, 2024 at 10:30 AM" } } ``` ``` -------------------------------- ### Execute Playwright Test Suites Source: https://github.com/synzen/monitorss/blob/main/services/backend-api/e2e/README.md Commands for running various test configurations, including UI mode and report generation. ```bash # Run all tests (regular + paddle) npm run e2e # Run only regular (non-paddle) tests npx playwright test --project=chromium # Run only paddle tests (requires cloudflared + Paddle key) npm run e2e:paddle # Run tests with UI npm run e2e:ui # View test report npm run e2e:report ``` -------------------------------- ### POST /api/v1/user-feeds/preview-by-url Source: https://context7.com/synzen/monitorss/llms.txt Fetches and parses the content of a feed URL to provide a preview without actually creating the feed. ```APIDOC ## POST /api/v1/user-feeds/preview-by-url ### Description Fetches and parses a feed URL to preview its content without creating it. ### Method POST ### Endpoint `/api/v1/user-feeds/preview-by-url` ### Parameters #### Request Body - **url** (string) - Required - The URL of the feed to preview. ### Request Example ```json { "url": "https://example.com/feed.xml" } ``` ### Response #### Success Response (200) - The response includes the parsed feed title and a sample of its articles. ``` -------------------------------- ### POST /api/v1/user-feeds/FEED_ID/connections/discord-channels/CONNECTION_ID/preview Source: https://context7.com/synzen/monitorss/llms.txt Generates a preview of how a message will look without actually sending it. ```APIDOC ## POST /api/v1/user-feeds/FEED_ID/connections/discord-channels/CONNECTION_ID/preview ### Description Generates a preview of how a message will look without actually sending it. ### Method POST ### Endpoint /api/v1/user-feeds/FEED_ID/connections/discord-channels/CONNECTION_ID/preview ``` -------------------------------- ### POST /api/v1/user-feeds/{FEED_ID}/copy-settings Source: https://context7.com/synzen/monitorss/llms.txt Copies settings from one feed to multiple target feeds. ```APIDOC ## POST /api/v1/user-feeds/{FEED_ID}/copy-settings ### Description Copies settings from one feed to multiple target feeds. ### Method POST ### Endpoint /api/v1/user-feeds/{FEED_ID}/copy-settings ### Parameters #### Path Parameters - **FEED_ID** (string) - Required - The ID of the feed from which to copy settings. #### Request Body - **settings** (array of strings) - Required - A list of settings to copy (e.g., "passingComparisons", "blockingComparisons", "formatOptions"). - **targetFeedIds** (array of strings) - Required - A list of target feed IDs to copy settings to. - **targetFeedSelectionType** (string) - Required - The type of target feed selection (e.g., "selected"). ### Request Example ```json { "settings": ["passingComparisons", "blockingComparisons", "formatOptions"], "targetFeedIds": ["target_feed_1", "target_feed_2"], "targetFeedSelectionType": "selected" } ``` ### Response #### Success Response (204) No Content. Indicates the settings were successfully copied. ``` -------------------------------- ### Run non-paddle Playwright tests Source: https://github.com/synzen/monitorss/blob/main/services/backend-api/e2e/README.md Execute regular tests using the Chromium project via Playwright. ```bash npx playwright test --project=chromium ``` -------------------------------- ### Clone Connection Source: https://context7.com/synzen/monitorss/llms.txt Clones a connection to the same or different feeds. ```bash curl -X POST "http://localhost:8000/api/v1/user-feeds/FEED_ID/connections/discord-channels/CONNECTION_ID/clone" \ -H "Cookie: session=YOUR_SESSION_COOKIE" \ -H "Content-Type: application/json" \ -d '{ "name": "Cloned Connection", "channelId": "new_channel_id", "targetFeedIds": ["other_feed_id_1", "other_feed_id_2"], "targetFeedSelectionType": "selected" }' ``` -------------------------------- ### Create Discord Channel Connection Source: https://context7.com/synzen/monitorss/llms.txt Creates a new Discord channel connection for delivering articles from a feed. Supports various configurations including basic channel, webhook, and forum threads. ```bash curl -X POST "http://localhost:8000/api/v1/user-feeds/FEED_ID/connections/discord-channels" \ -H "Cookie: session=YOUR_SESSION_COOKIE" \ -H "Content-Type: application/json" \ -d '{ "name": "Tech News Channel", "channelId": "discord_channel_id", "content": "šŸ“° **{{title}}**\n\n{{description::500}}\n\nšŸ”— {{link}}", "embeds": [ { "title": "{{title}}", "url": "{{link}}", "description": "{{description}}", "color": 3447003, "timestamp": "article", "author": { "name": "{{author}}", "url": "{{author::link}}" }, "footer": { "text": "Via RSS Feed" }, "thumbnail": { "url": "{{image}}" } } ], "placeholderLimits": [ { "placeholder": "description", "characterCount": 500, "appendString": "..." } ], "formatter": { "formatTables": true, "stripImages": false, "disableImageLinkPreviews": true } }' ``` ```bash # For webhook delivery: curl -X POST "http://localhost:8000/api/v1/user-feeds/FEED_ID/connections/discord-channels" \ -H "Cookie: session=YOUR_SESSION_COOKIE" \ -H "Content-Type: application/json" \ -d '{ "name": "Webhook Connection", "webhook": { "id": "webhook_id", "name": "Custom Bot Name", "iconUrl": "https://example.com/avatar.png" }, "content": "{{title}}" }' ``` ```bash # For forum channel with thread creation: curl -X POST "http://localhost:8000/api/v1/user-feeds/FEED_ID/connections/discord-channels" \ -H "Cookie: session=YOUR_SESSION_COOKIE" \ -H "Content-Type: application/json" \ -d '{ "name": "Forum Connection", "channelId": "forum_channel_id", "applicationWebhook": { "channelId": "forum_channel_id", "name": "RSS Updates", "threadId": "optional_existing_thread_id" }, "content": "{{description}}" }' ``` -------------------------------- ### POST /api/v1/user-feeds/FEED_ID/connections/discord-channels/CONNECTION_ID/test Source: https://context7.com/synzen/monitorss/llms.txt Sends a test article through a specific connection to preview delivery. ```APIDOC ## POST /api/v1/user-feeds/FEED_ID/connections/discord-channels/CONNECTION_ID/test ### Description Sends a test article through a specific connection to preview delivery. ### Method POST ### Endpoint /api/v1/user-feeds/FEED_ID/connections/discord-channels/CONNECTION_ID/test ``` -------------------------------- ### Manual Feed Request Source: https://context7.com/synzen/monitorss/llms.txt Triggers an immediate fetch of new articles. Note that requests may be rate-limited. ```bash curl -X POST "http://localhost:8000/api/v1/user-feeds/FEED_ID/manual-request" \ -H "Cookie: session=YOUR_SESSION_COOKIE" ```