This is a Next.js project meant to demo the AI moderation functionality of OpenModerator. The project uses the open-source npm package content-checker to communicate with the OpenModerator API. You'll notice that the project uses route handlers to communicate with the API. This is to prevent the API key from being exposed in the browser.
-
First, get an API key for free from OpenModerator. Make sure to add
OPEN_MODERATOR_API_KEY
to your environment variables. -
Then, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
To learn more about OpenModerator and Next.js, take a look at the following resources:
- OpenModerator App - get an API key here for free
- Content Checker - npm package used to moderate content and interact with the API
- Next.js Documentation - learn about Next.js features and API.