Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Mercaline2024/Ecomdrop-ia-connector-2/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Ecomdrop IA Connector uses environment variables to configure database connections, Shopify API credentials, and optional theme deployment settings. This guide provides detailed information about all available environment variables.Environment File
Creating the .env File
Create a.env file in the root directory of the project:
Environment File Template
Here’s a complete template with all available configuration options:Configuration Variables
Database Configuration
MySQL connection string for the application database.Format:Example Values:
The database must be MySQL 8.0 with UTF-8MB4 character set support.
Shopify API Configuration
Your Shopify app’s API key (also called Client ID).Where to find:
- Go to Shopify Partners Dashboard
- Select your app
- Navigate to App setup > Client credentials
- Copy the Client ID
Your Shopify app’s API secret (also called Client secret).Where to find:
- Same location as API key
- Copy the Client secret
The public URL where your app is accessible.Development: Automatically set by Shopify CLI (tunnel URL)Production: Your actual domain
This URL must match the App URL configured in your Shopify Partners Dashboard.
Application Configuration
The Node.js environment mode.Accepted values:
development- Development mode with hot reload and verbose loggingproduction- Production mode with optimizations and minimal loggingtest- Test mode for running automated tests
The port number the application server will listen on.Example:
Theme Configuration (Optional)
These variables configure automatic Shopify theme installation from Git repositories.The Git repository containing your Shopify theme.Format:
username/repository or organization/repositoryExample:The Git branch to use for theme deployment.Example:
The Git hosting provider.Accepted values:
github- GitHubgitlab- GitLabbitbucket- Bitbucket
Personal access token for private Git repositories.When needed: Only required if your theme repository is privateGitHub Token Creation:
- Go to GitHub Settings > Developer settings > Personal access tokens
- Generate new token (classic)
- Select scope:
repo(Full control of private repositories) - Copy the token
Custom Domain (Optional)
Custom domain for Shopify store, if different from the
.myshopify.com domain.Example:Most apps don’t need this. Only use if your store uses a custom primary domain.
Environment-Specific Configurations
Development Environment
For local development:.env.development
Production Environment
For production deployment:.env.production
Docker Environment
For Docker deployment, environment variables are configured indocker-compose.yml:
docker-compose.yml
Validating Configuration
Check Environment Variables
Verify your environment variables are loaded correctly:Test Database Connection
Test your database connection:Validate Shopify Credentials
Start the dev server to validate Shopify credentials:Security Best Practices
Rotate Credentials Regularly
Change your database passwords and API tokens periodically:
- Database passwords: Every 90 days
- API tokens: Every 180 days
- After team member departure: Immediately
Use Environment-Specific Credentials
Never use production credentials in development:
- Separate database instances
- Separate Shopify apps for dev/staging/prod
- Different API keys per environment
Troubleshooting
Environment Variables Not Loading
If your.env file isn’t being loaded:
- Check file location: Must be in project root directory
- Check file name: Must be exactly
.env(note the leading dot) - Restart dev server: Changes require server restart
Invalid DATABASE_URL Format
Common DATABASE_URL mistakes:Shopify App URL Mismatch
If you get “redirect_uri mismatch” errors:-
Check Partners Dashboard:
- App URL:
https://your-app-url.com - Allowed redirect URLs:
https://your-app-url.com/api/auth
- App URL:
-
Verify .env matches:
- For development: Shopify CLI updates this automatically
Next Steps
After configuring your environment:Database Setup
Set up MySQL and run Prisma migrations
Quickstart Guide
Complete the quick setup and run your app
Deployment Guide
Deploy to production with Docker and Traefik
Configuration
Configure Ecomdrop and Dropi integrations