Skip to content

marcbal77/DuolingoStreakApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

    ____              _____ __                  __      __ __
   / __ \__  ______  / ___// /_________  ____ _/ /__   / //_/__  ___  ____  ___  _____
  / / / / / / / __ \ \__ \/ __/ ___/ _ \/ __ `/ //_/  / ,< / _ \/ _ \/ __ \/ _ \/ ___/
 / /_/ / /_/ / /_/ /___/ / /_/ /  /  __/ /_/ / ,<    / /| /  __/  __/ /_/ /  __/ /
/_____/\__,_/\____//____/\__/_/   \___/\__,_/_/|_|  /_/ |_\___/\___/ .___/\___/_/
                                                                  /_/    [JavaScript]

πŸ”₯ Duo Streak Keeper JS

🌍 Keep Your Language Learning Streak Alive πŸ“š

⚠️ Important: This is an educational project demonstrating API integration with Node.js. It uses unofficial Duolingo endpoints that may change without notice. Use at your own risk β€” automated use may violate Duolingo's Terms of Service.


πŸ¦‰ What Does This Do?

This tool automatically purchases streak freezes for your Duolingo account when needed, protecting your learning progress. Run it daily and it will:

  1. βœ… Log into your Duolingo account
  2. βœ… Check if you have an active streak freeze
  3. βœ… Purchase one (200 gems) if you don't
  4. βœ… Send you an email notification (optional)

No more losing your streak because you forgot to practice!


πŸŽ“ Quick Start (Non-Coders Welcome!)

What You'll Need

  • Node.js 18+ β€” Download here
  • A Duolingo account with 200+ gems
  • 15 minutes to set up

Step-by-Step Setup

1. Download the project

git clone https://github.com/marcbal77/DuolingoStreakApp.git
cd DuolingoStreakApp

2. Install dependencies

npm install

3. Create your config file

cp .env.example .env

4. Add your credentials

Open .env in any text editor and fill in:

DUOLINGO_USERNAME=your_email_or_username
DUOLINGO_PASSWORD=your_password

5. Test it out

npm run dry-run

6. Run for real

npm start

πŸ’» For Developers

Project Structure

duo-streak-keeper-js/
β”œβ”€β”€ index.js              # CLI entry point
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ duolingo-api.js   # API client
β”‚   β”œβ”€β”€ streak-manager.js # Business logic
β”‚   └── notifications.js  # Email alerts
β”œβ”€β”€ .env.example          # Config template
└── package.json

CLI Options

node index.js              # Run streak keeper
node index.js --dry-run    # Preview without purchasing
node index.js --status     # Check current streak info
node index.js --no-email   # Disable email notifications
node index.js --help       # Show all options

npm Scripts

npm start      # Run streak keeper
npm run dry-run   # Preview mode
npm run status    # Check status only

πŸ“§ Email Notifications

Get alerts when:

  • βœ… Streak freeze purchased
  • ⚠️ Gem balance running low
  • ❌ Unable to purchase (not enough gems)
  • πŸ’” Streak broken

Gmail Setup:

  1. Enable 2-Step Verification
  2. Create an App Password
  3. Add to .env:
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASS=your_app_password
NOTIFICATION_EMAIL=your_email@gmail.com

⏰ Automation

Cron (Mac/Linux)

Run daily at 11 PM:

crontab -e

Add:

0 23 * * * cd /path/to/DuolingoStreakApp && node index.js >> /dev/null 2>&1

GitHub Actions (Free & Serverless)

Create .github/workflows/streak.yml:

name: Maintain Streak

on:
  schedule:
    - cron: '0 23 * * *'
  workflow_dispatch:

jobs:
  maintain:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
      - run: npm install
      - run: node index.js
        env:
          DUOLINGO_USERNAME: ${{ secrets.DUOLINGO_USERNAME }}
          DUOLINGO_PASSWORD: ${{ secrets.DUOLINGO_PASSWORD }}

πŸ”’ Security & Privacy

  • βœ… Credentials stored locally in .env (never committed)
  • βœ… Password cleared from memory after login
  • βœ… No data sent anywhere except Duolingo's servers
  • βœ… Open source β€” inspect the code yourself

βš–οΈ Legal

Disclaimer: This software is provided "as is" without warranty. The author is not responsible for any consequences of using this tool, including but not limited to account suspension.

Terms of Service: Using automated tools with Duolingo may violate their ToS. Use at your own risk for educational/personal purposes only.


🐍 Looking for Python?

This is the JavaScript/Node.js version. There's also a Python version available:

Version Repository Best For
JavaScript (you are here) DuolingoStreakApp Node.js users, web developers
Python duo-streak-keeper Python users, data scientists

Both versions have the same features β€” pick whichever language you prefer!


πŸ“ License

MIT License β€” see LICENSE for details.


🀝 Contributing

Found a bug? Have an idea? Open an issue or submit a PR!


Built with β˜• to protect πŸ”₯ streaks

About

πŸ”₯ Automated Duolingo streak protection - Educational JavaScript API client (unofficial, use at own risk)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors