Skip to main content

Quick Start Guide

This guide will help you get Don Palito Jr up and running on your local development environment quickly.

Prerequisites

Before you begin, make sure you have the following installed:
  • Node.js 20.0.0 or higher
  • npm (comes with Node.js)
  • MongoDB (local installation or MongoDB Atlas account)
  • Git for cloning the repository
You’ll also need accounts for the following services:
1

Clone the repository

Start by cloning the Don Palito Jr repository to your local machine.
git clone https://github.com/DarkerJB/donpalitojrweb.git
cd donpalitojrweb
2

Install dependencies

Install all required dependencies for the backend, admin panel, and web application.
npm install
This command will install dependencies for all three main components according to the root package.json:
The root package.json includes scripts to install and build dependencies for backend, admin, and web applications.
3

Configure environment variables

Create a .env file in the backend directory with your configuration.
backend/.env
# Server Configuration
NODE_ENV=development
PORT=3000

# Database
DB_URL=mongodb://localhost:27017/donpalitojr

# Authentication - Clerk
CLERK_PUBLISHABLE_KEY=pk_test_your_key_here
CLERK_SECRET_KEY=sk_test_your_key_here
CLERK_WEBHOOK_SECRET=whsec_your_webhook_secret

# Background Jobs - Inngest
INNGEST_SIGNING_KEY=signkey-test-your_key_here

# File Storage - Cloudinary
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret

# Email Service - Gmail
EMAIL_USER=your_email@gmail.com
EMAIL_PASSWORD=your_app_password

# Payment Processing - Stripe
STRIPE_SECRET_KEY=sk_test_your_key_here
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret

# Client Configuration
CLIENT_URL=http://localhost:5173
See the Environment Variables page for a complete list with descriptions.
Never commit your .env file to version control. It’s already included in .gitignore.
4

Set up third-party services

Configure the required external services:

MongoDB

  • Install MongoDB locally or create a free cluster on MongoDB Atlas
  • Update the DB_URL in your .env file

Clerk Authentication

  • Create a new application in Clerk Dashboard
  • Copy your publishable and secret keys to .env
  • Configure allowed redirect URLs: http://localhost:5173, http://localhost:5174
  • Set up user metadata to include admin roles

Stripe

  • Sign up for a Stripe account
  • Get your test API keys from the Dashboard
  • Configure webhooks to point to http://localhost:3000/api/payment/webhook

Cloudinary

Inngest

  • Sign up for Inngest
  • Get your signing key for local development
5

Start the development servers

Now you’re ready to start all the applications. Open three separate terminal windows:Terminal 1 - Backend API:
cd backend
npm run dev
The backend API will start on http://localhost:3000Terminal 2 - Admin Panel:
cd admin
npm run dev
The admin panel will start on http://localhost:5173Terminal 3 - Web Application:
cd web
npm run dev
The web storefront will start on http://localhost:5174
You can also run Inngest in dev mode alongside your backend. See the Backend Configuration for details.
6

Seed the database (optional)

To get started with sample product data, you can run the seed script:
cd backend
npm run seed:products
This will populate your database with initial product data for testing.
7

Access the applications

You can now access all three applications:

First Login

  1. Visit the web application at http://localhost:5174
  2. Click on “Sign In” to create your first account via Clerk
  3. Complete the registration process

Admin Access

To access the admin panel, you need to configure your user with admin privileges:
  1. Log in to Clerk Dashboard
  2. Navigate to your application’s Users section
  3. Select your user and add metadata:
    {
      "role": "admin"
    }
    
  4. Now you can access the admin panel at http://localhost:5173

Mobile App Setup

If you also want to run the mobile application:
1

Install Expo CLI

npm install -g expo-cli
2

Start the mobile app

cd mobile
npm install
npm start
3

Run on device

  • Scan the QR code with Expo Go app (iOS/Android)
  • Or press a for Android emulator
  • Or press i for iOS simulator (macOS only)
See the Mobile App documentation for more details.

Next Steps

Now that you have Don Palito Jr running locally, explore these resources:

Architecture

Understand the system architecture and how components work together

Backend Setup

Deep dive into the backend API configuration

Features

Learn about products, orders, payments, and more

API Reference

Explore the complete API documentation

Troubleshooting

Backend won’t start

  • Make sure MongoDB is running
  • Check that all environment variables are set correctly
  • Verify Node.js version is 20.0.0 or higher

Can’t login to admin panel

  • Ensure your user has the admin role in Clerk metadata
  • Clear browser cache and cookies
  • Check that CLERK_PUBLISHABLE_KEY is set in both admin and web .env files

Images not uploading

  • Verify Cloudinary credentials in .env
  • Check that your Cloudinary account is active
  • Ensure you’re not exceeding file size limits (check multer configuration)

Payment errors

  • Make sure you’re using Stripe test keys for development
  • Verify webhook secret matches your Stripe dashboard
  • Check that your Stripe account is in test mode
For more help, check the individual documentation pages for each component.

Build docs developers (and LLMs) love