Skip to main content

Installation

AIPDFQuery is a Next.js application. So, you need to install Node.js@^20.0.0 (recommended) and npm@^8.0.0 (recommended) first.

VPS Installation

To install AIPDFQuery on your VPS, you can follow the instructions below.

Required install in linux VPS

Before you start the installation, ensure that you have run the following commands on your Linux VPS machine.

sudo apt-get install ca-certificates fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils

Little configuration is required to run the application on your VPS to properly work with the Website URL.

Run application

After the server configuration, you have to run the following commands to start the application.

1st step: Install the dependencies

The following command will install all the dependencies required to run the application.

npm install

2nd step: Set Environment Variables

You have to set the environment variables to work with your application. Follow the instructions Click here

tip

You will get the /.env.example file in the root directory of the application. You can rename it to /.env and set the environment variables.

3rd step: Reset database for production(If required)

The following command will reset your database.

npm run db:reset
Warning

Warning: This command will delete all the data from your database. So, be careful before running this command, if you have any data in your database.

4th step: Generate database schema

The following command will generate the database schema.

npm run db:generate

5th step: Push the database schema to the database

The following command will push the database schema to the database.

npm run db:push

6th step: Database seeding

Run the following command to seed the database.

npm run db:seed
tip

You can change the seeding information from prisma/seed.ts file

After running the above command, you will get an initial user to perform admin action.

  • Email: admin@aipdfquery.com
  • Password: admin123
  • isEmailVerified: true
  • role: ADMIN
  • status: ACTIVE

The following command will show your database where you can view, update and delete in your database. Prisma Studio

npm run db:studio

7th step: Build production

The following command will build the application for production.

npm run build

8th step: Start the application

The following command will start the application.

npm start
tip

Hope you have followed the instructions and the application is working properly. If you have any issues, please feel free to contact us. Click here

Resources