Quickstart
To run react project you will need couple thing to setup first, Install Node version v20.19.4(LTS). if you already not installed. download from Here
Project Configuration
- After downloading the template, unzip it
- Open the VS Code Terminal/System Terminal
- Go to the folder (store): (cd path/to/template)
- Run: npm install, it will install all used packages for this backend. If you see any vulnerability in packages run npm audit fix, it will fix/update all packages.
- Make sure that there is no error.
- Rename .env.example to .env
Cloudinary Configuration
- Please watch this video for Cloudinary configuration Cloudinary configuration, (We used Cloudinary for profile image upload). Get your cloud_name, api_key and api_secret.
- Screenshot One
After configuration you .env.local file will look like this
NEXT_PUBLIC_API_BASE_URL=http://localhost:5055/api
NEXT_PUBLIC_API_SOCKET_URL=http://localhost:5055
NEXT_PUBLIC_STRIPE_KEY=your_stripe_api_key
NEXT_PUBLIC_CLOUDINARY_URL=https://api.cloudinary.com/v1_1/<your_cloudinary_cloud_name>/image/upload
NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET=your_cloudinary_upload_preset
NEXT_PUBLIC_STORE_DOMAIN=http://localhost:3000/
# keep bellow url as it is in local, and add only NEXTAUTH_SECRET when deploy
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="3BRAQWnfbEfhT3fnlrVMEHe2T7TG9ky4sfs//Xx+8Vc="
Running the Store
Now run npm run dev to start your store on the local server with PORT 3000 or the PORT you have specified.