A comprehensive Fluid droplet template that provides complete droplet lifecycle management, order processing, product management, and webhook handling capabilities.
This is a full-featured Fluid droplet that provides:
- Complete Droplet Management - Create, update, and manage Fluid droplets
- Order Processing System - Handle orders with status tracking and management
- Product Management - Full CRUD operations for products with inventory tracking
- Webhook Integration - Secure webhook handling for real-time data synchronization
- Company Management - Multi-tenant support with company-specific data isolation
- DIT Token Authentication - Automatic company authentication using Fluid DIT tokens
- Dashboard Interface - Modern React frontend with comprehensive management tools
This droplet uses DIT (Droplet Installation Token) authentication, which means:
- No Manual API Keys Required - Companies don't need to provide their own API keys
- Automatic Authentication - When a company installs your droplet, Fluid automatically provides a DIT token
- Secure by Default - DIT tokens are scoped to the specific installation and company
- Zero Configuration - Companies can start using your droplet immediately after installation
- Company installs your droplet β Fluid generates a unique DIT token
- DIT token is sent via webhook β Your backend receives and stores it
- API calls use DIT token β All Fluid API calls are authenticated automatically
- No manual setup required β Companies don't need to configure anything
frontend/- Simple React app that shows company infobackend/- Node.js API with webhook handlingdatabase/- PostgreSQL with Prisma for company datascripts/- Tools to create and update your droplet
- Install dependencies:
npm install
cd frontend && npm install
cd ../backend && npm install
cd ../database && npm install- Set up database:
# Database is already configured for local development
npm run prisma:push- Start development:
npm run devThis starts:
- Frontend: http://localhost:5173
- Backend: http://localhost:3001
- Deploy to production (Render, Vercel, etc.)
- Get your Fluid API key from your Fluid account
- Create the droplet:
FLUID_API_KEY=your_api_key_here \
EMBED_URL=https://your-frontend-url.com/ \
DROPLET_NAME="My Simple Droplet" \
node scripts/create-droplet.js- Company installs droplet β Fluid sends webhook to your backend
- Backend stores company info (name, logo) in database
- Frontend loads β shows company name and logo in clean header
- That's it! Simple and clean.
npm run dev- Start both frontend and backendnpm run prisma:generate- Generate Prisma clientnpm run prisma:push- Push schema to databasenpm run prisma:studio- Open Prisma Studio
This template is intentionally simple. To add features:
- Add new database models in
database/prisma/schema.prisma - Add API endpoints in
backend/src/index.ts - Add UI components in
frontend/src/components/
The code is clean and organized - easy to understand and modify!
Complete guide to create a Fluid droplet that connects different apps together
No coding experience needed - anyone can follow this guide!
By the end of this guide, you'll have created a Fluid droplet - a small app that connects different services together. Think of it like a bridge between apps.
For example: Your droplet could automatically send new customers to an email marketing tool, or sync orders between different stores.
Before we begin, you need these accounts:
- β GitHub account - Where your code lives online
- β Render account - Where your app runs on the internet
- β Fluid account - Where your droplet gets listed for people to use
- β Cursor IDE - Where your droplet will be vibed/coded & built
- β About 45 minutes to complete setup
- Go to github.com
- Click "Sign up" in the top right corner
- Fill in your information:
- Pick a username (something you'll remember)
- Your email address
- A password
- Check your email and click the verification link
- Skip the questions about your interests - you can leave them blank
Great! Move to Step 2.
You need to make your own copy of the Fluid droplet template. Here are two ways to do it:
This is the best way if you plan to use Cursor IDE for development:
- Copy the repository URL:
https://github.com/fluid-commerce/Droplet-Template-React-.git - Open your terminal/command prompt
- Navigate to where you want the project:
cd Desktop # or wherever you want it
- Clone the repository:
git clone https://github.com/fluid-commerce/Droplet-Template-React-.git
- Enter the project folder:
cd Droplet-Template-React-
If you prefer to download directly:
- Go to the template repository on GitHub
- Click the green "Code" button
- Click "Download ZIP"
- Extract the ZIP file to your Desktop or preferred location
- The folder will be named
Droplet-Template-React-(you can rename it if you prefer)
Now let's get your template into Cursor for that sweet AI-powered development experience:
- Go to cursor.sh
- Download Cursor for your operating system
- Install it like any other app
Method 1 - From Cursor:
- Open Cursor IDE
- Click "Open Folder" or use
Cmd+O(Mac) /Ctrl+O(Windows) - Navigate to your
Droplet-Template-React-folder - Click "Open"
Method 2 - From Terminal (if you cloned):
- Make sure you're in the project folder:
cd Droplet-Template-React- - Open in Cursor:
cursor .
Method 3 - Drag and Drop:
- Open Cursor IDE
- Drag your
Droplet-Template-React-folder directly into the Cursor window
Once opened, you'll see the complete project structure:
frontend/- React app with TypeScriptbackend/- Node.js API serverdatabase/- PostgreSQL migrationsscripts/- Automation helpers
π You're now ready to start vibing with AI-powered development!
Cursor will understand your entire codebase and can help you:
- Add new integrations (just ask: "Add Shopify integration")
- Customize the UI ("Make the dashboard more modern")
- Debug issues ("Why is my webhook not working?")
- Add features ("Add bulk data import functionality")
Since you cloned the template, you need to create your own repository to save your customizations:
- Go to github.com and sign in
- Click the "+" icon in the top right corner
- Click "New repository"
- Name your repository (e.g.,
my-fluid-dropletorshopify-email-sync) - Make it Public (required for free Render deployment)
- Don't initialize with README, .gitignore, or license (you already have these)
- Click "Create repository"
After creating the repository, GitHub will show you commands. Follow these steps:
-
In your terminal/command prompt, make sure you're in your project folder:
cd Droplet-Template-React- -
Remove the connection to the original template:
git remote remove origin
-
Connect to your new repository (replace
YOUR_USERNAMEandYOUR_REPO_NAME):git remote add origin https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git
-
Push your code to your repository:
git branch -M main git push -u origin main
Whenever you customize your droplet in Cursor, you need to save and push your changes:
-
Save your files in Cursor (
Cmd+SorCtrl+S) -
In terminal, add your changes:
git add . -
Commit your changes with a message:
git commit -m "Add Shopify integration and custom styling" -
Push to GitHub:
git push
π Important: Render automatically deploys when you push to GitHub! Your changes will be live in 2-3 minutes.
Render is where your app will live on the internet.
- Go to render.com
- Click "Get Started for Free"
- Choose "Sign up with GitHub" - this connects your accounts
- Click "Authorize" when GitHub asks for permission
- Fill out your profile:
- Pick a username
- Choose the Free plan (perfect for starting)
- Verify your email if asked
This is where the magic happens! Render will automatically create everything you need.
A Blueprint is like a recipe that tells Render exactly how to build your app. Your template includes this recipe, so Render knows what to do.
Your template includes a special file called render.yaml that acts as the blueprint. Here's what it does:
The render.yaml file tells Render to create:
- Frontend Service - Hosts your React app (Static Site)
- Backend Service - Runs your Node.js API server (Web Service)
- PostgreSQL Database - Stores all your data securely
How Environment Variables Work: The render.yaml file defines which environment variables your app needs, but it doesn't include the actual secret values (for security). You'll add the real values manually in Render's dashboard.
Template includes these pre-configured variables:
DATABASE_URL- Automatically set by Render (connects to your database)FLUID_API_KEY- You'll add your Fluid API keyFLUID_WEBHOOK_SECRET- You'll add your webhook secretJWT_SECRET- You'll generate this for securityENCRYPTION_KEY- You'll generate this to encrypt dataNODE_ENV- Set to "production"PORT- Set to 3001 for the backend
When you add integrations (like Shopify, Stripe, etc.), you'll need to:
- Add to render.yaml - So Render knows your app needs them
- Add to Render dashboard - So your app can access the real values
- Use in your code - So your integration can connect
Example: Adding Shopify Integration
If you ask Cursor to "Add Shopify integration," it will help you:
Step 1: Update render.yaml
services:
- type: web
name: my-droplet-backend
env: node
buildCommand: cd backend && npm install && npm run build
startCommand: cd backend && npm start
envVars:
# ... existing variables ...
- key: SHOPIFY_API_KEY
sync: false
- key: SHOPIFY_SECRET_KEY
sync: false
- key: SHOPIFY_WEBHOOK_SECRET
sync: falseStep 2: Add Values in Render Dashboard
- Go to your Backend service β Environment tab
- Add
SHOPIFY_API_KEYwith your actual Shopify API key - Add
SHOPIFY_SECRET_KEYwith your Shopify secret - Add
SHOPIFY_WEBHOOK_SECRETwith your webhook secret
Step 3: Use in Your Code Cursor will automatically generate code that uses these variables:
const shopifyClient = new ShopifyApi({
apiKey: process.env.SHOPIFY_API_KEY,
secretKey: process.env.SHOPIFY_SECRET_KEY,
webhookSecret: process.env.SHOPIFY_WEBHOOK_SECRET
});- In Render, click "New +" (top right corner)
- Click "Blueprint" from the menu
- Connect your GitHub:
- If not connected, click "Connect GitHub account"
- Select your repository (the one your droplet lives in)
- Choose the
mainbranch
- Review what will be created:
- You'll see 3 services: Frontend, Backend, and Database
- This is normal and exactly what you want
- Click "Apply" to start building
- Render reads your template
- Creates 3 separate services (like 3 different computers working together)
- Builds your app and makes it live on the internet
- Sets up a database to store information
- Gives you web addresses where people can access your app
This takes 5-10 minutes. You can grab a coffee while it builds!
Fluid is where people will find and install your droplet.
- Go to fluid.app
- Click "Sign Up" or "Get Started"
- Enter your email and password
- Check your email and click the verification link
API keys are like passwords that let your app talk to other services.
- Log into your Fluid account
- Look for "Developer" or "API" section in the menu
- Find "API Key" or "API Keys"
- Create a new API key:
- Name it something like "My Droplet Integration"
- Copy the key (it starts with
PT-) β οΈ Save this somewhere safe - you'll need it soon!
A webhook secret is like a password that proves messages are really from Fluid.
Easy way to create one:
- Go to generate-secret.vercel.app/32
- Copy the generated string
- Save it somewhere safe
Your app needs to know some secret information to work. These are called "environment variables."
Remember: The render.yaml file already told Render which variables your app needs, but it didn't include the actual secret values. Now you'll add the real values so your app can use them.
- In your Render dashboard, find your Backend service
- Click on it, then click "Environment" tab
- Add these settings one by one:
FLUID_API_KEY
- Key:
FLUID_API_KEY - Value:
PT-your-actual-api-key-here(the one you copied from Fluid)
FLUID_WEBHOOK_SECRET
- Key:
FLUID_WEBHOOK_SECRET - Value:
your-32-character-secret-here(the one you generated)
JWT_SECRET
- Key:
JWT_SECRET - Value: Go to generate-secret.vercel.app/64 and copy the result
ENCRYPTION_KEY
- Key:
ENCRYPTION_KEY - Value: Go to generate-secret.vercel.app/32 and copy the result
NODE_ENV
- Key:
NODE_ENV - Value:
production
PORT
- Key:
PORT - Value:
3001
- Click "Add Environment Variable"
- Type the Key (like
FLUID_API_KEY) - Type the Value (like your actual API key)
- Click "Save Changes"
- Repeat for each setting
After your app finishes building, you'll get web addresses where it lives.
- In Render dashboard, look at your services
- Find your Frontend service - click on it
- Copy the URL (something like
https://your-app-frontend.onrender.com) - Find your Backend service - click on it
- Copy the URL (something like
https://your-app-backend.onrender.com)
Go back to your Backend service environment variables and add:
FRONTEND_URL
- Key:
FRONTEND_URL - Value: Your frontend URL
WEBHOOK_BASE_URL
- Key:
WEBHOOK_BASE_URL - Value: Your backend URL
- Go to your Frontend service in Render
- Click "Environment" tab
- Add this setting:
VITE_API_BASE_URL
- Key:
VITE_API_BASE_URL - Value: Your backend URL
Let's make sure everything is working!
- Open a new browser tab
- Go to your backend URL +
/health- Example:
https://your-backend.onrender.com/health
- Example:
- You should see:
{"status":"ok","timestamp":"..."}
- Go to your frontend URL
- You should see your droplet interface
- It should load without any error messages
If something doesn't work, check the logs in Render dashboard.
Now you need to tell Fluid about your droplet so people can find it.
- Open a text editor (like Notepad or TextEdit)
- Copy this command and replace the parts in CAPS:
curl -X POST https://api.fluid.app/api/droplets \
-H "Authorization: Bearer YOUR_FLUID_API_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{
"droplet": {
"name": "Your Droplet Name",
"embed_url": "YOUR_FRONTEND_URL_HERE/",
"active": true,
"settings": {
"marketplace_page": {
"title": "Your Droplet Name",
"summary": "Description of what your droplet does",
"logo_url": "https://your-logo-url.com/logo.png"
},
"details_page": {
"title": "Your Droplet Name",
"summary": "Description of what your droplet does",
"logo_url": "https://your-logo-url.com/logo.png"
}
}
}
}'-
Replace these parts:
YOUR_FLUID_API_KEY_HEREwith your actual API keyYOUR_FRONTEND_URL_HEREwith your actual frontend URLYour Droplet Namewith what you want to call your dropletDescription of what your droplet doeswith a description
-
Save the file as
create-droplet.txt
If you're on Windows:
- Open Command Prompt (search for "cmd" in Start menu)
- Copy and paste your command
- Press Enter
If you're on Mac:
- Open Terminal (search for "Terminal" in Spotlight)
- Copy and paste your command
- Press Enter
After running the command, you'll get a response that includes a uuid. It looks like:
{
"droplet": {
"uuid": "drp_abc123xyz789",
"name": "Your Droplet Name"
}
}Copy that UUID - you'll need it next!
- Go back to your Backend service in Render
- Click "Environment" tab
- Add this setting:
DROPLET_ID
- Key:
DROPLET_ID - Value: The UUID you copied (starts with
drp_)
- Click "Manual Deploy" β "Deploy latest commit" to restart your app
Now let's test your complete droplet!
- Go to your Fluid account
- Look for your droplet in the marketplace or droplets section
- Click "Install" on your droplet
- You should see:
- Your droplet loads in a window
- It recognizes your company automatically
- Shows a success message
- Displays your company name
-
Check Render logs:
- Go to Backend service β Logs tab
- Look for red error messages
-
Verify your settings:
- Make sure all environment variables are set correctly
- Check that URLs match your actual deployment
-
Test your endpoints:
- Backend health:
https://your-backend.onrender.com/health - Webhook health:
https://your-backend.onrender.com/api/webhook/health
- Backend health:
You now have a live Fluid droplet that:
- β People can install from the Fluid marketplace
- β Automatically configures when someone clicks "Install"
- β Shows company information right away
- β Handles webhooks and data synchronization
- β Stores data securely in a database
- β Scales automatically as more people use it
You can change how your droplet appears to users by updating it in Fluid.
Your template includes helpful scripts to update your droplet.
Update Your Description:
FLUID_API_KEY=PT-your-api-key-here
DROPLET_ID=drp_your-droplet-uuid
DROPLET_NAME="My Awesome Integration"
DROPLET_DESCRIPTION="π Connect your Shopify store with email marketing - sync customers, orders, and more!"
node scripts/update-droplet.jsUpdate Your Logo:
- Upload your logo to any image hosting service (like Imgur)
- Get the image URL
- Run this command:
FLUID_API_KEY=PT-your-api-key-here
DROPLET_ID=drp_your-droplet-uuid
LOGO_URL=https://your-logo-url.com/logo.png
node scripts/update-droplet.js- Use emojis to make it more interesting
- Focus on benefits - what does it do for the user?
- Keep it short but informative
- Include your target audience
Example of a good description: "π Automatically sync your Shopify store with email marketing platforms. π§ Get instant customer data, π track order events, and π― create targeted campaigns. Perfect for growing businesses!"
Your droplet template includes built-in security features:
- Data is encrypted - All sensitive information is protected
- Companies are isolated - Each company only sees their own data
- Webhooks are verified - Only real messages from Fluid are processed
- Rate limiting - Prevents anyone from overwhelming your system
- Input validation - All data is checked before processing
You don't need to do anything special - it's all built in!
Your app automatically creates and manages a database to store information:
- Company configurations - Settings for each company that installs your droplet
- Activity logs - Records of everything that happens
- Webhook events - Messages from Fluid platform
- Custom data - Information from connected services
The database is automatically backed up and scales with your app.
"Service won't start"
- Check that all environment variables are set correctly
- Look at Render logs for specific error messages
"Database connection failed"
- The database URL is set automatically by Render
- Make sure your database service shows "Available" status
"Droplet not found in Fluid"
- Check that your DROPLET_ID matches the UUID from Fluid
- Verify your FLUID_API_KEY is correct and has proper permissions
"Frontend shows errors"
- Make sure VITE_API_BASE_URL points to your backend
- Check that your backend service shows "Live" status
- Render Support: render.com/support
- Fluid Documentation: docs.fluid.app
- Ask the person who gave you this guide
Now that your droplet is live, here's how to add new features and third-party integrations:
Every time you add a new service (Shopify, Stripe, Mailchimp, etc.), follow these steps:
Simply ask Cursor in natural language:
- "Add Shopify integration with product sync"
- "Add Stripe payment processing"
- "Add Mailchimp email automation"
- "Add Google Sheets data export"
Cursor will generate all the necessary code and tell you what environment variables you need.
When Cursor adds the integration, it may tell you to add new environment variables to render.yaml.
Example for Shopify:
envVars:
# ... existing variables ...
- key: SHOPIFY_API_KEY
sync: false
- key: SHOPIFY_SECRET_KEY
sync: false
- key: SHOPIFY_WEBHOOK_SECRET
sync: false
- key: SHOPIFY_APP_URL
sync: false- Go to your Backend service in Render dashboard
- Click "Environment" tab
- Add each new variable with the real API keys/secrets
- Click "Manual Deploy" to restart with new variables
git add .
git commit -m "Add Shopify integration with product sync"
git pushRender will automatically deploy your changes in 2-3 minutes!
Shopify Integration:
SHOPIFY_API_KEY- Your Shopify app's API keySHOPIFY_SECRET_KEY- Your Shopify app's secretSHOPIFY_WEBHOOK_SECRET- For webhook verificationSHOPIFY_APP_URL- Your app's URL in Shopify
Stripe Integration:
STRIPE_SECRET_KEY- Your Stripe secret keySTRIPE_WEBHOOK_SECRET- For webhook verificationSTRIPE_PUBLISHABLE_KEY- For frontend payments
Email Services (Mailchimp, SendGrid, etc.):
MAILCHIMP_API_KEY- Your Mailchimp API keySENDGRID_API_KEY- Your SendGrid API keyEMAIL_FROM_ADDRESS- Default sender email
Social Media (Facebook, Instagram, etc.):
FACEBOOK_APP_ID- Your Facebook app IDFACEBOOK_APP_SECRET- Your Facebook app secretINSTAGRAM_ACCESS_TOKEN- Instagram API token
- Always test locally first - Use a
.envfile for development - Use descriptive commit messages - Makes it easy to track changes
- Check Render logs after deployment to ensure everything works
- Keep secrets safe - Never commit API keys to GitHub
- Document your integrations - Add comments explaining what each integration does
- Check Render logs regularly for any issues
- Watch database usage in Render dashboard
- Set up alerts for service downtime
- Track user installations in your Fluid account
- Free tier supports up to 750 hours/month
- Paid plans start at $7/month for always-on services
- Database plans start at $7/month for production use
- Update the name and description in your Fluid droplet settings
- Add your company logo
- Customize the interface to match your brand
- Add specific API integrations (Shopify, Stripe, etc.)
You've successfully created a professional Fluid droplet that:
- Connects different services together
- Handles real-time data synchronization
- Processes webhooks securely
- Stores data safely in a database
- Scales automatically as you grow
Your droplet is now live and ready for people to use!