Skip to content

Username profanity checker that validates usernames for inappropriate content using Node.js

License

Notifications You must be signed in to change notification settings

apiverve/username-checker-node-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Username Profanity Checker | APIVerve API Tutorial

License: MIT Build Node.js Express APIVerve | Username Profanity

A Node.js web app for checking if usernames contain profanity. Perfect for user registration flows and community platforms.

Screenshot


Get Your Free API Key

This tutorial requires an APIVerve API key. Sign up free - no credit card required.


Features

  • Check usernames for inappropriate content
  • Real-time validation feedback
  • Visual safe/profane indicators
  • Example usernames to test
  • Clean, modern UI
  • Built with Express.js

Quick Start

  1. Clone this repository

    git clone https://github.com/apiverve/username-checker-node-tutorial.git
    cd username-checker-node-tutorial
  2. Install dependencies

    npm install
  3. Add your API key

    Set environment variable or edit server.js:

    export API_KEY=your-api-key-here
  4. Start the server

    npm start
  5. Open in browser

    Visit http://localhost:3000 and check usernames!

Project Structure

username-checker-node-tutorial/
├── server.js           # Express server & API endpoint
├── public/
│   └── index.html      # Frontend UI
├── package.json        # Dependencies
├── screenshot.jpg      # Preview image
├── LICENSE             # MIT license
├── .gitignore          # Git ignore rules
└── README.md           # This file

How It Works

  1. User enters a username
  2. Frontend sends GET request to /api/check
  3. Server calls the Username Profanity API
  4. API analyzes the username
  5. Frontend displays safe/profane result

The API Call

const response = await fetch(`https://api.apiverve.com/v1/usernameprofanity?username=${username}`, {
  method: 'GET',
  headers: {
    'x-api-key': API_KEY
  }
});

API Reference

Endpoint: GET https://api.apiverve.com/v1/usernameprofanity

Query Parameters:

Parameter Type Required Description
username string Yes The username to check

Example Response:

{
  "status": "ok",
  "error": null,
  "data": {
    "username": "cooluser123",
    "isProfane": false
  }
}

Use Cases

  • User Registration - Validate usernames during signup
  • Gaming Platforms - Enforce appropriate gamertags
  • Social Media - Screen display names
  • Forums - Moderate community usernames
  • Chat Apps - Filter inappropriate handles
  • E-commerce - Validate seller/buyer names

Customization Ideas

  • Add batch checking for multiple usernames
  • Suggest alternative usernames when profane
  • Add username availability checking
  • Integrate with signup forms
  • Store checked usernames in database
  • Add admin dashboard for moderation

Related APIs

Explore more APIs at APIVerve:

Free Plan Note

This tutorial works with the free APIVerve plan. Some APIs may have:

  • Locked fields: Premium response fields return null on free plans
  • Ignored parameters: Some optional parameters require a paid plan

The API response includes a premium object when limitations apply. Upgrade anytime to unlock all features.

License

MIT - see LICENSE

Links

About

Username profanity checker that validates usernames for inappropriate content using Node.js

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published