Skip to content

McHeff/ProfanitySanitizer

Repository files navigation

ProfanitySanitizer

This app is a simple profanity filter demo. It sanitizes user input based on a list of banned words — any profanity gets replaced with asterisks (*) to keep things clean.

Built using ASP.NET Core, MSSQL, and MudBlazor for the UI.

What the App Does

  • The Home page provides quick navigation links.

  • The Chat page lets you test the profanity filter:

    • Accepts user input
    • Passes it through a client-side chat service
    • Uses a generic service to dispatch the request to the backend API
    • The API sanitizes the message and saves it via the database
  • The Banned Words page displays a grid with full CRUD functionality:

    • You can create, read, update, and delete banned words in the UI.
    • It talks to the backend via REST — no direct database access.
  • There's also a Swagger link in the nav for exploring and testing the API directly.

Getting Started

  1. Run the script: [GetStarted.sql]
  2. Build and run the solution
  3. Launch the app and navigate around!

Performance Enhancements (Ideas)

  • Cache the banned words list to reduce database reads during chat sanitization.
  • Add pagination to the banned words grid for better performance at scale.

UI Enhancements (Ideas)

  • Add authentication to restrict access to the banned words page.
  • Limit banned word editing to Admin roles only.
  • Allow banned words to be exported to CSV/Excel.
  • Upgrade the chat interface to real-time using SignalR.

Notes

This project was built as part of a test assignment to demonstrate:

  • REST API development in .NET
  • CRUD over MSSQL
  • Blazor frontend integration
  • Clean architecture and extensibility

How it should be deployed in a production app

  • I think maybe using something like Azure App Services could be one way to go
  • The backend could be Azure API Management or Azure Functions
  • The database could be Azure SQL Database
  • Using B2C for authentication and authorization could be a good idea
  • Using Azure Blob Storage for static files and images could be a good idea as well
  • Using Azure Cache for Redis for caching the banned words list could be a good idea as well

Thanks for checking out my demo, and remember... You're a wizard Harry!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors