Skip to content

utkarsh5026/inpeace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

82 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง˜โ€โ™‚๏ธ InPeace

Find Peace Through Mindful Browsing

A Chrome extension that makes you think twice before accessing distracting websites

License: MIT TypeScript Chrome Extension Manifest V3

Features โ€ข Demo โ€ข Installation โ€ข How It Works โ€ข Development


๐ŸŽฏ The Intention

InPeace isn't just another website blocker. It's a productivity tool with a psychological twist. When you attempt to visit a blocked site, you'll face a multi-stage "shame ritual" designed to make you genuinely reconsider your choice.

The Four Stages of Reflection

1๏ธโƒฃ Disappointment
A reminder of what you're doing
2๏ธโƒฃ Flashlight Hunt
Find & click hidden button 10 times
3๏ธโƒฃ Reflection
Confront your choices
4๏ธโƒฃ Commitment
Acknowledge you're wasting time

The Goal: Add enough friction and self-reflection that you'll often decide it's not worth it.


โœจ Features

๐Ÿ›ก๏ธ Protection

  • ๐Ÿšซ Block unlimited distracting websites
  • โฑ๏ธ 30-minute temporary whitelist after ritual
  • ๐Ÿ”„ Sync settings across Chrome browsers
  • ๐ŸŒ Modern Declarative Net Request API

๐ŸŽฎ Experience

  • ๐ŸŽญ Multi-stage psychological ritual
  • ๐Ÿ”ฆ Interactive flashlight search challenge
  • ๐ŸŒ“ Beautiful dark mode blocked page
  • ๐Ÿ“Š Track daily visit attempts per site

๐ŸŽฌ Demo

demo.mp4
๐Ÿ“น View Demo Video

๐Ÿ“ฆ Installation

๐Ÿ‘ฅ For Users

  1. Download the latest release
  2. Open Chrome and navigate to chrome://extensions/
  3. Enable "Developer mode" (toggle in top-right corner)
  4. Click "Load unpacked"
  5. Select the dist folder from the downloaded release

๐Ÿ‘จโ€๐Ÿ’ป For Developers

# Clone the repository git clone https://github.com/yourusername/inpeace.git cd inpeace # Install dependencies npm install # Build the extension npm run build # The extension is now built in the 'dist' folder

Load in Chrome:

  1. Navigate to chrome://extensions/
  2. Enable "Developer mode"
  3. Click "Load unpacked"
  4. Select the dist folder

โš™๏ธ Development

๐Ÿ› ๏ธ Available Scripts

Command Description
npm run build ๐Ÿ—๏ธ Build production version
npm run dev ๐Ÿ‘€ Watch mode for development
npm run clean ๐Ÿงน Clean dist folder
npm run format โœจ Format code with Prettier
npm test ๐Ÿงช Run tests

๐Ÿ—๏ธ Tech Stack

TypeScript
TypeScript
Type-safe code
Webpack
Webpack
Module bundling
Tailwind CSS
Tailwind CSS
Modern styling
Chrome
Manifest V3
Latest API
Vitest
Vitest
Unit testing

๐Ÿ“ Project Structure

inpeace/ โ”œโ”€โ”€ ๐Ÿ“‚ src/ โ”‚ โ”œโ”€โ”€ ๐Ÿ”ง background.ts # Background service worker & blocking logic โ”‚ โ”œโ”€โ”€ ๐ŸŽจ popup.ts # Extension popup UI logic โ”‚ โ”œโ”€โ”€ ๐ŸŽญ blocked.ts # Shame ritual implementation โ”‚ โ””โ”€โ”€ ๐Ÿ“˜ types.ts # TypeScript type definitions โ”œโ”€โ”€ ๐Ÿ“‚ public/ โ”‚ โ”œโ”€โ”€ ๐Ÿ–ผ๏ธ popup.html # Extension popup โ”‚ โ”œโ”€โ”€ ๐Ÿšซ blocked.html # Blocked page view โ”‚ โ”œโ”€โ”€ ๐Ÿ’… blocked.css # Blocked page animations & styles โ”‚ โ”œโ”€โ”€ ๐ŸŽจ styles.css # Global styles โ”‚ โ””โ”€โ”€ โš™๏ธ manifest.json # Extension manifest โ”œโ”€โ”€ ๐Ÿ“‚ tests/ โ”‚ โ””โ”€โ”€ ๐Ÿงช unit/ # Unit tests โ”œโ”€โ”€ โš™๏ธ webpack.config.js # Webpack configuration โ”œโ”€โ”€ โš™๏ธ tailwind.config.js # Tailwind configuration โ””โ”€โ”€ ๐Ÿ“ฆ package.json # Dependencies & scripts 

๐Ÿ” How It Works

1 Blocking โ†’ Uses Chrome's Declarative Net Request API to intercept requests to blocked websites
2 Redirect โ†’ Automatically redirects to a custom "blocked" page with the shame ritual
3 Ritual โ†’ User must complete four psychological stages designed to create friction
4 Whitelist โ†’ After completion, site is temporarily whitelisted for 30 minutes
5 Statistics โ†’ Tracks daily visit attempts per site to show usage patterns

๐Ÿค Contributing

Contributions, issues, and feature requests are welcome!

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

For major changes, please open an issue first to discuss what you would like to change.


๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments

  • Inspired by the need for mindful technology use
  • Built with modern web technologies and Chrome Extension APIs
  • Thanks to all contributors who help improve InPeace

Made with โค๏ธ and โ˜• for a more focused web

โฌ† Back to Top

About

Website blocker with a twist: search in the dark, click 10 times, confront your shame. Adds enough friction that you'll actually stay focused. ๐Ÿง˜โ€โ™‚๏ธ

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors