A Node.js automation tool for Stack Overflow that performs automated voting, spell-checking, and post editing. Built in 2021 as an educational project to explore web automation and content quality improvement on Stack Overflow.
- π³οΈ Automated voting on questions with specific tags
- βοΈ Spell-checking and grammar correction on posts
- π Smart detection of mistakes outside code blocks
- π Scoring system for multi-mistake posts
- π€ Daily automation combining voting and editing
- π Activity logging and reporting
flowchart TB
Start([Start Bot])
Start --> Config[Load Configuration]
Config --> Auth[Authenticate with Stack Overflow]
Auth --> Mode{Select Mode}
Mode -->|Vote| VoteFlow[Vote Script]
Mode -->|Fix| FixFlow[Fix Script]
Mode -->|Daily| DailyFlow[Daily Script]
VoteFlow --> FindQuestions[Find Questions by Tags]
FindQuestions --> RandomSelect[Random Selection]
RandomSelect --> CastVotes[Cast Votes]
CastVotes --> LogVote[Log Actions]
FixFlow --> ScanPosts[Scan Posts for Mistakes]
ScanPosts --> DetectPattern[Pattern Detection]
DetectPattern --> CalcScore[Calculate Score]
CalcScore --> ApplyFix[Apply Corrections]
ApplyFix --> LogFix[Log Corrections]
DailyFlow --> VotePhase[Voting Phase<br/>20 votes]
VotePhase --> EditPhase[Edit Phase<br/>N posts]
EditPhase --> Report[Generate Report]
LogVote --> RateLimit{Rate Limit Check}
LogFix --> RateLimit
Report --> RateLimit
RateLimit -->|Wait| Delay[Apply Delay]
RateLimit -->|Continue| NextOp{More Operations?}
Delay --> NextOp
NextOp -->|Yes| Mode
NextOp -->|No| End([End])
style Start fill:#90EE90
style End fill:#FFB6C1
style Auth fill:#87CEEB
style RateLimit fill:#FFD700
- Node.js (v14 or higher)
- NPM package manager
- Stack Overflow account (development account recommended for testing)
- Modern web browser (Chrome/Chromium for Puppeteer)
- Clone the repository:
git clone https://github.com/orassayag/stackoverbot.git
cd stackoverbot- Install dependencies:
npm install-
Configure the application (see Configuration section)
-
Run the application:
npm startConfigure the bot behavior in your configuration file:
accountEmail: Stack Overflow account emailaccountPassword: Stack Overflow account password (use environment variables)targetTags: Array of tags to target for votingvoteCount: Number of votes per run (default: 20)editCount: Number of posts to edit per run
delayBetweenActions: Milliseconds between operations (default: 5000)spellCheckPatterns: Custom regex patterns for spell checkingscoreThreshold: Minimum score for multi-mistake detectionheadless: Run browser in headless mode (default: true)
Performs automated voting on random questions:
npm run voteScans and fixes spelling mistakes on posts:
npm run fixRuns daily automation (voting + editing):
npm run dailyCreates backup of configuration and data:
npm run backupstackoverbot/
βββ misc/
β βββ backups/ # Backup files
β βββ documents/ # Planning and task documents
βββ src/ # Source code (to be implemented)
β βββ scripts/ # Main automation scripts
β βββ services/ # Business logic
β βββ utils/ # Utility functions
β βββ config/ # Configuration management
βββ README.md
βββ CONTRIBUTING.md
βββ INSTRUCTIONS.md
βββ LICENSE
βββ package.json
sequenceDiagram
participant User
participant Bot
participant Browser
participant StackOverflow
User->>Bot: Start Daily Script
Bot->>Browser: Launch Puppeteer
Browser->>StackOverflow: Navigate & Authenticate
StackOverflow-->>Browser: Session Created
loop Voting Phase (20 times)
Bot->>Browser: Find Questions by Tag
Browser->>StackOverflow: Query Questions
StackOverflow-->>Browser: Questions List
Bot->>Browser: Select Random Question
Browser->>StackOverflow: Cast Vote
StackOverflow-->>Browser: Vote Registered
Bot->>Bot: Wait (Rate Limit)
end
loop Editing Phase (N times)
Bot->>Browser: Scan Posts
Browser->>StackOverflow: Get Post Content
StackOverflow-->>Browser: Post Data
Bot->>Bot: Detect Spelling Mistakes
Bot->>Bot: Calculate Score
Bot->>Browser: Apply Corrections
Browser->>StackOverflow: Submit Edit
StackOverflow-->>Browser: Edit Saved
Bot->>Bot: Wait (Rate Limit)
end
Bot->>User: Generate Report
Browser->>Browser: Close
This bot must be used responsibly and in compliance with:
- Stack Overflow Terms of Service
- Stack Overflow API Guidelines
- Community guidelines and best practices
- Test First: Always test on development accounts for 2-3 weeks
- Rate Limiting: Implement generous delays between operations
- Captcha Respect: Stop automation if captcha appears
- Quality Edits: Only make edits that genuinely improve content
- No Spam: Avoid repetitive or low-quality actions
- Transparency: Consider disclosing bot usage where appropriate
Users are responsible for ensuring their use of this tool complies with all applicable laws, terms of service, and community guidelines. The author assumes no liability for misuse.
This project is currently in planning stage. The core functionality described in this README is based on the original design specifications found in misc/documents/todo_tasks.txt.
Contributions to this project are released to the public under the project's open source license.
Everyone is welcome to contribute. Contributing doesn't just mean submitting pull requestsβthere are many different ways to get involved, including answering questions and reporting issues.
Please feel free to contact me with any question, comment, pull-request, issue, or any other thing you have in mind.
- Or Assayag - Initial work - orassayag
- Or Assayag orassayag@gmail.com
- GitHub: https://github.com/orassayag
- StackOverflow: https://stackoverflow.com/users/4442606/or-assayag?tab=profile
- LinkedIn: https://linkedin.com/in/orassayag
This application has an MIT license - see the LICENSE file for details.