Last updated

๐ŸŒ Building Web Apps - Create Your Own Platform Experience!

Welcome to the world of web applications in Dataloop! Here's where you'll learn to create beautiful, interactive web experiences that seamlessly integrate with our platform. Let's build something amazing! โœจ

โšก Quick Start Guide

  1. ๐ŸŽจ Create a client-side app using your favorite framework (we โค๏ธ Vue.js!)
  2. ๐Ÿ“œ Serve your magical dataloop.json manifest at your app's root
  3. ๐Ÿ”’ Host your app locally on local.dataloop.ai with HTTPS
  4. ๐ŸŽฏ Add your app as a debug app in the Application Hub
  5. ๐Ÿงช Test your creation in its intended panel type
  6. ๐Ÿ” Debug using browser dev tools

๐Ÿ—๏ธ Building Your Web Application

๐ŸŽจ Choosing Your Framework

While you can use any modern framework (React, Angular, etc.), we especially love Vue.js because:

  • ๐ŸŽฏ We provide a Vue-based design system matching our platform theme
  • ๐ŸŽจ We offer ready-to-use UI components
  • ๐Ÿ”ง We maintain open-source Vue.js libraries and icons

๐Ÿš€ Quick Start Template

Want to jumpstart your development? Check out our example application!

๐Ÿ› ๏ธ Local Development Setup

๐Ÿ”ง Essential Configurations

  1. Configure Local Domain

    # Add to your hosts file (/etc/hosts or C:\Windows\System32\drivers\etc\hosts)
    127.0.0.1 local.dataloop.ai
  2. Development Requirements

    • ๐Ÿ”’ HTTPS enabled
    • ๐ŸŒ CORS configured
    • ๐ŸŽฏ Windows: Serve on "0.0.0.0"
    • ๐Ÿ“œ Public dataloop.json at app root
    • ๐Ÿ‘ค Developer role access
    • ๐Ÿ“š Familiarity with our JS SDK

๐ŸŽฎ Creating Your First App

  1. Project Setup

    # Install dependencies
    npm i
    
    # Start development server
    npm run serve
  2. Access Your App

    • Open https://local.dataloop.ai:8080
    • If you see "Not Private" warning:
      • Click "Proceed to local.dataloop.ai" or
      • Type "thisisunsafe"

๐Ÿ’ป Building an Item Viewer

Let's create a magical item viewer using our JS SDK! Here's how to bring your items to life:

๐Ÿ”ฎ Initialize SDK & Load Item

// App.vue
export default {
  methods: {
    async getItemDetails() {
      // Get the current item
      this.item = await this.dl.items.get()
      // Get item stream for display
      this.stream = await this.dl.items.stream(this.item?.stream)
    }
  }
}

๐ŸŽจ Display Your Item

<!-- Show the item with style -->
<img
  v-if="item && stream"
  :src="stream"
  :width="itemWidth"
  :height="itemHeight"
/>

๐Ÿž Debug Mode in Platform

๐ŸŽฏ Adding Your Debug App

  1. Navigate to Application Hub > Developer tab img.png

  2. Click Add Function

  3. Configure Your App:

    • Name your creation
    • Choose main slot (e.g., Item Viewer)
    • Enter your local URL img_1.png
  4. Test Your App:

    • Go to dataset browser
    • Right-click an item
    • Choose "Open With..." > Your App img_3.png

๐Ÿงช Testing Your Creation

๐Ÿ” Local Testing Setup

We provide powerful tools for testing your app locally:

  1. DlMockDriver

    import { DlMockDriver } from '@dataloop/jssdk'
    
    const data = require('./snapshot.json')
    global.window.dl = new DlMockDriver(data)
  2. Debug Snapshot Feature

    • Add your debug app to platform
    • Click Debug Snapshot icon (or Alt+Shift+S)
    • Save snapshot to tests directory
    • Use in your test setup

๐ŸŽจ Complete Item Viewer Example

Want to see a production-ready example? Check out our item-viewer repository!

๐Ÿ’ก Pro Tips

  • ๐Ÿ” Use browser dev tools for debugging
  • ๐Ÿ“ Keep your manifest up to date
  • ๐Ÿงช Test across different browsers
  • ๐Ÿ”’ Follow security best practices
  • ๐Ÿ“š Document your configuration

๐Ÿš€ Next Steps

Ready to create your own web application? Here's your checklist:

  1. ๐Ÿ“š Choose your framework
  2. ๐Ÿ› ๏ธ Set up local development
  3. ๐Ÿ”ง Configure your manifest
  4. ๐ŸŽจ Build your interface
  5. ๐Ÿงช Test thoroughly
  6. ๐Ÿš€ Deploy and share!

Need inspiration? Visit our example apps or join our developer community! โœจ