Skip to content

This is the base project directory for the SlangAI App.

License

Notifications You must be signed in to change notification settings

Rutam21/SlangAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SlangAI: Revolutionizing Slang Learning Experience

Cover

Table of Contents

Introduction

Welcome to SlangAI, the official repository for the SLANGAI.CO application. SlangAI is a cutting-edge web app designed to revolutionize the way you interact with slang. Leveraging advanced AI technology powered by Gemini, SlangAI provides accurate and engaging translations, generating slang sentences, and exploring the etymology of various slangs. This app is perfect for developers, writers, linguists, and anyone fascinated by the ever-evolving world of slang.

Walkthrough

You can find a short demo of the App below. Feel free to check it out yourself at https://slangai.co/.

SlangAI.Demo.Final.mp4

The demo is also uploaded on YouTube. Check it out!

YouTube

Features

Know the Slang

SlangAI offers the Know the Section that instantly finds the full forms and meanings of a given slang.

Know the Slang

Daily Slangs

This section offers users four new slang words daily, complete with their meanings and example sentences to illustrate their usage. The slang words are refreshed every day at 00:00 UTC.

Daily Slangs

Slang Etymology

This section enables the users to dive deep into the origins, evolution over time, and the cultural impact of a given slang.

Slang Etymology

Slangslator

In this section, the users can input a sentence that contains one or more slang terms and get it translated instantly to standard English.

Slangslator

Slangtence

This section randomly generates a sentence with slang and also provides its meaning for creative inspiration.

Slangtence

Other App Features

ShepherdJS App Tour

This app utilizes ShepherdJS to offer users a guided tour of its various functional sections, providing contextual information as soon as the webpage loads without any user intervention to start the tour.

App Tour Start

The App also uses ShepherdJS in the Slang Etymology section to display the results to the user. Here, as soon as the user clicks any of the headers in the result panel i.e., Origin or Evolution or Cultural Impact, it opens a tour step that shows the brief description of the header.

Slang Etymology Origin Response in ShepherdJS Tour Step

The ShepherdJS Tour window has been modified with CSS to match the app brand colors and maintain the aesthetics.

If the user completes the tour fully, then the tour is not shown again. A value named tour_complete is marked as TRUE and is stored in the local storage with a validity of 1 hour. The tour is shown again only after this value has expired i.e., after an hour.

Shepherd Bannner

Caching

The App has its caching mechanism in place to retrieve the results faster and keep the API limits for Gemini under control.

Caching is in use for the following sections in the App.

The cached data is stored in the local storage and stays valid for a maximum of 24 hours.

Error Handling

The App has implemented robust error handling to enhance the user experience and deliver clearer logs to troubleshoot in case of any failures.

Health Check

The app has a separate endpoint that serves as a health check update. When a user hits this endpoint, the server returns a 200 status if it is up and running.

Health Check Page

Others

The app has also used input validation to restrict misuse of the input forms and also has an animated loading screen to imply that the response is currently under processing.

Installation

  1. Clone the repository:
    git clone https://github.com/Rutam21/slangai.git
  2. Navigate to the project directory:
    cd slangai
  3. Install the dependencies:
    npm install
  4. Create a .env file with all the variables and their correct values as mentioned in the .env.example file.

Usage

  1. Start the development server:
    npm start
  2. Open your browser and navigate to http://localhost:3000.

API Endpoints

  • POST /getSlang

    • Description: Provides the full form and meaning of the input slang.
    • Request Body: JSON object with a text field.
    • Response: Slang Details.
  • GET /slangData

    • Description: Fetches 4 slangs that are updated daily at 00:00 UTC.
    • Response: JSON Array object with daily slangs, their meanings, and an expale sentence using them.
  • POST /getSlangEtymology

    • Description: Provides the etymology of a given slang.
    • Request Body: JSON object with a text field.
    • Response: Etymology of the slang containing its Origin, Evolution, and Cultural Impact.
  • POST /getSlangslator

    • Description: Translates a given sentence with slangs to standard English.
    • Request Body: JSON object with a text field.
    • Response: Standard English translation of the Slang Sentence.
  • GET /getSlangtence

    • Description: Fetches a random slang sentence.
    • Response: JSON object with slangtence and meaning.
  • GET /health

    • Description: Server health check endpoint.
    • Response: Server health status.

Contributing

We welcome contributions from the community! To contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add some feature').
  5. Push to the branch (git push origin feature-branch).
  6. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more details.


Thank you for using SlangAI! If you have any questions or feedback, feel free to open an issue or submit a pull request. Enjoy exploring and learning slang!


SalngAI Tech Stack Banner

About

This is the base project directory for the SlangAI App.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published