Skip to content

Jouzep/codeur-auto-responder

Repository files navigation

Codeur.com Auto-Responder

Automated monitoring of Codeur.com freelance project postings. Detects new projects via RSS, filters by budget, generates AI-personalized responses with GPT-4o-mini, and sends Discord notifications with ready-to-paste messages.

How It Works

RSS Feed (30s polling)
  → Budget Filter (5 French formats)
  → Project Page Scraper (full description)
  → AI Response Generator (GPT-4o-mini)
  → Discord Notification with @mention ping
  1. RSS Monitoring — Polls codeur.com/projects?format=rss every 30 seconds
  2. Budget Filtering — Parses French budget formats and filters by configurable minimum
  3. Deduplication — SQLite database prevents processing the same project twice
  4. Full Scraping — Fetches the complete project description via authenticated session
  5. AI Response — GPT-4o-mini generates a personalized paragraph citing relevant portfolio projects
  6. Discord Alert — Rich embed with project details + full response message ready to copy-paste, with optional @mention ping

Quick Start

Docker (recommended)

cp .env.example .env
cp profile.example.py profile.py
# Edit .env with your credentials
# Edit profile.py with your name, portfolio, and prompts
docker compose up -d

Local

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
cp profile.example.py profile.py
# Edit .env with your credentials
# Edit profile.py with your name, portfolio, and prompts
python main.py

Configuration

Environment Variables (.env)

Copy .env.example to .env and fill in your credentials:

Variable Description Required
CODEUR_SESSION_COOKIE Session cookies from Codeur.com (browser DevTools) Yes
DISCORD_WEBHOOK_URL Discord webhook URL for notifications Yes
DISCORD_USER_ID Your Discord user ID for @mention pings No
OPENAI_API_KEY OpenAI API key for GPT-4o-mini Yes
MIN_BUDGET Minimum budget threshold in euros (default: 200) No
ACCEPT_UNDER_500 Accept "Moins de 500 EUR" projects (default: true) No
ACCEPT_QUOTE_REQUEST Accept "Demande de devis" projects (default: true) No
CHECK_INTERVAL_SECONDS Polling interval in seconds (default: 30) No

Profile (profile.py)

Copy profile.example.py to profile.py and customize with your:

  • Name and title
  • Portfolio projects (name, description, URL, stack, domains)
  • AI system prompt (matching rules for your projects)
  • Response template (the message you want to copy-paste)

This file is gitignored to keep your personal info private.

Getting Your Codeur.com Session Cookie

  1. Log into codeur.com
  2. Open browser DevTools (F12) → Application → Cookies
  3. Copy the values of __codeur_session_production, remember_user_token, and offer_user_token
  4. Format: __codeur_session_production=...; remember_user_token=...; offer_user_token=...

Getting Your Discord User ID

  1. Open Discord → Settings → Advanced → Enable Developer Mode
  2. Right-click your username → Copy User ID

Budget Formats Supported

Format Example Behavior
Under Moins de 500 € Configurable via ACCEPT_UNDER_500
Range 500 € à 1 000 € Always accepted
Range 1 000 € à 10 000 € Always accepted
Above 10 000 € et plus Always accepted
Quote Demande de devis Configurable via ACCEPT_QUOTE_REQUEST

French number formatting with non-breaking spaces (1 000) is handled automatically.

Project Structure

codeur-auto-responder/
├── main.py              # Entry point + scheduler loop
├── config.py            # Environment configuration loader
├── profile.example.py   # Profile template (copy to profile.py)
├── models.py            # Data models (Project, Budget, etc.)
├── database.py          # SQLite deduplication + status tracking
├── rss_fetcher.py       # RSS feed parsing
├── budget_filter.py     # Budget format parsing + filtering
├── project_scraper.py   # Authenticated project page scraper
├── ai_responder.py      # GPT-4o-mini response generation
├── discord_notifier.py  # Discord webhook notifications + @mention
├── Dockerfile
├── docker-compose.yml
├── requirements.txt
├── tests/               # 79 tests
│   ├── conftest.py
│   ├── test_budget_filter.py
│   ├── test_rss_fetcher.py
│   ├── test_discord_notifier.py
│   ├── test_project_scraper.py
│   ├── test_ai_responder.py
│   └── test_integration.py
└── fixtures/
    └── sample_rss.xml

Tests

python -m pytest tests/ -v

Discord Notification

Each notification includes:

  • @mention ping (if DISCORD_USER_ID is configured)
  • Project title with link
  • Budget, categories, and publication date
  • Truncated description
  • Full response message ready to copy-paste on Codeur.com

The generated response stays under 1000 characters and includes:

  • Personalized AI paragraph citing the most relevant portfolio project
  • Portfolio links
  • Availability and accompaniment statement

Tech Stack

  • Python 3.12
  • feedparser — RSS parsing
  • httpx — HTTP client
  • BeautifulSoup4 — HTML parsing
  • OpenAI — GPT-4o-mini API
  • schedule — Job scheduling
  • SQLite — Project deduplication
  • Docker — Containerized deployment

License

MIT

About

Automated Codeur.com project monitoring with AI-personalized responses and Discord notifications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors