Synapulse is an intelligent information assistant that connects you with cutting-edge insights across various industries.
- Collect: Automatically gather raw information from designated sources (email newsletters, X accounts, Reddit, etc.)
- Analyze: AI-powered filtering, deduplication, and core insight extraction to generate structured summaries
- Deliver: Send to your preferred channel (email, Feishu, etc.) on a scheduled basis (daily/weekly)
- Modular Architecture: Pluggable Collectors, Processors, and Senders
- Multi-domain Support: Configure multiple domains (tech, finance, healthcare, etc.) with independent processing
- Multi-instance Support: Multiple instances of the same type, with sensitive info via separate environment variables
- Configuration-driven: YAML config + Markdown prompts, separated from code
- Environment Variable Injection: Sensitive info uses
${ENV_VAR_NAME}placeholders for security
Synapulse/
โโโ app/ # Application code directory
โ โโโ conf/ # Configuration files
โ โ โโโ config.yaml # Config file (not committed)
โ โ โโโ config.example.yaml # Config example
โ โโโ prompts/ # Prompt templates
โ โ โโโ tech.md # Tech domain prompt
โ โโโ src/ # Source code
โ โ โโโ main.py # Main entry point
โ โ โโโ models.py # Data models
โ โ โโโ config_loader.py # Config loader
โ โ โโโ summarizer.py # Main controller
โ โ โโโ collectors/ # Collectors
โ โ โ โโโ base.py
โ โ โ โโโ email_collector.py
โ โ โโโ processors/ # Processors
โ โ โ โโโ base.py
โ โ โ โโโ ai_processor.py
โ โ โโโ senders/ # Senders
โ โ โ โโโ base.py
โ โ โ โโโ email_sender.py
โ โ โโโ utils/ # Utilities
โ โ โโโ logger.py
โ โ โโโ html_cleaner.py
โ โโโ tests/ # Tests
โ โโโ test_email_collector.py
โโโ .github/workflows/ # GitHub Actions
โ โโโ daily_summary.yml # Daily scheduled task
โโโ pyproject.toml
โโโ README.md
git clone <repository-url>
cd synapulseuv syncEdit app/conf/config.yaml and configure:
- Collector: IMAP email settings (account, password, env var placeholders)
- Processor: AI API settings (provider, api_base, api_key, model)
- Sender: SMTP settings (sender, receiver, password)
Set corresponding environment variables based on placeholders in the config:
# Email account and password
export EMAIL1_ACCOUNT="your-email@gmail.com"
export EMAIL1_PASSWORD="your-email-password"
# AI API Key
export LLM1_API_KEY="your-deepseek-api-key"
# Sender and receiver
export EMAIL3_ACCOUNT="sender@gmail.com"
export EMAIL3_PASSWORD="your-sender-password"
export RECEIVER_EMAIL="receiver@example.com"uv run python -m app.src.mainglobal:
timezone: "Asia/Shanghai"
log_level: "INFO"domains:
- name: "tech" # Domain name
collectors: # Collector list
- name: "EMAIL1"
type: email
imap_server: "imap.gmail.com"
email_account: "sub@gmail.com"
email_password: "${PASSWORD_EMAIL1}"
mailbox: "INBOX"
mark_as_seen: true
time_range_days: 1
processor: # Processor
type: ai
name: "LLM1"
provider: "deepseek"
api_base: "https://api.deepseek.com/v1"
api_key: "${LLM1_API_KEY}"
model: "deepseek-chat"
prompt_file: "app/prompts/tech.md"
sender: # Sender
type: email
name: "EMAIL2"
smtp_server: "smtp.gmail.com"
smtp_port: 465
sender_email: "sender@gmail.com"
sender_password: "${EMAIL3_PASSWORD}"
receiver_email: "daily@example.com"
subject_prefix: "Tech Daily"Sensitive info in config uses ${ENV_VAR_NAME} format placeholders, resolved at runtime from environment variables.
Prompt templates are in app/prompts/ directory, in Markdown format. {combined_content} in the template will be replaced with collected news content.
Example (app/prompts/tech.md):
You are a tech news editor. Please organize today's tech news summary based on the following content.
Requirements:
- Only extract information related to AI applications, mobile devices, and digital products
- Remove duplicate news
- Provide core summary for each news item
News Content:
{combined_content}The project has GitHub Actions configured to run daily at UTC 0.
Add the following Secrets in GitHub repository settings:
EMAIL1_ACCOUNTEMAIL1_PASSWORDLLM1_API_KEYEMAIL3_ACCOUNTEMAIL3_PASSWORDRECEIVER_EMAIL
- Create a new file in
app/src/collectors/, inherit fromCollectorbase class - Implement
collect()method - Register in
app/src/summarizer.py_create_collector()
- Create a new file in
app/src/processors/, inherit fromProcessorbase class - Implement
process()method - Register in
app/src/summarizer.py_create_processor()
- Create a new file in
app/src/senders/, inherit fromSenderbase class - Implement
send()method - Register in
app/src/summarizer.py_create_sender()
If you find this project helpful, please scan to sponsor!
- Add API interface, provide HTTP service
- Add user management module, implement user registration, login, permission control, etc.
- Add business database to store user configuration data
- Add Poster module, implement multi-media platform publishing function
- Optimize html_cleaner and _extract_content in email_collector, to get better structured content
- Implement md2html in email_sender, beautify email content
- Optimize SourceItem structure (remove urls part), unify parsing methods (to_str, to_dict...)
- Improve tech.md prompt, optimize generated content (categorized summary, better info display)
- Optimize logging pattern
MIT
