{"id":26678203,"url":"https://github.com/telexintegrations/codex","last_synced_at":"2025-03-26T05:15:11.495Z","repository":{"id":278218137,"uuid":"934909582","full_name":"telexintegrations/codex","owner":"telexintegrations","description":" Telex integration/plugin that sends a coding challenge in a channel every morning to sharpen developer skills.","archived":false,"fork":false,"pushed_at":"2025-02-23T15:23:29.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T16:26:33.532Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/telexintegrations.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-18T15:47:30.000Z","updated_at":"2025-02-23T15:23:33.000Z","dependencies_parsed_at":"2025-02-23T16:37:04.355Z","dependency_job_id":null,"html_url":"https://github.com/telexintegrations/codex","commit_stats":null,"previous_names":["tonybnya/codex","telexintegrations/codex"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telexintegrations%2Fcodex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telexintegrations%2Fcodex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telexintegrations%2Fcodex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telexintegrations%2Fcodex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/telexintegrations","download_url":"https://codeload.github.com/telexintegrations/codex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245591533,"owners_count":20640692,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-26T05:15:09.964Z","updated_at":"2025-03-26T05:15:11.485Z","avatar_url":"https://github.com/telexintegrations.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Codex: Telex Coding Challenge Integration\n\nCodex is a [Telex](https://telex.im) integration that posts a coding challenge from [Codewars](https://www.codewars.com) in a specified channel every morning.\nThis helps developers enhance their problem-solving skills daily.\n\n## Features\n\n- Automatically fetches and posts a new Codewars challenge every day.\n- Provides a direct link to the challenge for easy access.\n- Encourages continuous skill improvement through daily problem-solving.\n- Configurable interval for challenge posting.\n\n## Setup Instructions\n\n### Prerequisites\n\n- Python 3.8+\n- [Flask](https://flask.palletsprojects.com/)\n- [httpx](https://www.python-httpx.org/)\n- Telex account\n\n### Installation\n\n1. Clone this repository:\n\n   ```sh\n   git clone https://github.com/tonybnya/codex.git\n   cd codex\n   ```\n\n2. Create and activate a virtual environment:\n\n   ```sh\n   python3 -m venv venv\n   source venv/bin/activate  # On Windows use: venv\\\\Scripts\\\\activate\n   ```\n\n3. Install dependencies:\n\n   ```sh\n   pip install -r requirements.txt\n   ```\n\n4. Create a `.env` file and add the necessary configuration:\n\n   ```sh\n   FLASK_PORT=5000\n   FLASK_DEBUG=True\n   ```\n\n5. Run the Flask server:\n\n   ```sh\n   python3 main.py\n   ```\n\n### Configuration\n\nThe integration exposes a `GET` endpoint `/coding_challenge` where Telex can fetch metadata about the app.\n\n- **Tick URL**: This is the webhook Telex will call periodically.\n  - Endpoint: `POST /tick`\n  - Payload:\n\n    ```json\n    {\n      \"channel_id\": \"\u003ctelex_channel_id\u003e\",\n      \"return_url\": \"\u003ctelex_webhook_url\u003e\",\n      \"settings\": [\n        {\"label\": \"interval\", \"type\": \"text\", \"required\": true, \"default\": \"0 9 * * *\"}\n      ]\n    }\n    ```\n\n## Testing the Integration\n\nYou can manually test the integration by triggering a tick request:\n\n```sh\ncurl -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 * * *\"}]}'\n```\n\nOR\n\nYou can run Unit Tests:\n\n```sh\npytest -v\n```\n\n## Deployment\n\n### Using Docker\n\n1. Build the Docker image:\n\n   ```sh\n   docker build -t codex .\n   ```\n\n2. Run the container:\n\n   ```sh\n   docker run -d -p 5003:5003 codex\n   ```\n\n### Deploying to a Server\n\n- Set up a reverse proxy with Nginx or Apache.\n- Use a process manager like `gunicorn` or `supervisor` to keep the app running.\n- Use a Cloud service (like Render, Vercel, AWS).\n\n## Screenshots\n\n![Screenshot 1](https://i.postimg.cc/dVyYrJbz/codex-1.png)\n![Screenshot 2](https://i.postimg.cc/KvVb11HP/codex-2.png)\n![Screenshot 3](https://i.postimg.cc/1z017J5B/codex-3.png)\n![Screenshot 4](https://i.postimg.cc/q7HdG90g/codex-4.png)\n![Screenshot 5](https://i.postimg.cc/DZBkn0Gb/codex-5.png)\n![Screenshot 6](https://i.postimg.cc/5yyc0J5K/codex-6.png)\n![Screenshot 7](https://i.postimg.cc/KjH63WJG/codex-7.png)\n\n## Contributing\n\nFeel free to open issues or submit pull requests for improvements!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelexintegrations%2Fcodex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftelexintegrations%2Fcodex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelexintegrations%2Fcodex/lists"}