OH! NO!! Scrolling through social media until 3 AM AGAIN?!
What happened to "just 5 minutes"?! What happened to "early to bed"?!
Don't panic - Let ZenBlock rescue your self-control!
A "Forced Intervention + Data Visualization" Tool to Reclaim Your Time
This is a pure vibe-coding project, never expect any quality assurance or after-sales service, unless you are willing to fix it yourself (which I also actively welcome).
English | 🇨🇳 简体中文
- 📱 "Just a quick check" → 3 hours later: "OMG it's 3 AM?!"
- 🎮 "One more round then sleep" → Sunrise: "Did I... pull an all-nighter?"
- 🛒 "Quick browse" → Cart: "You have 137 items waiting"
- 📺 "Scroll for a bit" → Boss: "You're fired"
If you recognize these symptoms, you NEED ZenBlock!
- 🚫 One-click generation of Tampermonkey scripts to block your "time black holes"
- 🔒 Try to open site → Instantly redirected to "Sage Mode" page
- 🧘 Heal your dopamine addiction with Stoic philosophy quotes
- 📈 24-hour heatmap: See when you're most vulnerable
- 📅 30-day calendar view: Spot your "relapse days" at a glance
- 🎯 Multi-site tracking: Precisely target each bad habit
- 🌓 Light/Dark theme: Protect your eyes
- 🗣️ Bilingual (EN/中文): For global users
- 💾 100% Offline: Your data stays local, privacy guaranteed
- 📱 Responsive: Check stats on any device
The easiest way to get started! No environment configuration needed.
Pull and run from Docker Hub or GitHub Container Registry:
Option 1: Docker Hub
# Pull the latest image
docker pull malossov/zenblock:latest
# Run the container
docker run -d \
--name zenblock \
-p 3000:3000 \
-v ./zenblock-data:/app/data \
malossov/zenblock:latestOption 2: GitHub Container Registry
# Pull the latest image
docker pull ghcr.io/malossov/zenblock:latest
# Run the container
docker run -d \
--name zenblock \
-p 3000:3000 \
-v ./zenblock-data:/app/data \
ghcr.io/malossov/zenblock:latest# Start service (creates and runs container)
docker-compose -f docker/docker-compose.yml up -d
# View logs
docker-compose -f docker/docker-compose.yml logs -f zenblock
# Stop service
docker-compose -f docker/docker-compose.yml down# Build image
docker build -f docker/Dockerfile -t zenblock .
# Run container with data persistence
docker run -d \
--name zenblock \
-p 3000:3000 \
-v ./zenblock-data:/app/data \
zenblock
# View logs
docker logs -f zenblock
# Stop and remove container
docker stop zenblock && docker rm zenblockThe Docker setup includes:
- ✅ Automatic database migration on startup
- ✅ Data persistence - SQLite database stored in
./zenblock-data/on your host - ✅ Health checks - Container monitors application health every 30s
- ✅ Production optimization - Uses Next.js standalone output for minimal image size
- ✅ Auto-restart - Container restarts automatically on failure (unless-stopped policy)
Data Location:
- Database files are stored in
./zenblock-data/dev.dbon your local machine - You can backup/restore by copying this directory
- Data persists even if you remove and recreate containers
Access Application:
- 🇨🇳 Chinese: http://localhost:3000/zh
- 🇬🇧 English: http://localhost:3000/en
npm install
# or
pnpm installWindows:
scripts\start.batMac/Linux:
chmod +x scripts/start.sh
./scripts/start.shThe script automatically:
- Checks and installs dependencies
- Syncs database
- Starts dev server
- Opens browser at http://localhost:3000
- 🇨🇳 Chinese: http://localhost:3000/zh
- 🇬🇧 English: http://localhost:3000/en
- Open ZenBlock homepage
- Enter domain:
youtube.com - Click "Generate Interception Script"
- Click "Install Script" button
- Tampermonkey auto-installs
- ✅ Done! Opening YouTube now shows Sage Mode
Demo Effect:
You: *clicks YouTube icon*
YouTube: Loading...
ZenBlock: 🛑 Breathe. This is your 7th attempt today.
Marcus Aurelius: "Waste no more time arguing what a good man should be. Be one."
You: 💪 Alright! Time to work!
Click "View Dashboard" to see:
- Today's Attempts: How many times you tried today
- Total Attempts: Your lifetime shame count
- 24-Hour Distribution: When you're most vulnerable
- 30-Day Heatmap: Visual calendar of relapses
24-Hour Distribution Example:
23:00-03:00 ████████████████████ <- Your prime relapse hours
03:00-07:00 ██ <- Finally asleep
07:00-12:00 ████ <- Morning willpower
12:00-18:00 ██████████ <- Afternoon collapse
Track and block multiple time-wasters:
Your Block List:
- youtube.com (87 attempts today)
- tiktok.com (23 attempts today)
- amazon.com (56 attempts today)
Total: 166 relapse attempts today
Edit messages/en.json or messages/zh.json:
{
"ZenQuotes": [
{
"text": "You again?!",
"author": "Your Conscience"
}
]
}# Access the database
docker exec -it zenblock sh
cd data
# Or if running locally
cd zenblock-data
# Export database
sqlite3 dev.db ".dump" > backup.sqlzenblock/
├── scripts/ # Operational scripts
│ ├── start.bat # Windows start script
│ ├── start.sh # Unix/Mac start script
│ ├── version-bump.bat # Windows version bump script
│ └── version-bump.sh # Unix/Mac version bump script
├── docker/ # Docker configuration files
├── messages/ # i18n translation files
├── prisma/ # Database schema and migrations
├── public/ # Static assets
└── src/ # Source code
├── actions/ # Server actions
├── app/ # Next.js app router pages
├── components/ # React components
├── i18n/ # Internationalization
└── lib/ # Utility libraries
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Database: SQLite + Prisma
- Styling: Tailwind CSS
- Charts: Recharts
- i18n: next-intl
- Deployment: Docker + Docker Compose
100% Offline - No internet needed, full privacy!
A: Yes, just uninstall the Tampermonkey script. But your relapse data will be recorded and your conscience will judge you.
A: Nope! All data stored locally in SQLite. Only you can see your stats.
A: Yes! Database files are stored in ./zenblock-data/ on your host machine, so data persists across container restarts and updates.
A: Simply copy the zenblock-data/ directory. Restore by copying it back.
A: Absolutely! Use Docker deployment for best results. Just make sure to expose port 3000 and configure your firewall.
A: Depends on you. Tools are just tools - real self-discipline comes from within. But at least you'll see how much time you're wasting daily.
Contributions welcome!
- Fork this repository
- Create feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push branch:
git push origin feature/amazing-feature - Submit Pull Request
MIT License - Use freely, don't blame me
- Marcus Aurelius - Thanks for Meditations
- All procrastinators - Without you, no project
- YouTube/TikTok/Amazon - Thanks for teaching me time is precious
P.S. If you can control yourself after reading this README, congratulations - you're already on the path to self-discipline! 🎉
P.P.S. If you still can't control yourself after using this tool, maybe it's time to consider a digital detox vacation 🏝️