Getting StartedNew ProjectQuick Guide

Quick Guide for Setting Up a New Project

Before you start, make sure you meet the requirements needed.

Setting up a brand new project

Are you working with an existing project, check over here instead

Click here to generate a new Forge project in DatoCMS

Make sure that the project is added to a playground organization. This is because playground is a free plan. When the project is ready for production, it will be moved to another organization.

Creating a New Project in GitHub

  1. Visit the Fully Studios GitHub.
  2. Scroll down to the repositories section and click on New.
  3. Select fullystudios/forge as your repository template.
  4. Enter a name for your new repository.
  5. Click Create to set up the repository.

Cloning Your New Project

  1. Click the <> Code button in your repository.
  2. Select the SSH option
  3. Copy the SSH link.
  4. Open your terminal and navigate to the directory where you want to store your new project.
  5. Run the command: git clone **Paste the SSH link here**.

    It should look something like this: git clone git@github.com:fullystudios/your-project.git

Now you have set up the base project, you can start setting up the Forge template.

Updating Forge Variables

Now that you have cloned the repository, you need to set up the Forge template.

  1. Open the cloned project in your preferred code editor.
  2. Update the name, description, and port fields in package.json.
  3. Update the port in both src/app/api/preview-links/route.ts and src/lib/constants.ts.
  4. Access the DatoCMS project settings.
    • Go to Project Settings > API Tokens.
  5. Copy .env.local.example and name it .env.local.
  6. Copy the Full-access API token and paste it into the DATOCMS_API_TOKEN variable in .env.local.
  7. Copy the Read-only API token and paste it into the DATOCMS_PREVIEW_TOKEN variable in .env.local.

Starting the Project

  1. npm install
  2. npm run dev
  3. Visit http://localhost:YOUR_CHOSEN_PORT in your browser to see the project.

Connecting Vercel to Your Project

  1. Navigate to your project directory: cd your-project.
  2. Run the command: vercel link.
  3. Follow the setup instructions, ensuring you select the Fully Studios scope.
  4. Visit Vercel Dashboard.
  5. Click on Connect Git Repository.
  6. Log in with your GitHub account.
  7. Select your project and click Connect.
  8. Copy the contents of your .env.local file.
  9. In Vercel, go to Settings > Environment Variables.
  10. Paste the contents into the Key Value fields (Vercel will format them automatically).
  11. Click on the Storage tab.
  12. Click in the button Connect Database.
  13. Find forge-cache-tags in the list of databases.
  14. Click on the Connect button.
  15. Now there should be a lot more environment variables under Settings - Environment Variables in Vercel.
  16. Now a deployment can be made by either; - Push a commit to GitHub and a deployment will be triggered automatically - Trigger a manual deployment in the Vercel project under “Deployments”, under a three-dot-menu in the top right