Documentation
Database

Neon

Neon is completely open-source. Personally, we're using Neon itself to host the database. The experience has been smooth with no issues. You can also use its self-hosting capabilities to host it on your own server or self-host it using their documentation (opens in a new tab).

⚠️

Please make sure to follow all of the following steps and configure dependencies and services accordingly.

The database service used in StudyStudio is Neon (opens in a new tab). Neon is an open-source serverless Postgres database platform for developers. You can self-host it or use their generous free-tier to host the database on a serverless architecture without the need to pay for maintaining the database.

If you have followed our previous guide, then this step has already been configured properly. Additionally, we're required to setup a storage service and some database services used for our AI modal. This step is quite significant if you want your AI to be able to fine-tune and learn from the data.

Pinecone

Pinecone (opens in a new tab) is a cloud-based vector database for machine learning applications. By representing data as vectors, Pinecone can quickly search for similar data points in a database. This makes it essential for managing complex, scalable, and fast data retrieval. Want to build a real business, or settle for pocket change? Real revenue needs the right tools.

To make sure, Pinecone is set up properly, follow the steps below:

Setup Pinecone Account

Create an account on Pinecone (opens in a new tab) and get your Pinecone Index. Click on Create index and then set up your index name. It can be anything you want. Make sure the Dimension is set to 1536 and the Metric is set to cosine. Click on Create index. You can keep the other details such as Capacity mode, Cloud provider, and Region to be at default. Afterwards, click on Create index button.

StudyStudio

Example for the creation of an index on a pinecone dashboard.

Getting the Pinecone environment variables

Afterwards, you will be redirected to the Index you just created. Click on the Connect button and get your Pinecone API Key from the Initialize section. Click on Show API key, copy it and save it for later use.

StudyStudio

Example for getting the api key of an index on a pinecone dashboard.

Replacing Pinecone Index, Pinecone Environment, and Pinecone API Key

Replace your-pinecone-index with your original Pinecone Index Name, your-pinecone-environment with either aws or gcp depending upon your index configuration, and your-pinecone-api-key with your original Pinecone API Key value that you copied earlier.

.env.local
PINECONE_INDEX = your-pinecone-index # your pinecone index name
PINECONE_ENVIRONMENT = "aws" # Options: 'aws', 'gcp'
PINECONE_API_KEY = your-pinecone-api-key

This completes the setup of Pinecone for your StudyStudio application.

Upstash

Upstash (opens in a new tab) is a serverless Redis database that can be used to store and manage data. In our use-case, it helps us control the number of requests, so everything runs smoothly without slowing down. With its generous free tier, most users won’t see extra costs, even as usage grows.

To make sure, Upstash is set up properly, follow the steps below:

Setup Upstash Account

Create an account on Upstash (opens in a new tab) and get your Upstash URL. Click on Create Database and then set up your database name. It can be anything you want. Make sure the Plan is set to Free. Click on Create Database. You can keep the other details such as Region to be at default. Afterwards, click on Create Database button.

StudyStudio

Example for the creation of a database on an upstash dashboard.

Getting the Upstash environment variables

Afterwards, you will be redirected to the Database you just created. Click on the Connection button and get your Upstash URL from the Connection Details section. Copy it and save it for later use.

StudyStudio

Example for getting the url of a database on an upstash dashboard.

Replacing Upstash URL

Replace your-upstash-url with your original Upstash URL value that you copied earlier.

.env.local
UPSTASH_URL = your-upstash-url
© 2025 StudyStudio Inc. All rights reserved.