|
| 1 | +<div align="center"> |
| 2 | + |
| 3 | +# Simple Bad Word Checker |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | +A simple and lightweight API for filtering and checking bad words, built with [Go](https://go.dev/) and [Echo](https://echo.labstack.com/). |
| 8 | + |
| 9 | +[Features](#🌟-features) • [Usage](#🚀-usage) • [Installation](#💻-installation) • [API](#api-endpoints) • [Contributing](#contributing) • [Acknowledgments](#acknowledgments) • [License](#license) |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +</div> |
| 14 | + |
| 15 | +## 🌟 Features |
| 16 | + |
| 17 | +- 📋 Retrieve a comprehensive list of bad words via API |
| 18 | +- ✅ Check if a specific word is considered inappropriate |
| 19 | +- 🌐 User-friendly web interface for easy testing and usage |
| 20 | +- 🐳 Docker support for simple deployment |
| 21 | + |
| 22 | +## 🚀 Usage |
| 23 | + |
| 24 | +### API Endpoints |
| 25 | + |
| 26 | +- **GET** `/healthz`: Check service health |
| 27 | +- **GET** `/api/words`: Get the list of bad words |
| 28 | +- **GET** `/api/words/:word`: Verify if a specific word is considered inappropriate |
| 29 | +- **GET** `/api/sentence/:sentence`: Check if a sentence contains bad words |
| 30 | + |
| 31 | +### Web Interface |
| 32 | + |
| 33 | +Access the intuitive web interface by navigating to [badword.iamickdev.com](https://badwords.iamickdev.com) |
| 34 | + |
| 35 | +## 💻 Installation |
| 36 | + |
| 37 | +1. Clone this repository: |
| 38 | +```bash |
| 39 | +git clone https://github.com/arnonsang/badwords.git |
| 40 | +``` |
| 41 | +2. Navigate to the project directory: |
| 42 | +```bash |
| 43 | +cd your_project_dir |
| 44 | +``` |
| 45 | +3. Build and run via docker compose: |
| 46 | +```bash |
| 47 | +docker-compose up -d |
| 48 | +``` |
| 49 | +4. Access the application at `http://localhost:8089` in your browser. |
| 50 | + |
| 51 | +## Makefile Commands |
| 52 | + |
| 53 | +| Command | Description | |
| 54 | +|---------|-------------| |
| 55 | +| `make build` | Builds the Docker image | |
| 56 | +| `make up` | Starts the application using Docker Compose | |
| 57 | +| `make up-detached` | Starts the application in detached mode | |
| 58 | +| `make down` | Stops and removes the containers | |
| 59 | +| `make clean` | Removes the Docker image | |
| 60 | +| `make restart` | Restarts the application | |
| 61 | +| `make logs` | Tails the logs of the running containers | |
| 62 | +| `make status` | Shows the status of the running containers | |
| 63 | + |
| 64 | +## Dependencies |
| 65 | + |
| 66 | +- [Go](https://golang.org/) - The programming language powering the server |
| 67 | +- [Echo](https://echo.labstack.com/) - High performance, extensible, minimalist Go web framework |
| 68 | +- [Tailwind CSS](https://tailwindcss.com/) - A utility-first CSS framework for rapid UI development |
| 69 | + |
| 70 | +## Project Structure |
| 71 | +```bash |
| 72 | +├── assets |
| 73 | +│ └── badwords.go |
| 74 | +├── docker-compose.yml |
| 75 | +├── Dockerfile |
| 76 | +├── go.mod |
| 77 | +├── go.sum |
| 78 | +├── main.go |
| 79 | +├── Makefile |
| 80 | +├── presentation |
| 81 | +│ └── server.go |
| 82 | +├── README.md |
| 83 | +├── static |
| 84 | +│ ├── android-chrome-192x192.png |
| 85 | +│ ├── android-chrome-512x512.png |
| 86 | +│ ├── apple-touch-icon.png |
| 87 | +│ ├── favicon-16x16.png |
| 88 | +│ ├── favicon-32x32.png |
| 89 | +│ ├── favicon.ico |
| 90 | +│ ├── index.html |
| 91 | +│ ├── screenshot.png |
| 92 | +│ └── site.webmanifest |
| 93 | +└── usecase |
| 94 | +└── badwords.go |
| 95 | +``` |
| 96 | + |
| 97 | +## Contributing |
| 98 | + |
| 99 | +Contributions, issues, and feature requests are welcome! Feel free to check [issues page](https://github.com/arnonsang/badwords/issues) or open [pull request](https://github.com/arnonsang/badwords/pulls). |
| 100 | + |
| 101 | +## License |
| 102 | + |
| 103 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
| 104 | + |
| 105 | +## Acknowledgments |
| 106 | + |
| 107 | +We'd like to tip our hats to: |
| 108 | + |
| 109 | +- The awesome folks at **[favicon.io](https://favicon.io/favicon-generator/)** for their fantastic favicon generator. It's made our app look snazzy! |
| 110 | +- The brilliant minds at **[Carnegie Mellon University](https://www.cs.cmu.edu/~biglou/resources/bad-words.txt)** for providing a comprehensive list of bad words. Your work helps keep the internet a little cleaner! |
| 111 | + |
| 112 | +Your resources have been invaluable in making this project shine. Thank you! 🌟 |
| 113 | + |
| 114 | +## Author |
| 115 | + |
| 116 | +Made with ❤️ by **[iamickdev](https://www.iamickdev.com)** |
| 117 | +- Website: [www.iamickdev.com](https://www.iamickdev.com) |
| 118 | +- Github: [@arnonsang](https://github.com/arnonsang) |
| 119 | + |
| 120 | +--- |
| 121 | + |
| 122 | +**From JLR Lab** |
| 123 | +*A Gen Z technology research, consulting and development team based in Thailand.* |
| 124 | + |
0 commit comments