Skip to content

Telex integration/plugin that sends a coding challenge in a channel every morning to sharpen developer skills.

Notifications You must be signed in to change notification settings

telexintegrations/codex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codex: Telex Coding Challenge Integration

Codex is a Telex integration that posts a coding challenge from Codewars in a specified channel every morning. This helps developers enhance their problem-solving skills daily.

Features

  • Automatically fetches and posts a new Codewars challenge every day.
  • Provides a direct link to the challenge for easy access.
  • Encourages continuous skill improvement through daily problem-solving.
  • Configurable interval for challenge posting.

Setup Instructions

Prerequisites

Installation

  1. Clone this repository:

    git clone https://github.com/tonybnya/codex.git
    cd codex
  2. Create and activate a virtual environment:

    python3 -m venv venv
    source venv/bin/activate  # On Windows use: venv\\Scripts\\activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Create a .env file and add the necessary configuration:

    FLASK_PORT=5000
    FLASK_DEBUG=True
  5. Run the Flask server:

    python3 main.py

Configuration

The integration exposes a GET endpoint /coding_challenge where Telex can fetch metadata about the app.

  • Tick URL: This is the webhook Telex will call periodically.
    • Endpoint: POST /tick

    • Payload:

      {
        "channel_id": "<telex_channel_id>",
        "return_url": "<telex_webhook_url>",
        "settings": [
          {"label": "interval", "type": "text", "required": true, "default": "0 9 * * *"}
        ]
      }

Testing the Integration

You can manually test the integration by triggering a tick request:

curl -X POST http://localhost:5000/tick -H "Content-Type: application/json" -d '{"channel_id": "your_channel_id", "return_url": "your_return_url", "settings": [{"label": "interval", "type": "text", "required": true, "default": "0 9 * * *"}]}'

OR

You can run Unit Tests:

pytest -v

Deployment

Using Docker

  1. Build the Docker image:

    docker build -t codex .
  2. Run the container:

    docker run -d -p 5003:5003 codex

Deploying to a Server

  • Set up a reverse proxy with Nginx or Apache.
  • Use a process manager like gunicorn or supervisor to keep the app running.
  • Use a Cloud service (like Render, Vercel, AWS).

Screenshots

Screenshot 1 Screenshot 2 Screenshot 3 Screenshot 4 Screenshot 5 Screenshot 6 Screenshot 7

Contributing

Feel free to open issues or submit pull requests for improvements!

About

Telex integration/plugin that sends a coding challenge in a channel every morning to sharpen developer skills.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages