Adoctor Nextjs
  • Getting started
  • Installation
    • Configuration
  • Accounts
    • How to Get a Google Maps API Key Free
    • Create Account on Github.com
    • Create Account on Vercel
    • Create Account on Emailjs.com
    • Create Account on Sanity
    • Create and install Auth0 account
  • Back-end Sanity
    • Settings Page
    • Main Doctor
    • Hero Heading
    • Home Features
    • Patients Reviews
    • Departments / Services
    • List of Doctors
    • Blog/Articles
  • Change Log
Powered by GitBook
On this page
  • 1 - First we need to install all the dependency, from the root of the project run this command:
  • 2 - We configure sanity and import default (demo) data
  • 3 - importing demo data
  • How to deploy it to Vercel?

Was this helpful?

  1. Installation

Configuration

Adding personal Configuration

PreviousInstallationNextAccounts

Last updated 2 years ago

Was this helpful?

After Downloading The package from codecanyone and extract it , Opening it with your Code Editor, (Recommended)

Open your terminal and move to the folder where you extracted your project, if you are using vs code you can open VScode terminal

1 - First we need to install all the dependency, from the root of the project run this command:

npm install --force

2 - We configure sanity and import default (demo) data

npm start

you will be asked few questions:

  • The current folder contains a configured Sanity studio. Would you like to reconfigure it?,

Choose Y

Assuming you are already have an account with sanity if not create new one and link your account by following the steps below as it's shown in the picture

after you authenticate, you will be asked to either create a new project or choose one if you already have one, as it's hown in the picture above

3 - importing demo data

to import the data we need to run this command

npm run importDB

You will be asked to either create a new dataset or choose one from the list below

Choose production if this is your first try

Everything should be set now, to run the project localy all you have to do is to run this command npm run dev

It will open under:

http://localhost:3000

And studio under :

http://localhost:3000/studio

Required changes is to fill .env.local file with your own IDs and Keys

First rename .env.local.exmaple to .env.local

then fill all the missing information

  • Add your domain Name In REACT_APP_BASE_URL=

  • add auth0 credentials

How to deploy it to Vercel?

Adding Sanity setting to .env file, If you don't know How please Follow this Tutorial on How to

Add Google Map API key, on How to get Google Maps API

Add emailjs IDs and Key, on How to create Account on Emailjs

Please follow this tutorial it will guide you step by step

Create Account on Sanity
Follow this tutorial
Follow This Tutorial
https://vercel.com/guides/deploying-react-with-vercel
VScode
npm install --force
npm start