Skip to content

improvements for AI and future documentation standards#204

Merged
Arpanexe merged 6 commits intomasterfrom
datasource-and-coding-standards
Aug 26, 2025
Merged

improvements for AI and future documentation standards#204
Arpanexe merged 6 commits intomasterfrom
datasource-and-coding-standards

Conversation

@ibroom
Copy link
Contributor

@ibroom ibroom commented May 27, 2025

extensive updates to the data source docs to include far better examples that AI can follow. Created documentation and coding standards primarily for AI to follow when updating documentation for other sections of API docs (not for guides or tutorials). The documentation and code standards haven't yet been tested with AI to confirm their effectiveness and this should be done as part of the code review

Summary by CodeRabbit

  • Documentation
    • Added comprehensive reference guides for Fliplet Data Sources query operators and the Fliplet Data Sources JavaScript API, including detailed usage examples, patterns, and best practices.
    • Introduced new documentation on approved JavaScript libraries, Fliplet API usage patterns, coding standards, and JavaScript coding standards (with ES5 and migration tips).
    • Enhanced guidance on environment-specific development, code examples, and documentation practices to improve consistency and maintainability for developers.
    • Expanded DataSources joins documentation with async/await examples alongside existing promise-based patterns for clearer modern usage.

extensive updates to the data source docs to include far better examples that AI can follow. Created documentation and coding standards primarily for AI to follow when updating documentation for other sections of API docs (not for guides or tutorials). The documentation and code standards haven't yet been tested with AI to confirm their effectiveness and this should be done as part of the code review
@ibroom
Copy link
Contributor Author

ibroom commented Jun 10, 2025

@coderabbitai full review

@coderabbitai
Copy link

coderabbitai bot commented Jun 10, 2025

✅ Actions performed

Full review triggered.

@coderabbitai
Copy link

coderabbitai bot commented Jun 10, 2025

Walkthrough

Several new and extensively revised documentation files have been added or updated. The changes introduce comprehensive guides on Fliplet Data Sources query operators, the Data Sources API, approved libraries, API usage patterns, coding standards, and JavaScript coding practices. These documents provide structured explanations, practical examples, best practices, and migration guides, enhancing the clarity and consistency of Fliplet development documentation.

Changes

File(s) Change Summary
docs/API/datasources/query-operators.md Added a detailed reference on Fliplet Data Sources query operators, including MongoDB-style and custom $filters operators.
docs/API/fliplet-datasources.md Extensively rewritten and expanded Data Sources API documentation with structured sections, examples, and usage patterns.
docs/approved-libraries.md New documentation listing approved JavaScript libraries for Fliplet, usage guidelines, and native alternatives.
docs/code-api-patterns.md New guide on major Fliplet APIs, common use cases, and practical code patterns for CRUD, navigation, and communication.
docs/coding-standards.md Introduced comprehensive coding and documentation standards for Fliplet development and example creation.
docs/javascript-coding-standards.md New document on ES5 coding standards, promise chaining, migration to ES6+, and compatibility guidelines for legacy code.
docs/API/datasources/joins.md Added async/await usage examples alongside existing promise-based examples for DataSources joins documentation.

Poem

In the warren of docs, a rabbit hops with glee,
New guides and patterns bloom for all to see.
With standards and queries, the code grows bright,
From ES5 to modern, each hop feels right.
Approved libraries, patterns, and more—
Fliplet’s garden of knowledge continues to soar!
🐇✨

Suggested reviewers

  • Arpanexe

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🔭 Outside diff range comments (1)
docs/API/fliplet-datasources.md (1)

1-4: 🛠️ Refactor suggestion

Align code examples with ES5 compatibility guidelines
Examples exclusively use modern ES6+ features (async/await, arrow functions, destructuring). Per the coding standards, include ES5 equivalents or note required environments.

🧹 Nitpick comments (9)
docs/approved-libraries.md (2)

1-1: Convert to top-level heading
Change ## Approved Libraries to # Approved Libraries to align with markdown best practices and satisfy MD041.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

1-1: First line in a file should be a top-level heading
null

(MD041, first-line-heading, first-line-h1)


125-127: Clarify phrasing for performance note
Consider rephrasing "Import only needed functions from large libraries" to "Import only the functions you need from large libraries" for clearer guidance.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~126-~126: Possible missing preposition found.
Context: ...n both Studio and App environments 4. Optimize Performance - Import only needed func...

(AI_HYDRA_LEO_MISSING_TO)

🪛 markdownlint-cli2 (0.17.2)

125-125: Ordered list item prefix
Expected: 1; Actual: 3; Style: 1/1/1

(MD029, ol-prefix)


126-126: Ordered list item prefix
Expected: 1; Actual: 4; Style: 1/1/1

(MD029, ol-prefix)

docs/code-api-patterns.md (1)

3-3: Use consistent heading levels
The "### Purpose and Importance" heading jumps two levels from the H1—use ## instead of ### to maintain proper hierarchy (MD001).

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

docs/javascript-coding-standards.md (1)

170-170: Remove trailing whitespace and add final newline
Trim the trailing space on line 170 and ensure the file ends with a single newline to address MD009 and MD047.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

170-170: Trailing spaces
Expected: 0; Actual: 1

(MD009, no-trailing-spaces)

docs/coding-standards.md (1)

7-14: Consider splitting large sections
This document is very extensive. Splitting "Development Environment Guidelines" and "Quick Reference Guide" into separate files could improve maintainability and navigation.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

8-8: Ordered list item prefix
Expected: 1; Actual: 2; Style: 1/1/1

(MD029, ol-prefix)


9-9: Ordered list item prefix
Expected: 1; Actual: 3; Style: 1/1/1

(MD029, ol-prefix)


12-12: Ordered list item prefix
Expected: 1; Actual: 4; Style: 1/1/1

(MD029, ol-prefix)

docs/API/fliplet-datasources.md (4)

10-16: Include error handling in async/await example
Add a try/catch around the await calls to demonstrate robust error management for production use.

Example:

async function example() {
-  const connection = await Fliplet.DataSources.connect(dataSourceId);
-  const records = await connection.find();
-  return records;
+  try {
+    const connection = await Fliplet.DataSources.connect(dataSourceId);
+    return await connection.find();
+  } catch (error) {
+    console.error('Data fetch failed:', error);
+    throw error;
+  }
}

34-36: Remove trailing spaces
Multiple lines have trailing whitespace that should be cleaned to pass markdownlint checks.

Also applies to: 47-49, 70-72

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

34-34: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


35-35: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


36-36: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


75-76: Ensure blank lines around headings and fenced code blocks
Headings and code fences should have surrounding blank lines to meet markdownlint rules (MD022, MD031).

Also applies to: 97-98

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

75-75: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


76-76: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


233-233: Reduce wordiness in phrase "new records"
Consider using "records" instead of "new records" for conciseness.

Also applies to: 433-433

🧰 Tools
🪛 LanguageTool

[style] ~233-~233: ‘new records’ might be wordy. Consider a shorter alternative.
Context: ...rt Records (Add Data) Purpose: Add new records to the data source Syntax: `conne...

(EN_WORDINESS_PREMIUM_NEW_RECORDS)

🪛 markdownlint-cli2 (0.17.2)

233-233: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e25f68e and f618183.

📒 Files selected for processing (6)
  • docs/API/datasources/query-operators.md (1 hunks)
  • docs/API/fliplet-datasources.md (1 hunks)
  • docs/approved-libraries.md (1 hunks)
  • docs/code-api-patterns.md (1 hunks)
  • docs/coding-standards.md (1 hunks)
  • docs/javascript-coding-standards.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/approved-libraries.md

[uncategorized] ~126-~126: Possible missing preposition found.
Context: ...n both Studio and App environments 4. Optimize Performance - Import only needed func...

(AI_HYDRA_LEO_MISSING_TO)

docs/API/datasources/query-operators.md

[typographical] ~194-~194: Do not use a colon (:) before a series that is introduced by a preposition (‘from’). Remove the colon or add a noun or a noun phrase after the preposition.
Context: ... | Numeric range (inclusive) | Object | { column: 'Age', condition: 'between', value: { from: 18, to: 65 } } | | oneof | Value in ...

(RP_COLON)


[typographical] ~204-~204: Do not use a colon (:) before a series that is introduced by a preposition (‘from’). Remove the colon or add a noun or a noun phrase after the preposition.
Context: ...| datebetween | Date range | Object | `{ column: 'EventDate', condition: 'datebetween', from: { value: '2024-01-01' }, to: { value: '...

(RP_COLON)

docs/coding-standards.md

[grammar] ~179-~179: Did you mean the adverb/preposition “within”?
Context: ... the tools that end-users will interact with in the published app. **When to use Studi...

(WITH_IN)

docs/API/fliplet-datasources.md

[style] ~233-~233: ‘new records’ might be wordy. Consider a shorter alternative.
Context: ...rt Records (Add Data) Purpose: Add new records to the data source Syntax: `conne...

(EN_WORDINESS_PREMIUM_NEW_RECORDS)


[style] ~433-~433: ‘new records’ might be wordy. Consider a shorter alternative.
Context: ...eplace entire data source contents with new records Syntax: `connection.replaceWith(r...

(EN_WORDINESS_PREMIUM_NEW_RECORDS)


[uncategorized] ~851-~851: The preposition ‘to’ seems more likely in this position.
Context: ...on Syntax: Use aggregate option in find method When to use: Analytic...

(AI_HYDRA_LEO_REPLACE_IN_TO)

🪛 markdownlint-cli2 (0.17.2)
docs/approved-libraries.md

1-1: First line in a file should be a top-level heading
null

(MD041, first-line-heading, first-line-h1)


12-12: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


13-13: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


14-14: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


15-15: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


16-16: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


20-20: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


21-21: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


22-22: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


47-47: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


48-48: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


49-49: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


84-84: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


85-85: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


86-86: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


87-87: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


124-124: Ordered list item prefix
Expected: 1; Actual: 2; Style: 1/1/1

(MD029, ol-prefix)


125-125: Ordered list item prefix
Expected: 1; Actual: 3; Style: 1/1/1

(MD029, ol-prefix)


126-126: Ordered list item prefix
Expected: 1; Actual: 4; Style: 1/1/1

(MD029, ol-prefix)


188-188: Files should end with a single newline character
null

(MD047, single-trailing-newline)

docs/code-api-patterns.md

3-3: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)


10-10: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


11-11: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


12-12: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


13-13: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


18-18: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


19-19: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


22-22: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


23-23: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


26-26: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


27-27: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


30-30: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


31-31: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


34-34: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


35-35: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


173-173: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


174-174: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


175-175: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


228-228: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


229-229: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


230-230: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


284-284: Files should end with a single newline character
null

(MD047, single-trailing-newline)

docs/API/datasources/query-operators.md

302-302: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


305-305: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


308-308: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


313-313: Ordered list item prefix
Expected: 1; Actual: 2; Style: 1/1/1

(MD029, ol-prefix)


314-314: Ordered list item prefix
Expected: 1; Actual: 3; Style: 1/1/1

(MD029, ol-prefix)


315-315: Ordered list item prefix
Expected: 1; Actual: 4; Style: 1/1/1

(MD029, ol-prefix)


386-386: Trailing spaces
Expected: 0; Actual: 1

(MD009, no-trailing-spaces)


386-386: Files should end with a single newline character
null

(MD047, single-trailing-newline)

docs/javascript-coding-standards.md

10-10: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


11-11: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


12-12: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


13-13: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


14-14: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


170-170: Trailing spaces
Expected: 0; Actual: 1

(MD009, no-trailing-spaces)


171-171: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


171-171: Link fragments should be valid
null

(MD051, link-fragments)


172-172: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


172-172: Link fragments should be valid
null

(MD051, link-fragments)


174-174: Files should end with a single newline character
null

(MD047, single-trailing-newline)


174-174: Link fragments should be valid
null

(MD051, link-fragments)

docs/coding-standards.md

8-8: Ordered list item prefix
Expected: 1; Actual: 2; Style: 1/1/1

(MD029, ol-prefix)


9-9: Ordered list item prefix
Expected: 1; Actual: 3; Style: 1/1/1

(MD029, ol-prefix)


12-12: Ordered list item prefix
Expected: 1; Actual: 4; Style: 1/1/1

(MD029, ol-prefix)


18-18: Ordered list item prefix
Expected: 1; Actual: 5; Style: 1/1/1

(MD029, ol-prefix)


19-19: Ordered list item prefix
Expected: 1; Actual: 6; Style: 1/1/1

(MD029, ol-prefix)


22-22: Link fragments should be valid
null

(MD051, link-fragments)


23-23: Ordered list item prefix
Expected: 1; Actual: 7; Style: 1/1/1

(MD029, ol-prefix)


29-29: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)


41-41: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


42-42: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


43-43: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


44-44: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


51-51: Ordered list item prefix
Expected: 1; Actual: 2; Style: 1/1/1

(MD029, ol-prefix)


52-52: Ordered list item prefix
Expected: 1; Actual: 3; Style: 1/1/1

(MD029, ol-prefix)


53-53: Ordered list item prefix
Expected: 1; Actual: 4; Style: 1/1/1

(MD029, ol-prefix)


54-54: Ordered list item prefix
Expected: 1; Actual: 5; Style: 1/1/1

(MD029, ol-prefix)


55-55: Ordered list item prefix
Expected: 1; Actual: 6; Style: 1/1/1

(MD029, ol-prefix)


56-56: Ordered list item prefix
Expected: 1; Actual: 7; Style: 1/1/1

(MD029, ol-prefix)


102-102: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


103-103: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


120-120: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


121-121: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


121-121: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


122-122: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


125-125: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


128-128: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


129-129: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


136-136: Ordered list item prefix
Expected: 1; Actual: 2; Style: 1/1/1

(MD029, ol-prefix)


137-137: Ordered list item prefix
Expected: 1; Actual: 3; Style: 1/1/1

(MD029, ol-prefix)


138-138: Ordered list item prefix
Expected: 1; Actual: 4; Style: 1/1/1

(MD029, ol-prefix)


139-139: Ordered list item prefix
Expected: 1; Actual: 5; Style: 1/1/1

(MD029, ol-prefix)


140-140: Ordered list item prefix
Expected: 1; Actual: 6; Style: 1/1/1

(MD029, ol-prefix)


141-141: Ordered list item prefix
Expected: 1; Actual: 7; Style: 1/1/1

(MD029, ol-prefix)


142-142: Ordered list item prefix
Expected: 1; Actual: 8; Style: 1/1/1

(MD029, ol-prefix)


146-146: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)


149-149: Multiple headings with the same content
null

(MD024, no-duplicate-heading)


155-155: Multiple headings with the same content
null

(MD024, no-duplicate-heading)


158-158: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


159-159: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


160-160: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


161-161: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


162-162: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


164-164: Link fragments should be valid
null

(MD051, link-fragments)


182-182: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


183-183: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


184-184: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


185-185: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


188-188: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


189-189: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


190-190: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


191-191: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


194-194: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


216-216: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


217-217: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


218-218: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


227-227: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


228-228: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


229-229: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


230-230: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


231-231: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


234-234: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


235-235: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


236-236: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


237-237: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


240-240: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


276-276: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


277-277: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


278-278: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


279-279: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


285-285: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


286-286: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


301-301: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


302-302: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


316-316: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


317-317: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


366-366: Multiple headings with the same content
null

(MD024, no-duplicate-heading)


372-372: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


373-373: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


388-388: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


388-388: Multiple headings with the same content
null

(MD024, no-duplicate-heading)


389-389: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


403-403: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


404-404: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


418-418: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


419-419: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


434-434: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


435-435: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


475-475: Multiple headings with the same content
null

(MD024, no-duplicate-heading)


557-557: Multiple headings with the same content
null

(MD024, no-duplicate-heading)


563-563: Multiple headings with the same content
null

(MD024, no-duplicate-heading)


566-566: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


567-567: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


568-568: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


569-569: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


570-570: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


571-571: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


575-575: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)


581-581: Ordered list item prefix
Expected: 1; Actual: 2; Style: 1/1/1

(MD029, ol-prefix)


582-582: Ordered list item prefix
Expected: 1; Actual: 3; Style: 1/1/1

(MD029, ol-prefix)


583-583: Ordered list item prefix
Expected: 1; Actual: 4; Style: 1/1/1

(MD029, ol-prefix)


584-584: Ordered list item prefix
Expected: 1; Actual: 5; Style: 1/1/1

(MD029, ol-prefix)


585-585: Ordered list item prefix
Expected: 1; Actual: 6; Style: 1/1/1

(MD029, ol-prefix)


586-586: Ordered list item prefix
Expected: 1; Actual: 7; Style: 1/1/1

(MD029, ol-prefix)


622-622: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)


627-627: Multiple headings with the same content
null

(MD024, no-duplicate-heading)


807-807: Ordered list item prefix
Expected: 1; Actual: 2; Style: 1/1/1

(MD029, ol-prefix)


808-808: Ordered list item prefix
Expected: 1; Actual: 3; Style: 1/1/1

(MD029, ol-prefix)


809-809: Ordered list item prefix
Expected: 1; Actual: 4; Style: 1/1/1

(MD029, ol-prefix)


810-810: Ordered list item prefix
Expected: 1; Actual: 5; Style: 1/1/1

(MD029, ol-prefix)


811-811: Ordered list item prefix
Expected: 1; Actual: 6; Style: 1/1/1

(MD029, ol-prefix)


812-812: Ordered list item prefix
Expected: 1; Actual: 7; Style: 1/1/1

(MD029, ol-prefix)


816-816: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


817-817: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


818-818: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


819-819: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


820-820: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


821-821: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


822-822: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


826-826: Multiple consecutive blank lines
Expected: 1; Actual: 2

(MD012, no-multiple-blanks)


827-827: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


828-828: Trailing spaces
Expected: 0; Actual: 1

(MD009, no-trailing-spaces)


828-828: Files should end with a single newline character
null

(MD047, single-trailing-newline)

docs/API/fliplet-datasources.md

34-34: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


35-35: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


36-36: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


47-47: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


48-48: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


49-49: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


70-70: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


71-71: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


72-72: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


75-75: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


76-76: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


97-97: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


98-98: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


136-136: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


137-137: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


169-169: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


233-233: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


234-234: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


235-235: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


280-280: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


281-281: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


285-285: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


286-286: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


287-287: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


321-321: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


322-322: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


323-323: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


352-352: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


353-353: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


354-354: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


386-386: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


387-387: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


388-388: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


433-433: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


434-434: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


435-435: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


467-467: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


468-468: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


469-469: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


558-558: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


559-559: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


560-560: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


596-596: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


597-597: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


598-598: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


599-599: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


600-600: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


601-601: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


604-604: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


605-605: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


606-606: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


607-607: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


613-613: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


614-614: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


646-646: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


647-647: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


648-648: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


698-698: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


725-725: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


726-726: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


727-727: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


759-759: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


760-760: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


761-761: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


794-794: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


795-795: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


796-796: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


850-850: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


851-851: Trailing spaces
Expected: 0; Actual: 2

(MD009, no-trailing-spaces)


897-897: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


898-898: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


983-983: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


984-984: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


1129-1129: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


1130-1130: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


1273-1273: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


1274-1274: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


1460-1460: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


1461-1461: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


1462-1462: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


1463-1463: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


1464-1464: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


1465-1465: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


1468-1468: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


1576-1576: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


1577-1577: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


1578-1578: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


1579-1579: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


1580-1580: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


1581-1581: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (3)
docs/API/datasources/query-operators.md (1)

1-292: Comprehensive and well-structured reference
This document thoroughly covers all query operators with clear sections and examples. Formatting and content align with project standards.

🧰 Tools
🪛 LanguageTool

[typographical] ~194-~194: Do not use a colon (:) before a series that is introduced by a preposition (‘from’). Remove the colon or add a noun or a noun phrase after the preposition.
Context: ... | Numeric range (inclusive) | Object | { column: 'Age', condition: 'between', value: { from: 18, to: 65 } } | | oneof | Value in ...

(RP_COLON)


[typographical] ~204-~204: Do not use a colon (:) before a series that is introduced by a preposition (‘from’). Remove the colon or add a noun or a noun phrase after the preposition.
Context: ...| datebetween | Date range | Object | `{ column: 'EventDate', condition: 'datebetween', from: { value: '2024-01-01' }, to: { value: '...

(RP_COLON)

docs/API/fliplet-datasources.md (2)

5-7: Async usage emphasis is clear
The note on asynchronous API calls is well-positioned and highlights Promises usage effectively.


229-229:

Details

✅ Verification successful

Verify relative link to query operators doc
Ensure the path datasources/query-operators.md resolves correctly from this location.

Run:


🏁 Script executed:

rg -R "query-operators.md" --glob "docs/API/*"

Length of output: 451


🏁 Script executed:

#!/bin/bash
# Search for the query-operators.md file under docs/API
find docs/API -type f | grep "query-operators.md"

Length of output: 89


Link to query operators doc is valid
The file docs/API/datasources/query-operators.md exists, so the relative link datasources/query-operators.md in docs/API/fliplet-datasources.md resolves correctly. No further changes needed.

Comment on lines +1192 to +1218
const setupRealTimeUpdates = (connection, cursor) => {
const subscription = connection.subscribe({
events: ['insert', 'update', 'delete']
}, (changes) => {
const { inserted, updated, deleted } = changes;

if (inserted.length) {
console.log(`\n🆕 ${inserted.length} new user(s) added:`);
inserted.forEach(user => {
console.log(` + ${user.data.Name} (${user.data.Email})`);
});
}

if (updated.length) {
console.log(`\n✏️ ${updated.length} user(s) updated:`);
updated.forEach(user => {
console.log(` ~ ${user.data.Name} (${user.data.Email})`);
});
}

if (deleted.length) {
console.log(`\n🗑️ ${deleted.length} user(s) deleted`);
}

Set `type` to `delete` and specify a where clause. This will query the data source and delete any matching entries.
// Refresh current page to show changes
refreshCurrentPage(cursor);
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Maintain updated cursor state in subscription
Inside the subscription callback, refreshCurrentPage(cursor) returns a new cursor but the original cursor isn’t reassigned. This could lead to stale pagination state.

🤖 Prompt for AI Agents
In docs/API/fliplet-datasources.md around lines 1192 to 1218, the subscription
callback calls refreshCurrentPage(cursor) which returns an updated cursor, but
this new cursor is not assigned back to the original cursor variable. To fix
this, assign the result of refreshCurrentPage(cursor) back to the cursor
variable inside the subscription callback to maintain the updated cursor state
and avoid stale pagination.

@ibroom
Copy link
Contributor Author

ibroom commented Jun 23, 2025

@Arpanexe @debankurghosh2061 can you please review the documention excluding the datasource and operators md files?
@Julie1082 @veljko7 please review the operators and datasource md file and test the code examples

- Optimizing app performance
- Looking for alternatives to custom implementations

### Available Libraries
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ibroom Why are we highlighting only these libraries? There is a whole host of approved 3rd party libraries for e.g. tinymce, highcharts, bootstrap etc

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these libraries are to avoid AI proposing code that can be fulfilled with these libraries. Do you think any are missing?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, why did we not include bootstrap then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, we should. We should also remove lodash.

},

// Navigation with data
goToScreenWithData: async (screenName, data) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be better off giving an example of passing a query with navigate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, please suggest

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

although navigate will have separate documentation so we don't need to cover everything here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested below

};

// Push Notifications
const sendPushNotification = async ({ title, message, userId, data = {} }) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doens't seem correct, you want to be using this JS API for push notifications. https://developers.fliplet.com/API/fliplet-notifications.html#notifications-js-apis

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please suggest an update

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


#### Test Data
```json
// Sample data for "ExampleData" data source
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the format data is stored in the data source. See https://developers.fliplet.com/REST-API/fliplet-datasources.html#run-queries-on-a-data-source

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please suggest an update

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

**Example - App Runtime Code:**
```js
// App initialization code
Fliplet.Hooks.on('flAppReady', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this is a valid hook? Where did this come from?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please suggest an update

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Fliplet.Hooks.on('flAppReady', async () => {
Fliplet().then(async function () {

// APP: User authentication
const handleUserLogin = async (email, password) => {
try {
const user = await Fliplet.User.login({ email, password });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did this come from? We don't usually allow people to login via js api

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove or suggest an update

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

#### User Management
```js
// Login
const user = await Fliplet.User.login({ email: 'user@example.com', password: 'password' });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

});

// Create notification
await Fliplet.Notifications.create({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not correct API, see above comment on notifications

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove or suggest an update

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@Julie1082 Julie1082 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed an update of 'query-operators.md' file. All queries passed the test except '$regex'. All queries that '$regex' failed - always returned all the records from a data source. This has to be investigated by engineers.

Copy link
Contributor

@Julie1082 Julie1082 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove $regex

debankurghosh2061 and others added 3 commits July 9, 2025 16:06
Co-authored-by: Julie Kovalenko <juli27july2005@gmail.com>
Co-authored-by: Julie Kovalenko <juli27july2005@gmail.com>
Co-authored-by: Julie Kovalenko <juli27july2005@gmail.com>
Copy link
Contributor

@debankurghosh2061 debankurghosh2061 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review changes

Comment on lines +188 to +189
await Fliplet.Navigate.screen(screenName, data);
console.log(`Navigated to ${screenName} with data:`, data);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
await Fliplet.Navigate.screen(screenName, data);
console.log(`Navigated to ${screenName} with data:`, data);
await Fliplet.Navigate.screen(screenName, data);
//data can be query parameters that can be passed for e.g. { query: '?foo=bar&baz=qux' }
console.log(`Navigated to ${screenName} with data:`, data);

},

// Navigation with data
goToScreenWithData: async (screenName, data) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested below

Comment on lines +253 to +267
try {
const notification = await Fliplet.Notifications.create({
title: title,
message: message,
userId: userId,
data: data
});

console.log('Push notification sent');
return notification;
} catch (error) {
console.error('Push notification failed:', error.message);
throw error;
}
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
try {
const notification = await Fliplet.Notifications.create({
title: title,
message: message,
userId: userId,
data: data
});
console.log('Push notification sent');
return notification;
} catch (error) {
console.error('Push notification failed:', error.message);
throw error;
}
};
try {
var instance = Fliplet.Notifications.init({});
instance.insert({
data: {
title: 'Greetings',
message: 'Hi John!'
},
// Also send a push notification
pushNotification: {
payload: {
title: 'Title of the push notification',
body: 'Message of the push notification',
// Optionally set the notification badge number to a fixed number.
// Omit this property to have the system automatically increment the
// badge count for each user and device receiving the push notification.
badge: 1,
sound: 'default',
custom: {
// Add a link to the push notification
customData: {
action: 'screen',
page: 123,
query: '?weather=sunny'
}
}
},
// optionally schedule the push notification
// to be sent in 30 minutes
delayUntilTimestamp: moment().add(30, 'minute').unix()
},
// Optional scope: use a filter based on the connected Data Source
// from your contacts (if your app has a login component)
scope: {
Email: 'john@example.org'
}
})
console.log('Push notification sent');
return notification;
} catch (error) {
console.error('Push notification failed:', error.message);
throw error;
}
};

Comment on lines +105 to +116
[
{
"Name": "John Smith",
"Email": "john@example.com",
"Status": "Active"
},
{
"Name": "Jane Doe",
"Email": "jane@example.com",
"Status": "Active"
}
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[
{
"Name": "John Smith",
"Email": "john@example.com",
"Status": "Active"
},
{
"Name": "Jane Doe",
"Email": "jane@example.com",
"Status": "Active"
}
]
[
{
"id": 1958,
"data": {
"email": "john.doe@example.org",
"last-name": "Doe",
"first-name": "John"
},
"createdAt": "2016-11-15T12:47:56.700Z",
"updatedAt": "2016-11-15T12:47:58.840Z",
"dataSourceId": 5
},
{
"id": 1959,
"data": {
"email": "jane.doe@example.org",
"last-name": "Doe",
"first-name": "Jane"
},
"createdAt": "2016-11-17T12:47:56.700Z",
"updatedAt": "2016-11-17T12:47:58.840Z",
"dataSourceId": 5
}
]


#### Test Data
```json
// Sample data for "ExampleData" data source
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

#### User Management
```js
// Login
const user = await Fliplet.User.login({ email: 'user@example.com', password: 'password' });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

// APP: User authentication
const handleUserLogin = async (email, password) => {
try {
const user = await Fliplet.User.login({ email, password });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

});

// Create notification
await Fliplet.Notifications.create({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Co-authored-by: Julie Kovalenko <juli27july2005@gmail.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

♻️ Duplicate comments (1)
docs/API/datasources/query-operators.md (1)

91-103: Re-visit $regex section – operator reportedly not functional

A previous reviewer (Julie1082) highlighted that $regex currently returns all records and suggested removing the operator from docs until fixed. The description/examples are still present here without any caveat.

Please either:

  1. Confirm and document the current limitations, or
  2. Remove the section to avoid misleading developers.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d69708b and 7b955e2.

📒 Files selected for processing (1)
  • docs/API/datasources/query-operators.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/API/datasources/query-operators.md

[typographical] ~191-~191: Do not use a colon (:) before a series that is introduced by a preposition (‘from’). Remove the colon or add a noun or a noun phrase after the preposition.
Context: ... | Numeric range (inclusive) | Object | { column: 'Age', condition: 'between', value: { from: 18, to: 65 } } | | oneof | Value in ...

(RP_COLON)


[typographical] ~201-~201: Do not use a colon (:) before a series that is introduced by a preposition (‘from’). Remove the colon or add a noun or a noun phrase after the preposition.
Context: ...| datebetween | Date range | Object | `{ column: 'EventDate', condition: 'datebetween', from: { value: '2024-01-01' }, to: { value: '...

(RP_COLON)

🪛 markdownlint-cli2 (0.17.2)
docs/API/datasources/query-operators.md

299-299: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


302-302: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


305-305: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


310-310: Ordered list item prefix
Expected: 1; Actual: 2; Style: 1/1/1

(MD029, ol-prefix)


311-311: Ordered list item prefix
Expected: 1; Actual: 3; Style: 1/1/1

(MD029, ol-prefix)


312-312: Ordered list item prefix
Expected: 1; Actual: 4; Style: 1/1/1

(MD029, ol-prefix)


383-383: Trailing spaces
Expected: 0; Actual: 1

(MD009, no-trailing-spaces)


383-383: Files should end with a single newline character

(MD047, single-trailing-newline)

Comment on lines +382 to +383
[Back to Data Sources Documentation](../fliplet-datasources.md)
{: .buttons} No newline at end of file
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Trim trailing space and ensure single newline at EOF

There is a stray space on line 383 and no final newline (MD009/MD047).

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

383-383: Trailing spaces
Expected: 0; Actual: 1

(MD009, no-trailing-spaces)


383-383: Files should end with a single newline character

(MD047, single-trailing-newline)

🤖 Prompt for AI Agents
In docs/API/datasources/query-operators.md at lines 382 to 383, remove the
trailing space at the end of line 383 and add a single newline character at the
end of the file to comply with markdown linting rules MD009 and MD047.

Comment on lines +309 to +313
1. **Use $filters for complex conditions** - Better performance than equivalent MongoDB operators
2. **Prefer optimized operators** - Use `$gte` instead of `$not: { $lt: value }`
3. **Index-friendly queries** - Simple equality and range queries perform best
4. **Combine efficiently** - Use `$and` for multiple conditions on different fields

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Reset ordered-list numbering

Items “1.”, “2.”, “3.”, “4.” all render as “2.”, “3.”, “4.” because there is an extra space before each digit (MD029).

-1. **Use $filters for complex conditions**
-2. **Prefer optimised operators**
-3. **Index-friendly queries**
-4. **Combine efficiently**
+1. **Use `$filters` for complex conditions**
+2. **Prefer optimised operators**
+3. **Index-friendly queries**
+4. **Combine efficiently**

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

310-310: Ordered list item prefix
Expected: 1; Actual: 2; Style: 1/1/1

(MD029, ol-prefix)


311-311: Ordered list item prefix
Expected: 1; Actual: 3; Style: 1/1/1

(MD029, ol-prefix)


312-312: Ordered list item prefix
Expected: 1; Actual: 4; Style: 1/1/1

(MD029, ol-prefix)

🤖 Prompt for AI Agents
In docs/API/datasources/query-operators.md around lines 309 to 313, the ordered
list items have an extra space before each digit causing incorrect numbering
rendering. Remove the extra space before the digits in the list items so that
the markdown renders the numbering correctly as 1., 2., 3., 4. without
duplication or skipping.

Comment on lines +298 to +307
**MongoDB-style (optimized):**
- `$or`, `$and`, `$gte`, `$lte`, `$gt`, `$lt`, `$eq`, `$in`

**Fliplet $filters (optimized):**
- `==`, `contains` (especially optimized)

**Optimized Value Types:**
- Strings and numbers perform better than complex objects

### Best Practices
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Fix markdown bullet-point indentation

The unordered list under “Optimized Operators” is flush-left. markdownlint (MD007) flags this; it also breaks GitHub’s default styling.

-**MongoDB-style (optimized):**
-- `$or`, `$and`, `$gte`, `$lte`, `$gt`, `$lt`, `$eq`, `$in`
-
-**Fliplet $filters (optimized):**
-- `==`, `contains` (especially optimized)
-
-**Optimized Value Types:**
-- Strings and numbers perform better than complex objects
+**MongoDB-style (optimized):**
+  - `$or`, `$and`, `$gte`, `$lte`, `$gt`, `$lt`, `$eq`, `$in`
+
+**Fliplet `$filters` (optimized):**
+  - `==`, `contains` (especially optimised)
+
+**Optimised value types:**
+  - Strings and numbers perform better than complex objects
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**MongoDB-style (optimized):**
- `$or`, `$and`, `$gte`, `$lte`, `$gt`, `$lt`, `$eq`, `$in`
**Fliplet $filters (optimized):**
- `==`, `contains` (especially optimized)
**Optimized Value Types:**
- Strings and numbers perform better than complex objects
### Best Practices
**MongoDB-style (optimized):**
- `$or`, `$and`, `$gte`, `$lte`, `$gt`, `$lt`, `$eq`, `$in`
**Fliplet `$filters` (optimized):**
- `==`, `contains` (especially optimised)
**Optimised value types:**
- Strings and numbers perform better than complex objects
### Best Practices
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

299-299: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


302-302: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)


305-305: Unordered list indentation
Expected: 2; Actual: 0

(MD007, ul-indent)

🤖 Prompt for AI Agents
In docs/API/datasources/query-operators.md around lines 298 to 307, the bullet
points under "Optimized Operators" are not properly indented, causing
markdownlint (MD007) warnings and breaking GitHub's default styling. Fix this by
indenting the nested bullet points consistently, typically by two spaces or one
tab, so the list hierarchy is clear and visually correct in markdown.

@ibroom
Copy link
Contributor Author

ibroom commented Jul 18, 2025

@Arpanexe can you please review and deploy?

Copy link
Contributor

@Arpanexe Arpanexe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Arpanexe Arpanexe self-requested a review July 21, 2025 08:34
- Screen: "TestScreen" (if navigation examples)

#### Complete Example
```js
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ibroom @debankurghosh2061 Code format Syntax is incorrect.

@Arpanexe
Copy link
Contributor

@ibroom @debankurghosh2061 We should add link to below pages:

  1. docs/code-api-patterns.md
  2. docs/coding-standards.md
  3. docs/javascript-coding-standards.md

These pages are not linked so user cannot navigate to it from the site. Additionally we should add these pages in sitemap.xml as well.

Copy link
Contributor

@debankurghosh2061 debankurghosh2061 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Arpanexe Arpanexe merged commit cd2225b into master Aug 26, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants