Skip to main content

Environment Variables

Overview

AIPDFQuery is a Next.js application. So, you need to install Node.js and npm first.

Application Environment Variables

AIPDFQuery application uses environment variables to manage the application configuration. You can write the environment variables in the .env file in the root directory of the application or set environment variables directly in the command line before starting your NextJs application.

Environment variables are essential for configuring your application. Ensure these variables are set correctly for optimal performance.

tip

Edit the /.env file in the root directory of the application and set the environment variables as per your application requirements. Please do not modify variables name.

.evn file is a plain text file that contains key-value pairs of the environment variables. Each key-value pair is separated by an equal sign =. The key-value pair is separated by a new line.

Env NameTypeDescriptionExample
DATABASE_URLstring
  • Required
  • MySQL Database
  • Case sensitive
  • Store information
mysql://<username>:<password>@localhost:3306/<database name>
OPENAI_API_KEYstring
  • Required
  • Open AI API key
  • Case sensitive
  • Communication with AI
sk-************2i6TMaabqyT3BlbkFJDwQu6*******
STRIPE_SECRET_KEYstring
  • Only for SaaS mode
  • Stripe Secret Key
  • Case sensitive
  • Payment Gateway
  • Get Here
sk_*********IQUNm2q9BcmT40i5w4XEOu8g****
STRIPE_WEBHOOK_SECRETstring
  • Only for SaaS mode
  • Stripe Webhook Secret
  • Case sensitive
  • Payment process api
  • Get Here
whsec_******2791f47b154600323acd*****
STRIPE_SUB_PRICE_IDstring
  • Only for SaaS mode
  • Stripe subscription price ID
  • Case sensitive
  • Get Here
price_****bSGhxFjEvH****
PINECONE_API_KEYstring
  • Required
  • Pinecone API Key
  • Case sensitive
  • Pinecone for long-term AI vector storage
  • Get Here
6c4f0549-*****-82d3-013a6****
PINECONE_ENVIRONMENTstring
  • Required
  • Pinecone Environment name
  • Case sensitive
  • Get Here
gcp-starter
PINECONE_INDEX_NAMEstring
  • Required
  • Pinecone index name
  • Case sensitive
  • Get Here
aipdfquery
NEXTAUTH_URLstring
  • Required
  • NextAuth.js
  • Case sensitive
  • Your domain name
http://domainname.com
NEXTAUTH_SECRETstring
  • Required
  • NextAuth.js encryption secret
  • Encrypt token
3f9f053b-6604-47d7-b84a-4a3ad1505b0c
ORIGINstring
  • Required
  • Domain name
  • Case sensitive
  • Use inside application
http://domainname.com
EMAIL_VERIFY_OPTIONstring
  • Required
  • Email verification option turn on and off
  • Case sensitive
  • If ON, application will send email on create account, update password, change password and reset password.
ON or OFF only
IS_SENDGRIDstring
  • Required
  • Email verification method
  • Case sensitive
  • If ON, application will send email on create account, update password, change password and reset password vie SendGrid otherwise use Nodemailer.
ON or OFF only
SENDGRID_API_KEYstring
  • Only when EMAIL_VERIFY_OPTION is ON
  • SendGrid API Key
  • Case sensitive
  • Send email vie SendGrid.
  • Get Here
SG.H_***h2wg2qMOw.HorhIZPu6uNWQvfjl****
EMAIL_VERIFY_TIME_EXPnumber
  • Required
  • Email verification time end
  • Token expired after the time duration.
600000 milliseconds.
  1. SMTP_HOST
  2. SMTP_PORT
  3. SMTP_EMAIL
  4. SMTP_EMAIL_PASSWORD
  1. string
  2. number
  3. string
  4. string
  • This fields are required, if the IS_SENDGRID is OFF
  • SMTP Email Config
  • Send email with SMTP
  1. smpt.aipdfquery.com
  2. 465
  3. support@aipdfquery.com
  4. password123 - SMTP_EMAIL email password.
JWT_SECRETstring
  • Required
  • Jsonwebtoken secret
  • Protect session encryption.
3f9f053b-6604-47d7-b84a-4a3ad1505b0c
  1. FREE_PRICING
  2. PRO_PRICING
number
  • Only for SaaS mode
  • PRO subscription price
  • Must be similar with Stripe subscription price.
  1. 0 - Always be 0.
  2. 9.99
  1. FREE_ACCOUNT_NAME
  2. FREE_ACCOUNT_SLUG
  3. PRO_ACCOUNT_NAME
  4. PRO_ACCOUNT_SLUG
  5. PERSONAL_ACCOUNT_NAME
  6. PERSONAL_ACCOUNT_SLUG
string
  • 1st 4 values are required in SaaS mode, and rest of all in PERSONAL mode.
  • Subscription names
  • Use for functionalities in application.
  1. Free
  2. free
  3. Pro
  4. pro
  5. Personal
  6. personal
  1. USING_MODE
  2. NEXT_PUBLIC_USING_MODE
string
  • Required
  • Application mode name.
  • 1st for server and 2nd for client.
PERSONAL or SaaS only
  1. MY_APP_NAME
  2. NEXT_PUBLIC_MY_APP_NAME
string
  • Required
  • Application name.
  • Use in the application and 1st for server and 2nd for client.
AIPDFQuery
  1. SUPPORT_EMAIL
  2. FB_URL
  3. TWITTER_URL
string
  • Required
  • Application Settings
  • Use in the application to interact with application social media.
  1. support@aipdfquery.com
  2. https://facebook.com/aipdfquery
  3. https://x.com/aipdfquery

Resources: