Skip to content

Commit

Permalink
fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotBraem committed Dec 20, 2024
1 parent a09e350 commit d25163f
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 7 deletions.
40 changes: 37 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

<div align="center">

<h1 style="font-size: 2.5rem; font-weight: bold;">Public Goods News Curation</h1>
<h1 style="font-size: 2.5rem; font-weight: bold;">Curation Bot</h1>

<p>
<strong>Bot to curate and to streamline public goods news</strong>
<strong>Bot to curate and to streamline curation</strong>
</p>

</div>
Expand Down Expand Up @@ -44,7 +44,7 @@
This project uses a monorepo structure managed with [Turborepo](https://turbo.build/repo) for efficient build orchestration:

```bash
public-goods-news/
curation-bot/
├── frontend/ # React frontend application
├── backend/ # Bun-powered backend service
├── package.json # Root package.json for shared dependencies
Expand All @@ -62,6 +62,27 @@ public-goods-news/
- Bun runtime for high performance
- Twitter bot functionality
- API endpoints for frontend
- Export services for RSS and Telegram

### Export Services

The platform supports multiple channels for content distribution:

#### RSS Feed

- Automatically generates an RSS feed of approved submissions
- Configurable feed properties (title, description, max items)
- XML-compliant output with proper escaping
- Ideal for content aggregators and RSS readers

#### Telegram Channel

- Posts approved submissions to a configured Telegram channel
- Formatted messages with submission details and source links
- Real-time updates as content is approved
- Requires a Telegram bot token and channel ID

The export system is extensible - new export types can be added by implementing the ExportService interface in [backend/src/services/exports/types.ts](./backend/src/services/exports/types.ts).

## Getting Started

Expand Down Expand Up @@ -90,6 +111,19 @@ Required environment variables:
TWITTER_USERNAME=your_twitter_username
TWITTER_PASSWORD=your_twitter_password
TWITTER_EMAIL=your_twitter_email
# Export Services Configuration
# Telegram (Optional)
TELEGRAM_ENABLED=false # Set to true to enable Telegram export
TELEGRAM_BOT_TOKEN= # Your Telegram bot token
TELEGRAM_CHANNEL_ID= # Target channel ID for posts
# RSS Feed (Optional)
RSS_ENABLED=false # Set to true to enable RSS feed
RSS_TITLE= # Title of your RSS feed
RSS_DESCRIPTION= # Description of your RSS feed
RSS_FEED_PATH= # Path where RSS feed will be generated
RSS_MAX_ITEMS=100 # Maximum number of items to keep in feed
```

### Running the app
Expand Down
46 changes: 44 additions & 2 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

<div align="center">

<h1 style="font-size: 2.5rem; font-weight: bold;">Public Goods News Backend</h1>
<h1 style="font-size: 2.5rem; font-weight: bold;">Curation Bot Backend</h1>

<p>
<strong>TypeScript-based backend service for the Public Goods News Curation platform</strong>
<strong>TypeScript-based backend service for the Curation Bot platform</strong>
</p>

</div>
Expand Down Expand Up @@ -76,6 +76,26 @@ Twitter integration (`src/services/twitter`) manages:
- Rate limiting
- User management

### Export Services

Located in `src/services/exports`, manages content distribution to external platforms:

#### RSS Export

- Generates RSS feed of approved submissions
- Configurable feed title and description
- Customizable maximum items limit
- Automatic XML escaping and feed updates

#### Telegram Export

- Posts approved submissions to Telegram channel
- Formatted messages with submission details
- Automatic error handling and retries
- Real-time channel updates

This is extendible by registering a new export type in [exports/types](./src/services/exports/types.ts).

## Development

### Prerequisites
Expand All @@ -98,6 +118,28 @@ bun install
cp .env.example .env
```

Required environment variables:

```env
# Twitter API Credentials
TWITTER_USERNAME=your_twitter_username
TWITTER_PASSWORD=your_twitter_password
TWITTER_EMAIL=your_twitter_email
# Export Services Configuration
# Telegram
TELEGRAM_ENABLED=false
TELEGRAM_BOT_TOKEN=your_bot_token
TELEGRAM_CHANNEL_ID=your_channel_id
# RSS
RSS_ENABLED=false
RSS_TITLE=Curation Bot
RSS_DESCRIPTION=Latest approved submissions
RSS_FEED_PATH=public/feed.xml
RSS_MAX_ITEMS=100
```

3. Start development server:

```bash
Expand Down
4 changes: 2 additions & 2 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

<div align="center">

<h1 style="font-size: 2.5rem; font-weight: bold;">Public Goods News Frontend</h1>
<h1 style="font-size: 2.5rem; font-weight: bold;">Curation Bot Frontend</h1>

<p>
<strong>React-based frontend application for the Public Goods News Curation platform</strong>
<strong>React-based frontend application for the Curation Bot platform</strong>
</p>

</div>
Expand Down

0 comments on commit d25163f

Please sign in to comment.