TasGrid Parent App Simulator

Login to Parent Application

This simulates the parent application authenticating with the shared backend.

Note Creation API

Or send a token manually:

Developer Integration Guide

1. Available Routes:

  • /embed/notes: Renders the full notepad/editor.
  • /embed/quick-add: Renders a standalone task creation form.

2. Authentication Protocol:

The parent application must send a postMessage to the iframe immediately after the iframe loads (or whenever auth state changes).

iframe.contentWindow.postMessage({
  type: "TASGRID_AUTH",
  token: "YOUR_POCKETBASE_TOKEN",
  user: { /* optional PB user record */ }
}, "*");

4. Note Creation API (TASGRID_CREATE_NOTE):

Trigger note creation from the parent app. TasGrid will respond with TASGRID_NOTE_CREATED.

// Request
iframe.contentWindow.postMessage({
  type: "TASGRID_CREATE_NOTE",
  note: {
    title: "Project Alpha",
    content: "Initial requirements...",
    tags: ["Project", "2024"],
    isPrivate: false
  }
}, "*");

// Response Listener
window.addEventListener("message", (event) => {
  if (event.data.type === "TASGRID_NOTE_CREATED") {
    console.log("New Note ID:", event.data.noteId);
  }
});
Notes Embed /embed/notes
Quick Add Embed /embed/quick-add