diff --git a/PROMPT.md b/PROMPT.md index ce4cf2d0..be9115b1 100644 --- a/PROMPT.md +++ b/PROMPT.md @@ -154,26 +154,31 @@ botbook/ ├── src/ │ ├── SUMMARY.md # Table of contents │ ├── README.md # Introduction -│ ├── chapter-01/ # Run and Talk (Quick Start) -│ ├── chapter-02/ # Package System -│ ├── chapter-03/ # Knowledge Base -│ ├── chapter-04-gbui/ # UI System -│ ├── chapter-05-gbtheme/ # Theming -│ ├── chapter-06-gbdialog/ # BASIC Dialogs -│ ├── chapter-07-gbapp/ # Applications -│ ├── chapter-08-config/ # Configuration -│ ├── chapter-09-api/ # REST API -│ ├── chapter-10-api/ # WebSocket API -│ ├── chapter-11-features/ # Feature Modules -│ ├── chapter-12-auth/ # Authentication -│ ├── chapter-13-community/ # Contributing -│ ├── chapter-14-migration/ # Migration Guide -│ ├── appendix-*/ # Reference materials -│ └── assets/ # Images, diagrams +│ ├── 01-introduction/ # Run and Talk (Quick Start) +│ ├── 02-templates/ # Package System +│ ├── 03-knowledge-base/ # Knowledge Base +│ ├── 04-gbui/ # UI System +│ ├── 05-gbtheme/ # Theming +│ ├── 06-gbdialog/ # BASIC Dialogs +│ ├── 07-gbapp/ # Applications +│ ├── 08-config/ # Configuration +│ ├── 09-tools/ # Tools +│ ├── 10-rest/ # REST API +│ ├── 11-features/ # Feature Modules +│ ├── 12-auth/ # Authentication +│ ├── 13-community/ # Contributing +│ ├── 14-migration/ # Migration Guide +│ ├── 15-appendix/ # Reference materials +│ ├── 16-appendix-docs-style/ +│ ├── 17-testing/ # Testing guide +│ ├── 18-appendix-external-services/ +│ ├── 19-maintenance/ # Maintenance +│ └── assets/ # Images, diagrams ├── i18n/ # Translations -│ ├── src-cn/ # Chinese -│ ├── src-ja/ # Japanese -│ └── src-pt/ # Portuguese +│ ├── cn/ # Chinese +│ ├── en/ # English +│ ├── ja/ # Japanese +│ └── pt/ # Portuguese └── book/ # Generated output ``` @@ -457,4 +462,4 @@ TALK "message" HEAR variable SEND MAIL to, subject, body, attachments SEND TEMPLATE recipients, template, variables -``` \ No newline at end of file +``` diff --git a/src/04-gbui/apps/README.md b/src/04-gbui/apps/README.md index 3acca69d..fee6b469 100644 --- a/src/04-gbui/apps/README.md +++ b/src/04-gbui/apps/README.md @@ -1,177 +1,77 @@ -# Suite Applications +# Suite Apps -> **Individual app documentation for General Bots Suite** - -Each application in the Suite has its own dedicated documentation with: -- Flow diagrams (SVG with light/dark theme support) -- Interface layouts -- HTMX integration patterns -- API endpoints -- CSS classes -- JavaScript handlers -- Keyboard shortcuts +> **Everything you need, all in one place** --- -## Core Applications +## Your Apps -| App | Description | Documentation | -|-----|-------------|---------------| -| 🖥️ **Suite** | Full desktop interface | [suite.md](./suite.md) | -| 💬 **Chat** | AI-powered conversation assistant | [chat.md](./chat.md) | -| 📁 **Drive** | Cloud file storage and management | [drive.md](./drive.md) | -| ✓ **Tasks** | To-do lists with priorities | [tasks.md](./tasks.md) | -| ✉ **Mail** | Email client | [mail.md](./mail.md) | -| 📅 **Calendar** | Scheduling and events | [calendar.md](./calendar.md) | -| 🎥 **Meet** | Video conferencing | [meet.md](./meet.md) | -| 🎬 **Player** | Media viewer | [player.md](./player.md) | +Click any app icon in the top-right menu (⋮⋮⋮) to open it. -## Productivity Applications - -| App | Description | Documentation | -|-----|-------------|---------------| -| 📝 **Paper** | AI-assisted document writing | [paper.md](./paper.md) | -| 🔍 **Research** | AI-powered search and discovery | [research.md](./research.md) | -| 📊 **Analytics** | Reports and dashboards | [analytics.md](./analytics.md) | - -## Developer Tools - -| App | Description | Documentation | -|-----|-------------|---------------| -| 🎨 **Designer** | Visual dialog builder | [designer.md](./designer.md) | -| 📚 **Sources** | Prompts, templates, and models | [sources.md](./sources.md) | -| 🛡️ **Compliance** | Security scanner | [compliance.md](./compliance.md) | - -## System Components - -| Component | Description | Location | -|-----------|-------------|----------| -| 🔐 **Auth** | Authentication views | `ui/suite/auth/` | -| 👤 **Attendant** | Attendant interface | `ui/suite/attendant/` | -| 🧩 **Partials** | Reusable HTML fragments | `ui/suite/partials/` | -| 🔧 **Tools** | Developer utilities | `ui/suite/tools/` | -| 📈 **Monitoring** | System monitoring dashboard | `ui/suite/monitoring/` | +| App | What It Does | +|-----|--------------| +| 💬 **Chat** | Talk to your AI assistant | +| 📁 **Drive** | Store and organize your files | +| ✓ **Tasks** | Keep track of your to-do list | +| ✉ **Mail** | Send and receive emails | +| 📅 **Calendar** | Schedule meetings and events | +| 🎥 **Meet** | Video calls with your team | +| 🎬 **Player** | Watch videos and listen to audio | --- -## App Launcher +## Productivity Apps -The Suite features a Google-style app launcher accessible from the header: - -App Launcher - -### Accessing Apps - -1. **Click the grid icon** (⋮⋮⋮) in the top-right corner -2. **Select an app** from the dropdown menu -3. App loads in the main content area - -### Keyboard Shortcuts - -| Shortcut | App | -|----------|-----| -| `Alt+1` | Chat | -| `Alt+2` | Drive | -| `Alt+3` | Tasks | -| `Alt+4` | Mail | -| `Alt+5` | Calendar | -| `Alt+6` | Meet | +| App | What It Does | +|-----|--------------| +| 📝 **Paper** | Write documents with AI help | +| 🔍 **Research** | Search and discover information | +| 📊 **Analytics** | View reports and dashboards | --- -## Architecture Overview +## Quick Access -All Suite apps follow the same patterns: +**Keyboard shortcuts** to open apps fast: -### HTMX Loading - -Apps are loaded lazily when selected: - -```html - - Chat - -``` - -### Component Structure - -Each app is a self-contained HTML fragment: - -``` -app-name/ -├── app-name.html # Main component -├── app-name.css # Styles (optional) -└── app-name.js # JavaScript (optional) -``` - -### API Integration - -Apps communicate with the backend via REST APIs: - -```html -
- Loading... -
-``` - -### Real-Time Updates - -WebSocket support for live data: - -```html -
- -
-``` +| Press | Opens | +|-------|-------| +| `Alt + 1` | Chat | +| `Alt + 2` | Drive | +| `Alt + 3` | Tasks | +| `Alt + 4` | Mail | +| `Alt + 5` | Calendar | +| `Alt + 6` | Meet | --- -## Creating Custom Apps +## Tips -To add a new app to the Suite: - -1. **Create the component** in `ui/suite/your-app/` -2. **Add navigation entry** in `index.html` -3. **Define API endpoints** in your Rust backend -4. **Document the app** in this folder - -### Template - -```html - -
-
-

Your App

-
- -
-
Loading...
-
-
- - -``` +- **Switch apps quickly** - Use the app menu or keyboard shortcuts +- **Stay in one place** - All your work is saved automatically +- **Ask for help** - The Chat app can help you with any app --- -## See Also +## App Guides -- [Suite Manual](../suite-manual.md) - Complete user guide -- [HTMX Architecture](../htmx-architecture.md) - Technical details -- [UI Structure](../ui-structure.md) - File organization -- [Chapter 10: REST API](../../chapter-10-rest/README.md) - API reference \ No newline at end of file +Learn more about each app: + +- [Chat](./chat.md) - Talk to your AI assistant +- [Drive](./drive.md) - Manage your files +- [Tasks](./tasks.md) - Track your to-dos +- [Mail](./mail.md) - Handle your email +- [Calendar](./calendar.md) - Manage your schedule +- [Meet](./meet.md) - Join video calls +- [Player](./player.md) - Play media files +- [Paper](./paper.md) - Write with AI +- [Research](./research.md) - Search smarter +- [Analytics](./analytics.md) - See your data + +--- + +## Need Help? + +Just ask in **Chat**: "How do I use [app name]?" + +Your AI assistant knows all the apps and can guide you step by step. \ No newline at end of file diff --git a/src/04-gbui/apps/tasks.md b/src/04-gbui/apps/tasks.md index 17c85ff2..ce5d394c 100644 --- a/src/04-gbui/apps/tasks.md +++ b/src/04-gbui/apps/tasks.md @@ -1,230 +1,126 @@ -# Tasks - To-Do Management +# Tasks -> **Track what needs to be done** - -Tasks Interface Screen +> **Your personal to-do list** --- -## Overview +## What is Tasks? -Tasks is your to-do list manager within General Bots Suite. Create tasks, set priorities, organize by category, and track your progress. Built with HTMX for instant updates without page reloads. +Tasks helps you keep track of what you need to do. Add tasks, check them off when done, and stay organized. --- -## Features +## Adding a Task -### Adding Tasks +1. Type what you need to do in the text box +2. Click **+ Add Task** or press **Enter** -**Quick Add:** -1. Type task description in the input box -2. Press **Enter** or click **+ Add** +That's it! Your task appears in the list. -**With Details:** -1. Type task description -2. Select a category (optional) -3. Pick a due date (optional) -4. Click **+ Add** +### Optional: Add More Details -### Priority Levels +Before clicking Add, you can: -| Priority | Icon | When to Use | -|----------|------|-------------| -| **High** | 🔴 | Must do today | -| **Medium** | 🟡 | Important but not urgent | -| **Low** | 🟢 | Can wait | -| **None** | ⚪ | No deadline | +- **Pick a category** - Work, Personal, Shopping, or Health +- **Set a due date** - Click the calendar icon -### Categories +--- -| Category | Icon | -|----------|------| -| Work | 💼 | -| Personal | 🏠 | -| Shopping | 🛒 | -| Health | ❤️ | -| Custom | 🏷️ | +## Completing Tasks -### Filter Tabs +Click the **checkbox** next to any task to mark it done. -| Tab | Shows | -|-----|-------| -| **All** | All tasks | -| **Active** | Uncompleted tasks | -| **Completed** | Done tasks | -| **Priority** | High priority only | +Done tasks get a strikethrough and move to the Completed tab. + +**Changed your mind?** Click the checkbox again to un-complete it. + +--- + +## Task Priority + +Click the **star** ⭐ on any task to mark it as important. + +Starred tasks appear in the **Priority** tab for quick access. + +--- + +## Filtering Your Tasks + +Use the tabs at the top to see different views: + +| Tab | What You See | +|-----|--------------| +| **All** | Everything | +| **Active** | Tasks not done yet | +| **Completed** | Tasks you finished | +| **Priority** | Starred tasks only | + +--- + +## Editing a Task + +1. Click on the task text +2. Type your changes +3. Press **Enter** to save or **Escape** to cancel + +--- + +## Deleting a Task + +Click the **trash icon** 🗑️ on the right side of any task. + +**Note:** This cannot be undone! --- ## Keyboard Shortcuts -| Shortcut | Action | -|----------|--------| -| `Enter` | Add task (when in input) | -| `Space` | Toggle task completion | -| `Delete` | Remove selected task | -| `Tab` | Move to next field | +| Press | What Happens | +|-------|--------------| +| `Enter` | Add task (when typing) | | `Escape` | Cancel editing | -| `↑` / `↓` | Navigate tasks | --- ## Creating Tasks from Chat -
-
- -
-
- -
-
+You can also create tasks by talking to your bot: -### Managing Tasks via Chat +**You:** "Remind me to call John tomorrow" -
-
- -
-
- -
-
- -
-
- -
-
+**Bot:** "✅ Task created: Call John - Due: Tomorrow" -### Setting Reminders +**You:** "What tasks do I have today?" -
-
- -
-
- -
-
+**Bot:** "You have 3 tasks for today..." --- -## API Endpoints +## Tips -| Endpoint | Method | Description | -|----------|--------|-------------| -| `/api/tasks` | GET | List all tasks | -| `/api/tasks` | POST | Create new task | -| `/api/tasks/:id` | GET | Get single task | -| `/api/tasks/:id` | PATCH | Update task | -| `/api/tasks/:id` | DELETE | Delete task | -| `/api/tasks/stats` | GET | Get task statistics | - -### Query Parameters - -| Parameter | Values | Default | -|-----------|--------|---------| -| `filter` | `all`, `active`, `completed`, `priority` | `all` | -| `category` | `work`, `personal`, `shopping`, `health` | none | -| `sort` | `created`, `dueDate`, `priority`, `text` | `created` | -| `order` | `asc`, `desc` | `desc` | - -### Request Body (Create/Update) - -```json -{ - "text": "Review quarterly report", - "category": "work", - "dueDate": "2024-03-20", - "priority": "high", - "completed": false -} -``` - -### Response Format - -```json -{ - "id": 123, - "text": "Review quarterly report", - "category": "work", - "dueDate": "2024-03-20", - "priority": "high", - "completed": false, - "createdAt": "2024-03-18T10:30:00Z", - "updatedAt": "2024-03-18T10:30:00Z" -} -``` - ---- - -## Integration with Calendar - -Tasks with due dates automatically appear in your Calendar view, helping you visualize your workload across days and weeks. +- **Keep it simple** - Short task names are easier to scan +- **Use categories** - Helps you focus on one area at a time +- **Check daily** - Review your Active tasks each morning +- **Celebrate wins** - Look at Completed to see your progress! --- ## Troubleshooting -### Tasks Not Saving +### My task didn't save +- Check your internet connection +- Refresh the page and try again -1. Check network connection -2. Verify API endpoint is accessible -3. Check browser console for errors -4. Try refreshing the page +### I can't find my task +- Check the **All** tab (not just Active) +- Try scrolling down if you have many tasks -### Filters Not Working - -1. Click the filter tab again -2. Check if tasks exist for that filter -3. Clear browser cache - -### Stats Not Updating - -1. Reload the page -2. Check for JavaScript errors in console +### Stats show wrong numbers +- Refresh the page --- ## See Also -- [Suite Manual](../suite-manual.md) - Complete user guide -- [Chat App](./chat.md) - Create tasks from chat -- [Calendar App](./calendar.md) - View tasks in calendar -- [Tasks API](../../chapter-10-rest/tasks-api.md) - API reference \ No newline at end of file +- [Calendar](./calendar.md) - Tasks with due dates show here too +- [Chat](./chat.md) - Create tasks by talking to your bot \ No newline at end of file diff --git a/src/06-gbdialog/api-possibilities.md b/src/06-gbdialog/api-possibilities.md new file mode 100644 index 00000000..229fa338 --- /dev/null +++ b/src/06-gbdialog/api-possibilities.md @@ -0,0 +1,256 @@ +# API Possibilities + +Your bot can connect to hundreds of external services. This chapter shows what's possible when you integrate APIs into your bot conversations. + +--- + +## How API Integration Works + +When users talk to your bot, it can: + +1. **Fetch information** from external services (weather, news, prices) +2. **Send data** to other systems (CRM, email, databases) +3. **Automate workflows** across multiple services + +The bot decides when to call APIs based on what the user asks. + +--- + +## What You Can Build + +### Customer Service Bot +- Look up orders from your e-commerce system +- Check shipping status from carriers +- Create support tickets automatically + +### Sales Assistant +- Pull customer info from your CRM +- Check inventory levels +- Generate quotes and send emails + +### Personal Assistant +- Get weather forecasts +- Check calendar availability +- Book appointments + +### Data Dashboard Bot +- Pull metrics from analytics platforms +- Get stock prices and crypto rates +- Aggregate data from multiple sources + +--- + +## Popular API Categories + +### 🌤️ Weather & Environment + +| Service | What You Can Do | +|---------|-----------------| +| OpenWeatherMap | Current weather, forecasts, alerts | +| AirVisual | Air quality index by location | +| Open-Meteo | Free weather data worldwide | + +**Example conversation:** + +> **User:** What's the weather in São Paulo? +> +> **Bot:** It's 24°C and partly cloudy in São Paulo. Expect rain this afternoon. + +--- + +### 💰 Finance & Payments + +| Service | What You Can Do | +|---------|-----------------| +| Stripe | Process payments, manage subscriptions | +| CoinGecko | Crypto prices and market data | +| Exchange Rates | Currency conversion | + +**Example conversation:** + +> **User:** How much is Bitcoin right now? +> +> **Bot:** Bitcoin is currently $67,450 USD, up 2.3% today. + +--- + +### 📰 News & Content + +| Service | What You Can Do | +|---------|-----------------| +| NewsAPI | Headlines from 150+ sources | +| Hacker News | Tech news and discussions | +| Reddit | Posts from any subreddit | + +**Example conversation:** + +> **User:** What's trending in tech news? +> +> **Bot:** Top stories: Apple announces new M4 chip, OpenAI releases GPT-5... + +--- + +### 📧 Communication + +| Service | What You Can Do | +|---------|-----------------| +| SendGrid | Send transactional emails | +| Twilio | SMS messages and voice calls | +| Slack | Post messages to channels | + +**Example conversation:** + +> **User:** Send the report to the team +> +> **Bot:** Done! I've emailed the Q3 report to the sales team and posted a summary in #sales-updates. + +--- + +### 🗺️ Maps & Location + +| Service | What You Can Do | +|---------|-----------------| +| Google Maps | Directions, places, distances | +| OpenStreetMap | Free mapping data | +| IP Geolocation | Locate users by IP address | + +**Example conversation:** + +> **User:** How far is the airport? +> +> **Bot:** Guarulhos Airport is 25km away, about 45 minutes in current traffic. + +--- + +### 🛒 E-Commerce + +| Service | What You Can Do | +|---------|-----------------| +| Shopify | Manage products and orders | +| WooCommerce | WordPress store integration | +| Stripe | Payment processing | + +**Example conversation:** + +> **User:** Check my order status +> +> **Bot:** Order #12345 shipped yesterday via FedEx. Expected delivery: Friday. + +--- + +### 📅 Productivity + +| Service | What You Can Do | +|---------|-----------------| +| Google Calendar | Schedule events, check availability | +| Trello | Manage cards and boards | +| Notion | Create and update pages | + +**Example conversation:** + +> **User:** Schedule a meeting with John tomorrow at 2pm +> +> **Bot:** Done! I've added "Meeting with John" to your calendar for tomorrow at 2pm. + +--- + +### 🎵 Entertainment + +| Service | What You Can Do | +|---------|-----------------| +| Spotify | Search songs, manage playlists | +| YouTube | Search videos, get info | +| TMDB | Movie and TV show data | + +**Example conversation:** + +> **User:** What movies are playing this weekend? +> +> **Bot:** Here's what's in theaters: Dune Part 3, The Avengers 6... + +--- + +### 🏥 Health & Fitness + +| Service | What You Can Do | +|---------|-----------------| +| Fitbit | Activity and sleep data | +| Nutritionix | Food and nutrition info | +| Strava | Running and cycling stats | + +**Example conversation:** + +> **User:** How many calories in a Big Mac? +> +> **Bot:** A Big Mac has 563 calories, 33g fat, and 25g protein. + +--- + +### 🔐 Authentication + +| Service | What You Can Do | +|---------|-----------------| +| Auth0 | User login and registration | +| Firebase Auth | Google, Facebook, email login | +| Have I Been Pwned | Check for data breaches | + +--- + +### 🛠️ Developer Tools + +| Service | What You Can Do | +|---------|-----------------| +| GitHub | Repo info, issues, PRs | +| Jira | Create and manage tickets | +| Sentry | Error tracking and alerts | + +**Example conversation:** + +> **User:** Create a bug ticket for the login issue +> +> **Bot:** Created PROJ-456: "Login button not responding on mobile" - assigned to dev team. + +--- + +## API Marketplaces + +Find more APIs at: + +- **RapidAPI** - 40,000+ APIs in one place +- **APILayer** - Curated collection of useful APIs +- **Public APIs** - Free API directory + +--- + +## Things to Consider + +### Rate Limits +Most APIs limit how many requests you can make. Plan for this in high-traffic bots. + +### API Keys +Keep your API keys secure. Never expose them in client-side code. + +### Costs +Many APIs are free up to a limit, then charge per request. Monitor your usage. + +### Reliability +Have fallback responses when APIs are slow or unavailable. + +--- + +## Getting Started + +1. **Choose an API** that matches what your bot needs to do +2. **Get API credentials** (usually free to sign up) +3. **Create a tool** in your `.gbdialog` folder that calls the API +4. **Test it** by asking your bot questions that trigger the API + +Your bot's LLM automatically learns when to use each tool based on what users ask. + +--- + +## See Also + +- [Keywords Reference](./keywords.md) - BASIC commands for API calls +- [HTTP Operations](./keywords-http.md) - GET, POST, PUT, PATCH, DELETE +- [Tools and Integration](../09-tools/README.md) - Building custom tools \ No newline at end of file diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 432e6307..59a12383 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -92,6 +92,7 @@ - [Chapter 06: gbdialog Reference](./06-gbdialog/README.md) - [Dialog Basics](./06-gbdialog/basics.md) + - [API Possibilities](./06-gbdialog/api-possibilities.md) - [Universal Messaging & Multi-Channel](./06-gbdialog/universal-messaging.md) - [BASIC vs n8n/Zapier/Make](./06-gbdialog/basic-vs-automation-tools.md) - [Template Variables](./06-gbdialog/template-variables.md) diff --git a/src/assets/icons/gb-gear.svg b/src/assets/icons/gb-gear.svg index 5cb00531..8b1180a9 100644 --- a/src/assets/icons/gb-gear.svg +++ b/src/assets/icons/gb-gear.svg @@ -1,4 +1,4 @@ - - - + + +