Quickstart & Environment Setup
This guide gets you up and running with the Mockrithm platform on your local machine.
1. Setup Checklist
Before you begin, make sure you have the following installed:
- Node.js: Version 18.x or later (Next.js 16/React 19 requirements)
- Package Manager: NPM or PNPM
- Git
2. Step-by-Step Installation
Follow these steps to initialize your local environment:
Clone the Repository
Obtain the latest code from the source repository:
git clone https://github.com/RoaraxAli/Mockrithm.git
cd MockrithmInstall Project Dependencies
Install dependencies using NPM:
npm installLockfile Integrity
We leverage a project-level package-lock.json lockfile. Avoid mixing package managers (e.g., executing both npm install and pnpm install in the same directory) to prevent duplicate builds.
Configure Environment Variables
Duplicate the sample environment blueprint into a local configuration file:
cp .env.example .envConfigure the variables in .env as shown in the section below.
Start Development Server
Boot up the compiler and hot-reloader:
npm run devOpen http://localhost:3000 in your browser to inspect the application.
3. Environment Variable Specification
Here is the format and details for the .env configuration file:
# ==============================================================================
# Clerk Security Configuration
# ==============================================================================
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_dGVzdC1jbGVyay1hcHA...
CLERK_SECRET_KEY=sk_test_c2VjcmV0LWNsZXJrLWtleS12YWxpZA...
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
# ==============================================================================
# Firebase Admin Cloud Infrastructure
# ==============================================================================
FIREBASE_PROJECT_ID=mockrithm-prod
FIREBASE_CLIENT_EMAIL=firebase-adminsdk-xxxxx@mockrithm-prod.iam.gserviceaccount.com
# Private key must contain inline newline escape markers (\n)
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC...\n-----END PRIVATE KEY-----"
# ==============================================================================
# Third-Party AI API Integrations
# ==============================================================================
GEMINI_API_KEY=AIzaSyA_example_gemini_key_123
GROQ_API_KEY=gsk_v1_example_groq_key_987
# ==============================================================================
# Stripe Monetization Settings
# ==============================================================================
STRIPE_SECRET_KEY=sk_test_51Pz...
STRIPE_WEBHOOK_SECRET=whsec_...Private Key Formatting
The FIREBASE_PRIVATE_KEY must be enclosed in double quotes (") and have all carriage returns replaced with actual \n characters to ensure the JSON parser compiles the multi-line certificate correctly.
4. Verification & Testing Commands
To verify that your installation is fully functional, run the following validation scripts:
Verify the Next.js compilation works:
npm run buildRun ESLint across pages and component files:
npm run lintIf you are developing security rules, validate them against the local firestore emulator:
npx firebase emulators:start --only firestore