Skip to content

Database

StartKit.AI uses MongoDB as it’s primary database. MongoDB has the benefit of being very easy to prototype with - our priority when getting a project running quickly!

Setup Atlas

We recommend creating a new database using MongoDB Atlas.

  1. Visit the Mongo Atlas website: https://www.mongodb.com/cloud/atlas
  2. Create an account and follow the setup instructions

Select the M0 free cluster:

Mongo M0 free cluster

Select connect to your application with Drivers:

Mongo drivers

  1. Once your cluster is provisioned you will be provided with a connection string. Copy this into your .env file (see below).

Config .env

Once you’ve set up your database, add can add the MONGO_URI to the StartKit.AI .env file:

MONGO_URI=mongodb+srv://app:<password>@<db>.retdorb.mongodb.net/<dbname(optional)>?retryWrites=true&w=majority&appName=<app_name>

When you run StartKit.AI for the first time, it will create the default database collections and data for you, so you don’t need to do any of that yourself.

Allow access to your database

Allow access from anywhere in the Mongo Atlas settings (you’ll need this for when we deploy later):

  1. Go to Security -> Network Access in the sidebar
  2. Click Add IP Address and set Access List Entry: 0.0.0.0/0
  3. Hit confirm!

Add IP Access List Entry