Quickstart Guide
Build your first Teachfloor app in 10 minutes! This guide walks you through creating a simple "Hello World" app that displays in the course list page.
Prerequisites
- Node.js 18.0+ installed
- npm or yarn package manager
- A Teachfloor account
Setup Steps
Install the CLI
Open your terminal and install the Teachfloor CLI globally:
npm install -g @teachfloor/teachfloor-cli
Verify the installation:
teachfloor version
Authenticate
Log in to your Teachfloor account:
teachfloor login
You'll be prompted for:
- Email: Your Teachfloor account email
- Password: Your account password
- Organization: Select your organization (if you have multiple)
Once authenticated, verify your session:
teachfloor whoami
Create Your First App
Create a new app called "hello-world":
teachfloor apps create hello-world
You'll be prompted for:
- App ID: Press Enter to accept the default (auto-generated)
- Display Name: Enter "Hello World"
- Description: Enter "My first Teachfloor app"
- Version: Press Enter to accept "1.0.0"
The CLI will:
- Create the app on the platform
- Generate the project structure
- Install dependencies (React, Extension Kit, etc.)
✓ Creating app...
✓ Setting up app structure...
✓ Installing npm dependencies...
✓ App "Hello World" created successfully in "hello-world".
Explore the Project Structure
Navigate into your app directory:
cd hello-world
Your project structure looks like this:
hello-world/
├── src/
│ ├── index.js # Entry point
│ └── views/
│ └── App.jsx # Main view component
├── public/
│ └── index.html # HTML template with SDK
├── teachfloor-app.json # App manifest
├── package.json # Dependencies
├── webpack.config.js # Webpack config
├── tsconfig.json # TypeScript config
└── .gitignore
Add a View
Add a view to display your app in the course list page:
teachfloor apps add view
Select:
- Viewport:
teachfloor.dashboard.course.list
- Component Name: Press Enter to accept "CourseListView"
- Generate example: Yes
This creates src/views/CourseListView.jsx
and updates your manifest.
Customize Your Component
Open src/views/CourseListView.jsx
and modify it:
import React from 'react'
import {
Container,
Text,
Button,
SimpleGrid,
showToast,
useExtensionContext,
} from '@teachfloor/extension-kit'
const CourseListView = () => {
const { userContext } = useExtensionContext()
const handleClick = () => {
showToast('Hello from your app!', { type: 'success' })
}
return (
<Container>
<SimpleGrid verticalSpacing="md">
<Text size="xl" fw={700}>
Hello, {userContext.full_name}!
</Text>
<Text size="sm" c="dimmed">
Welcome to your first Teachfloor app.
</Text>
<Button onClick={handleClick}>
Click Me
</Button>
</SimpleGrid>
</Container>
)
}
export default CourseListView
Start the Development Server
Run the development server:
teachfloor apps start
This will:
- Validate your manifest
- Upload the manifest to the platform
- Open your browser to install the app
- Start the webpack dev server on
http://localhost:3000
✓ Manifest file updated
Install URL: https://app.teachfloor.com/your-org/courses?app=abc123@1.0.0
Starting development server...
Test Your App
- Your browser will open to the install URL
- Click "Install" to add the app to your organization
- Navigate to the course list page
- You should see your app displayed!
The app will hot-reload as you make changes to the code.
Build for Production
When you're ready to deploy:
- Stop the dev server (Ctrl+C)
- Build the production bundle:
teachfloor apps upload
This will:
- Run
npm run build
- Bundle your app for production
- Upload files to the platform
- Create a new app version
✓ Building the production bundle...
✓ Uploading files...
✓ App uploaded successfully.
Publish to Marketplace (Optional)
If you want to make your app available in the public marketplace:
Set Distribution to Public
First, set your app's distribution type to public:
teachfloor apps set distribution
Select public
when prompted. This updates your manifest:
{
"distribution_type": "public"
}
Upload and Submit
- Upload your app with the updated manifest:
teachfloor apps upload
- Go to your Teachfloor dashboard
- Navigate to Settings → Apps
- Find your app and click "Submit for Review"
- Wait for approval from the Teachfloor team
distribution_type: "public"
can be submitted for marketplace review. Private apps (distribution_type: "private"
) are only visible to your organization and don't require review.What's Next?
Congratulations! You've built your first Teachfloor app. Here's what to explore next:
Learn Core Concepts
- App Manifest - Configure your app
- Viewports - Understand placement options
- Extension Kit - Explore available components
Add More Functionality
- Data Storage - Persist user data
- Permissions - Access platform resources
- Extension Kit Integration - Use platform features
See Examples
- Example Apps - Sample code and patterns
Ready to dive deeper? Continue to App Manifest