Reference
Configuration
ChatCart has two kinds of settings: environment variables in .env.local
for the server, and admin settings for everything that belongs to a store. All
.env* files except .env.example are ignored by git.
Core
| Variable | Required | Description |
|---|---|---|
MONGODB_URI |
Yes |
The MongoDB connection string, local or Atlas. Example:
mongodb://127.0.0.1:27017/chatcart.
|
JWT_SECRET |
Yes | Signs admin and customer logins. At least 16 characters; 32 or more is recommended. |
APP_URL |
Recommended |
Your public address, such as https://shop.example.com. Used for the full links in
the sitemap and robots file.
|
UPLOAD_DIR |
No |
The folder where uploaded images are saved and served from. Default:
public/uploads. On a server, use a folder outside the app.
|
NEXTAUTH_SECRET |
No |
Another name for JWT_SECRET. If both are set, JWT_SECRET is used.
|
NEXT_PUBLIC_DEMO_MODE |
No | For a public online demo only. Leave it empty in your own install. |
npm run build. If the database is
missing or cannot be reached while the app runs, pages show a friendly message instead of
crashing.
Admin account (used by the scripts only)
npm run seed and npm run create-admin read these. The app itself does
not.
| Variable | Description |
|---|---|
ADMIN_NAME |
The owner's display name. When empty: Admin (create-admin) or
Demo Owner (seed).
|
ADMIN_EMAIL |
The owner's email. When empty, create-admin asks for it, and the seed uses
[email protected].
|
ADMIN_PASSWORD |
The owner's password. When empty, create-admin asks for it, and the seed uses the public demo
password ChangeMe123!. create-admin refuses the demo passwords.
|
SEED_WHATSAPP_NUMBER |
Gives both demo stores this WhatsApp number instead of the placeholders, so test orders reach your phone. |
Image uploads
Images you upload in the admin (products, categories, blog covers, banners, logo, favicon) are
saved on the server and served at /uploads/<file> by the app itself, so they
work after npm run build with no rebuild. JPEG, PNG, WebP, GIF and AVIF are accepted,
up to 5 MB each. Each file is checked by its content, not its name. SVG is refused because it can
carry scripts.
UPLOAD_DIR.
Store settings in the admin
- Settings, General: name, WhatsApp number, currency, languages and default language, SEO (meta title, description, share image), and analytics (Google Analytics, Meta Pixel).
- Settings, Fulfillment: delivery, pickup and dine-in on or off, the delivery fee, a free-delivery threshold, and shipping zones with their own fees.
- Settings, WhatsApp message: the order message. See WhatsApp template.
- Stores: mode (Store, QR menu, Link in bio), slug, custom domains, active or not, the default store, and the features (customer accounts, reviews with optional auto-approve, blog, newsletter) and display currencies of each store.
- Appearance and Content: see Branding your store.
Display currencies: shoppers can switch the currency they see, using the rates you enter. Orders are always placed in the store currency. A new store starts with English and USD.
Theming: the brand color and corner radius are applied as CSS variables
(--primary, --brand, --ring, --radius) on
every request. Anything beyond these two settings is in app/globals.css.