Developer Documentation

SDK Integration

Install the JijingiBase SDK once, connect it to the intended project, and use only the APIs your application needs.

1. Installation options

Choose one installation mode for your project. Do not install both modes on the same page.

Standalone Integration

Use the generated Standalone Integration snippet when your application does not already initialize the named Firebase app required by JijingiBase. The generated snippet loads the required Firebase libraries and initializes the JijingiBase connection.

Existing Firebase Integration

Use Existing Firebase Integration only when your application has already initialized the specifically named Firebase app expected by the generated SDK snippet: jijingiBase. This mode does not load Firebase libraries or call initializeApp().

Important: Having Firebase initialized for your own application is not enough. The named app must point to the Firebase connection intended for JijingiBase. The SDK should not silently use an unrelated default Firebase app.
// Existing Firebase mode only:
// 1. Initialize the named JijingiBase Firebase app first.
// 2. Then load the generated Existing Firebase Integration script.

Use the actual generated snippet from the correct JijingiBase project workspace. The example above is an explanatory comment, not a replacement for the generated installation code.

2. Complete Integration

Each project has its own generated Complete Integration snippet. To get it:

  1. Open JijingiBase and select the correct project.
  2. Open that project's workspace and choose Integration.
  3. Copy the generated Complete Integration snippet.
  4. Paste it into your application according to the placement instructions shown in the workspace.
  5. Wait for the SDK to load before calling its methods.

The generated snippet includes a human-readable project name along with the technical project identity used to route data. Do not copy one project's generated snippet into another project.

What Complete Integration provides

Installing the SDK does not force feedback forms, suggestion forms, banners, modals, or notice designs into your interface. Your application controls its own UI.

3. Core SDK and custom analytics

Use JijingiBase.track() to record meaningful events in your application.

JijingiBase.track("button_click", {
  button: "signup"
});

Choose event names that describe what happened, such as account_created, download_completed, or onboarding_finished. Keep event properties small and useful.

Privacy: Never send passwords, authentication tokens, API keys, payment credentials, or other sensitive information as analytics properties.

4. Feedback

Use feedback for a visitor's rating or comments about the connected project. Your application owns the form, layout, and interaction design; the SDK submits the data.

try {
  const result = await JijingiBase.feedback({
    rating: 5,
    message: "Tell us what you think"
  });

  console.log("Feedback submitted", result);
} catch (error) {
  console.error("Feedback submission failed", error);
}

The supported payload includes a numeric rating and a text message. The SDK associates the submission with the project connected by the generated integration. Show success only after the promise resolves, and show an actionable error if it rejects.

For a documentation feedback widget, include the documentation page identifier in the message or in a supported project-specific field only if your deployed SDK/backend accepts that field. Do not assume arbitrary fields are stored.

5. Suggestions

Use suggestions for feature ideas, product improvements, and requests that should be reviewed separately from ordinary feedback.

try {
  const result = await JijingiBase.suggestion({
    title: "Feature idea",
    description: "Describe the suggestion",
    priority: "medium"
  });

  console.log("Suggestion submitted", result);
} catch (error) {
  console.error("Suggestion submission failed", error);
}

The documented priority values are low, medium, and high. Design the suggestion form in your own application and handle errors rather than silently discarding them.

6. App Notices

JijingiBase provides published notice data. Your application decides where and how those notices appear; the SDK does not automatically inject a banner, modal, or popup.

Load notices that are currently visible

const notices = await JijingiBase.notices.visible();

visible() returns published notices that have not been dismissed on the current browser/device for that project.

Load all published notices

const notices = await JijingiBase.notices.list();

Use list() when your interface needs all published notices, including notices dismissed locally.

Subscribe to notice changes

const unsubscribe = JijingiBase.notices.subscribeVisible((notices) => {
  renderNotices(notices);
});

// When your page/component is disposed:
unsubscribe();

Use subscribeVisible() when the UI should automatically ignore notices dismissed on the current browser/device. Use subscribe() when you need every published notice.

Choose where notices appear

Notices may appear on a login page, dashboard, settings page, within a feature, in a modal, or in a bottom slide-up. You control the container and presentation.

<div id="app-notices"></div>

Dismiss, restore, and inspect notices

// Dismiss a notice for this browser/device and project:
JijingiBase.notices.dismiss(notice.id);

// Restore a previously dismissed notice:
JijingiBase.notices.restore(notice.id);

// Check whether it is dismissed:
const dismissed = JijingiBase.notices.isDismissed(notice.id);

// Clear locally stored dismissals for this project:
JijingiBase.notices.clearDismissed();

Your application controls the dismiss button and its UI. A local dismissal is not the same as unpublishing a notice for everyone.

7. Project identity

Every generated integration belongs to one JijingiBase project. The project name helps developers recognize the snippet, while technical identifiers route SDK activity to the intended project and lab.

8. Troubleshooting

The SDK method is undefined

Confirm the generated Complete Integration script is present on the page and has finished loading before calling JijingiBase. Check for script-loading errors in the browser console.

Data appears under the wrong project

Check that the installed snippet came from the project you are viewing in JijingiBase. Do not reuse an integration generated for another project.

Notices do not appear

Confirm the notice is published and not dismissed locally. Use JijingiBase.notices.list() to inspect all published notices, then verify your own rendering code.

Feedback or suggestions fail

Confirm the SDK is loaded, the payload uses supported fields, and the connected project is correct. Catch rejected promises and inspect the returned error and browser console. Also confirm the backend and database rules allow the intended submission.

Notice subscriptions keep running after navigation

Call the unsubscribe function returned by subscribe() or subscribeVisible() when the component or page is removed.

9. Security guidance

10. Integration checklist

  1. Open the correct JijingiBase project workspace.
  2. Copy its generated Complete Integration snippet.
  3. Confirm the human-readable project name and project identity are correct.
  4. Install the SDK once using the appropriate installation mode.
  5. Wait for SDK initialization before calling its APIs.
  6. Use only the feature APIs your application needs.
  7. Test analytics, feedback, suggestions, and notices with the correct project selected.
  8. Confirm submissions appear under the intended project and handle failures visibly.

JijingiBase provides the project connection and supported feature APIs. Your application retains control over its own forms, layouts, animations, and user experience.