Getting Started
Installation
Get started with Shoplit quickly by following this guide.
Installation
This guide targets Next.js 16, React 19, and Prisma 6. This guide will help you set up Shoplit for development.
Requirements
Before installing Shoplit, ensure you have:
- Node.js: Version 20.x LTS or higher (18.x minimum)
- npm: Version 9.x or higher (comes with Node.js)
- Prisma: Version 6.x or higher
- PostgreSQL: Version 15 or higher (setup guide)
- Git: Latest version
Database Setup
Database setup is required to use CRUDs.
Check out our Prisma or Supabase setup guides for more information.
Installation Steps
Clone the Repository
git clone https://github.com/keenthemes/shoplit.git
cd shoplitInstall Dependencies
Install project dependencies using npm:
npm install --forceNote: The --force flag is used to forcefully reinstall the packages, even if they are already installed.
Note: We use React 19, which may show peer dependency warnings. These can be safely ignored.
Environment Setup
- Create a
.env.localfile:
cp .env.example .env.local- Configure required environment variables: You can get the database credentials from the Database Setup guide above.
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/database_name?connection_limit=1"
# Next Auth
NEXT_PUBLIC_API_URL=http://localhost:3000/api
NEXTAUTH_URL="http://localhost:3000/"
NEXTAUTH_SECRET=your_nextauth_secret_here
# OAuth (Optional)
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
# Storage (Optional - AWS S3 or DigitalOcean Spaces)
STORAGE_TYPE=digitalocean
STORAGE_ACCESS_KEY_ID=your_spaces_access_key
STORAGE_SECRET_ACCESS_KEY=your_spaces_secret_key
STORAGE_REGION=ams3
STORAGE_BUCKET=your_space_name
STORAGE_ENDPOINT=https://your-space.region.digitaloceanspaces.com
STORAGE_FORCE_PATH_STYLE=true
STORAGE_CDN_URL=https://your-space.region.cdn.digitaloceanspaces.com/your-bucketDevelopment Server
Start the development server:
npm run devYour application will be available at http://localhost:3000
Additional Commands
- Format Code:
npm run format- Lint Code:
npm run lint- Production Build:
npm run build- Start Production Server:
npm run start