Skratch56 / SensitiveWords

This proeject provides a filtering service that censors sensitive words in chat applications. It aims to avoid the displaying of unwanted content, such as SQL keywords, profanity, or any other terms flagged as sensitive.

Repository from Github https://github.comSkratch56/SensitiveWordsRepository from Github https://github.comSkratch56/SensitiveWords

SensitiveWords API

Alright, so here’s what this is. This little Spring Boot project lets you scan a message and mask out any sensitive or blacklisted words you don’t want floating around in plain text.

There’s also full CRUD support, so you can add, update, or delete those sensitive words whenever you feel like the list needs tweaking.

Swagger is set up too, so you can poke around the endpoints without needing to guess what's what.


So, what does it actually do?

In short:

  • Takes in a message and replaces sensitive words with asterisks
  • Stores those sensitive words in a real MSSQL database
  • Gives you endpoints to manage that list (create, read, update, delete)
  • Comes with a working Swagger UI so you can see and test the endpoints

Also yeah, there’s a Dockerfile in here that spins up an MSSQL instance locally on port 1433. It’ll load up a bit of starter data too, so you're not starting from zero.


How to get it running

  1. Make sure Docker is running on your machine.

  2. Spin up the MSSQL container (see the Docker bits in the repo).

  3. Update application.properties to match the container’s DB config. It's probably already good to go unless you've changed ports or credentials.

  4. Run the app with:

    ./mvnw spring-boot:run
    
  5. Visit http://localhost:8080/swagger-ui.html for the docs and a handy way to test stuff.


Quick API Peek

Here’s what you can hit:

  • POST /api/message/mask → Give it a message, get a masked one back

  • GET /api/sensitive-words → Get all sensitive words

  • POST /api/sensitive-words → Add a new word

  • PUT /api/sensitive-words/{id} → Update a word by ID

  • DELETE /api/sensitive-words/{id} → Delete a word by ID

About

This proeject provides a filtering service that censors sensitive words in chat applications. It aims to avoid the displaying of unwanted content, such as SQL keywords, profanity, or any other terms flagged as sensitive.


Languages

Language:Java 84.6%Language:TSQL 11.8%Language:Dockerfile 2.2%Language:Shell 1.4%