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
- Clerk - Authentication
- Stripe - Payment processing
- Cloudinary - Image storage
- Inngest - Background job processing
Install dependencies
Install all required dependencies for the backend, admin panel, and web application.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.
Configure environment variables
Create a
.env file in the backend directory with your configuration.backend/.env
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_URLin your.envfile
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
- Create a Cloudinary account
- Copy your cloud name, API key, and API secret to
.env
Inngest
- Sign up for Inngest
- Get your signing key for local development
Start the development servers
Now you’re ready to start all the applications. Open three separate terminal windows:Terminal 1 - Backend API:The backend API will start on The admin panel will start on The web storefront will start on
http://localhost:3000Terminal 2 - Admin Panel:http://localhost:5173Terminal 3 - Web Application:http://localhost:5174Seed the database (optional)
To get started with sample product data, you can run the seed script:This will populate your database with initial product data for testing.
Access the applications
You can now access all three applications:
- Backend API: http://localhost:3000
- Admin Panel: http://localhost:5173
- Web Storefront: http://localhost:5174
First Login
- Visit the web application at http://localhost:5174
- Click on “Sign In” to create your first account via Clerk
- Complete the registration process
Admin Access
To access the admin panel, you need to configure your user with admin privileges:- Log in to Clerk Dashboard
- Navigate to your application’s Users section
- Select your user and add metadata:
- Now you can access the admin panel at http://localhost:5173
Mobile App Setup
If you also want to run the mobile application:
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
adminrole in Clerk metadata - Clear browser cache and cookies
- Check that
CLERK_PUBLISHABLE_KEYis set in both admin and web.envfiles
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