Skip to content

vshakitskiy/simapi

Repository files navigation

With ♥ by vshakitskiy

preview

About

SimApi is a simple api to compare 2 texts. To make a request, you need to get the authorization token from the dashboard.

Features

  • Responsive UI
  • Dark/Light mode
  • Protected Routes
  • Rate Limiting
  • Request Tracking via Dashboard

Getting started

  1. Get postgresql database URLS (default and direct). In my case, i'm using Neon:
# .env.example - database
DATABASE_URL=
DIRECT_URL=
  1. Get URL and SECRET from the Upstash Redis:
# .env.example - redis
REDIS_URL=
REDIS_SECRET=
  1. Get Hugging Face key from Settings / Access Token (settings/tokens):
# .env.example - huggingface
HUGGINGFACE_API_KEY=
  1. Application is using Google Auth, so get Client ID and secret from Google Cloud Console:
# .env.example - googleclient
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
  1. And finally about env, place url of the website & generate secret key for next auth (the best way is via OpenSSL, running command openssl rand -base64 [Number of Bytes]):
# .env.example - nextauth
NEXTAUTH_SECRET=
NEXTAUTH_URL=
  1. Install packages, run the command to reflect the state of your Prisma schema and generate prisma client:
$> pnpm i
$> pnpx prisma db push
$> pnpx prisma generate
  1. Run the dev command:
$> pnpm dev