Getting Started
Quick Start Guide

Quick Start Guide

Quick start guide

Prerequisites

Please make sure that you have latest version of pnpm, npm or yarn installed in your system. You can install the latest version of pnpm, npm or yarn by running the following command in your terminal:

pnpm Installation(Recommended)

npm install pnpm@latest -g

Installation

Installing the project is easy and straight forward. If you're using pnpm, simply run the following command in your terminal from project root:

pnpm install

.env File Example

# API URLs
API_BASE_URL="http://localhost:3000"
NEXT_PUBLIC_BASE_URL="http://localhost:3000"
 
# Database Provider (Choose one)
PROVIDER="@metajob/next-local"  # Use this for local data
# PROVIDER="@metajobs/next-mongo"  # Use this for MongoDB as the database
 
# MongoDB Configuration (Required if using MongoDB)
MONGODB_URL="YOUR_MONGODB_URI"
JWT_SECRET="YOUR_JWT_SECRET_KEY"
 
# Contact Information
ADMIN_CONTACT_EMAIL=""
 
# NodeMailer Configuration
NODEMAILER_HOST=""
NODEMAILER_PASSWORD=""
NODEMAILER_EMAIL=""
# if you use cloudinary for image upload
CLOUDINARY_API_SECRET=""
CLOUDINARY_API_KEY=""
CLOUDINARY_CLOUD_NAME=""
 
# Stripe Payment Information
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="Add_stripe_Publishable_key"
STRIPE_SECRET_KEY="Add_stripe_Secret_key"
ℹ️

NOTE: Ensure that you have included all key-value pairs in the .env.local file located in the apps/site directory.

It will install all the dependencies and devDependencies for the project. To run the project in development mode, run the following command in your terminal from project root:

pnpm dev

It will start the development server at port 300. You can access the project by visiting http://localhost:3000 (opens in a new tab) || http://localhost:3007 (opens in a new tab) in your browser.

pnpm build

It will build the project for production. You can run the production build by running the following command in your terminal from project root:

ℹ️

NOTE: If you are using MongoDB as your database, it is important to import dummy data into MongoDB and update the PROVIDER to @metajobs/next-mongo in the .env file. Without this data, some dashboard pages may not function correctly.

Import Dummy Data

Option 1: Import Dummy Data Using MongoDB Compass

  1. Ensure you have a MongoDB database with a connection string.
  2. Open MongoDB Compass and connect to your MongoDB server using the connection string.
  3. Import the dummy data from the "dummy-data" folder.

If you encounter any issues during the project installation, please feel free to contact us for assistance.