How sojinsamuel/auto-reply-bot-jsn works
Project type and purpose
• This is a small Node.js “tweet bot” application whose job is to:
a) pick a random keyword from a list
b) search for tweets on X (formerly Twitter) using the X API
c) pass tweet content to OpenAI for a generated reply
d) post that reply back on X
• It runs as a single JavaScript process (bot.js), driven by configuration in config.js and environment variables.
File structure
• Top‐level files only:
• bot.js – main application logic
• config.js – holds the OpenAI prompt/personality settings
• package.json / package-lock.json
• .gitignore, README.md, notes.txt
• config is pulled from a .env file (not checked in)
• No frontend, no database, no microservices—just one service that interacts with two external APIs.
Key README insights
• Required: Node.js ≥20, your X developer credentials, and an OpenAI API key.
• You customize bot behavior via the .env and by editing:
• config.js (the AI prompt/personality)
• the keyword list inside bot.js’s getRandomString() function.