π Features
- π Retrieve a comprehensive list of bad words via API
- β
Check if a specific word is considered inappropriate
- π User-friendly web interface for easy testing and usage
- π³ Docker support for simple deployment
π Usage
API Endpoints
| Method |
Endpoint |
Description |
| GET |
/healthz |
Health check endpoint |
| GET |
/api/words |
Get a list of bad words |
| GET |
/api/word/:word |
Check if a word is a bad word |
| GET |
/api/sentence/:sentence |
Check if a sentence contains bad words |
| POST |
/api/sentence |
Check if a sentence contains bad words |
| GET |
/api/replacer/:sentence |
Replace bad words in a sentence |
| POST |
/api/replacer |
Replace bad words in a sentence |
Web Interface
Access the intuitive web interface by navigating to badword.iamickdev.com
π TODO List
| Task |
Status |
Description |
| Migrate static word set to database |
βοΈ In Progress |
Move the static word set to a database for better management and scalability |
| Create endpoint to let everyone can add more word |
βοΈ In Progress |
Implement an API endpoint to allow users to add additional bad words dynamically |
| Add languages detector and support more languages |
π‘ Pending |
Integrate language detection to support filtering bad words in multiple languages |
π» Installation
- Clone this repository:
git clone https://github.com/arnonsang/badwords.git
- Navigate to the project directory:
cd your_project_dir
- Build and run via docker compose:
make up
- Access the application at
http://localhost:8089 in your browser.
βοΈ Makefile Commands
| Command |
Description |
make build |
Builds the Docker image |
make up |
Starts the application using Docker Compose |
make up-detached |
Starts the application in detached mode |
make down |
Stops and removes the containers |
make clean |
Removes the Docker image |
make restart |
Restarts the application |
make logs |
Tails the logs of the running containers |
make status |
Shows the status of the running containers |
π¦ Dependencies
- Go - The programming language powering the server
- Echo - High performance, extensible, minimalist Go web framework
- Tailwind CSS - A utility-first CSS framework for rapid UI development
π Project Structure
βββ assets
β βββ badwords.go
βββ docker-compose.yml
βββ Dockerfile
βββ go.mod
βββ go.sum
βββ LICENSE
βββ main.go
βββ Makefile
βββ presentation
β βββ server.go
βββ README.md
βββ static
β βββ android-chrome-192x192.png
β βββ android-chrome-512x512.png
β βββ apple-touch-icon.png
β βββ favicon-16x16.png
β βββ favicon-32x32.png
β βββ favicon.ico
β βββ images
β β βββ github-mark.svg
β βββ index.html
β βββ screenshot.png
β βββ site.webmanifest
βββ usecase
βββ badwords.go
π Contributing
Contributions, issues, and feature requests are welcome! Feel free to check issues page or open pull request.
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
We'd like to tip our hats to:
- The awesome folks at favicon.io for their fantastic favicon generator. It's made our app look snazzy!
- The brilliant minds at Carnegie Mellon University for providing a comprehensive list of bad words. Your work helps keep the internet a little cleaner!
Your resources have been invaluable in making this project shine. Thank you! π
Author
Made with β€οΈ by iamickdev
From JLR Lab
A Gen Z technology research, consulting and development team based in Thailand.