Integrating with Lovable
Lovable generates full web apps with AI. You can build a storefront in Lovable and connect it to BareCommerceCore for inventory, orders, and customer management.
Why This Works
Our API is designed to be AI-native. Lovable can understand it, use it reliably, and generate code that actually works.
Getting Started
1. Create Your Store on BareCommerceCore
Set up your store at barecommercecore.com (opens in a new tab) and get your API key. Also set up a payment provider (Stripe, PayPal, or Square).
2. Create a New Project in Lovable
Go to lovable.dev (opens in a new tab) and start a new project.
3. Tell Lovable About Your Store
Copy your API key, store ID, and payment provider credentials, then give Lovable a prompt like:
Build me a storefront for my online store. Connect it to BareCommerceCore with:
- Store ID: {your_store_id}
- API Key: {your_api_key}
The app should:
1. Show a list of products from the BareCommerceCore API
2. Let customers add items to a cart
3. Process payments via Stripe (include Stripe keys)
4. Display order confirmation when payment succeedsLovable will generate the code and wire up the API calls.
Starter Prompts
Product Listing Page
Create a product listing page that fetches products from BareCommerceCore API.
Show product images, titles, prices, and inventory status.
Add filtering by category.Shopping Cart & Checkout
Build a shopping cart and checkout flow. When the user submits:
1. Send the cart items to your backend
2. Your backend creates a Stripe PaymentIntent with order data as metadata
3. Show the Stripe payment form
4. When payment succeeds, order is automatically created in BareCommerceCore
Display order confirmation when payment completes.Order Management Dashboard
Create a dashboard where I can view all my orders from BareCommerceCore.
Show order ID, customer name, total, status, and created date.
Allow me to view order details and line items.Customer Account Page
Build a customer account page that shows:
- Order history (fetched from BareCommerceCore API)
- Saved addresses
- Profile information
Let customers update their profile and manage addresses.Tips
- Be specific. Tell Lovable what you want to achieve, not just "integrate an API."
- Include payment provider. Tell Lovable you're using Stripe, PayPal, or Square with the needed credentials.
- Use the docs. If Lovable gets stuck, point it to the API reference and payment guides.
- Start simple. Build a product list first, then add checkout. Complexity can come later.
- Test thoroughly. Lovable generates code, but you should test it before going live.
Key Concepts
Orders are created from payment webhooks, not API calls. When a customer completes payment via Stripe (etc), the payment provider sends a webhook to BareCommerceCore, and the order is created automatically. You don't need to create orders in code.
Error Handling
If Lovable generates code that doesn't work, it usually means:
- Wrong API key format — Make sure it's exactly
sk_live_...with nothing extra - Wrong store ID — Double-check your store ID is correct
- Missing payment provider config — Make sure Stripe/PayPal/Square credentials are included
- Trying to POST /orders — Orders can't be created via API; they're created from payment webhooks
If something breaks, join our Discord (opens in a new tab) and we'll help debug.
Next Steps
- Stripe Integration Guide — Set up Stripe payments
- PayPal Integration Guide — Set up PayPal payments
- View the full API Reference — Product and order endpoints
- Learn about Webhooks — How order creation works
- Check out Best Practices