Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (13)
📒 Files selected for processing (5)
✅ Files skipped from review due to trivial changes (4)
WalkthroughThis pull request adds 14 new Markdoc blog post pages covering Appwrite features (authentication methods, custom domains, Functions, indexes, magic links, messaging, OAuth, permissions, Query API, Realtime, SDK differences, storage file manager, teams/roles, and webhooks), updates the image-hash cache file (.optimize-cache.json) with new cover image entries, and corrects a single documentation link target in an existing webhooks docs page. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR adds 14 new blog posts covering Appwrite's core features (Auth, Storage, Databases, Functions, Realtime, Webhooks, Messaging, Permissions, Teams, and SDK usage) along with their cover images, and fixes a broken "Learn more about events" link in the webhooks docs page.\n\nThe content is well-written and accurate overall, but three blog posts contain a consistent SDK import bug — Confidence Score: 3/5Safe to merge after fixing three Three independent code snippets use src/routes/blog/post/appwrite-permissions/+page.markdoc, src/routes/blog/post/appwrite-server-sdk-vs-client-sdk/+page.markdoc, src/routes/blog/post/appwrite-teams-roles/+page.markdoc Important Files Changed
|
src/routes/blog/post/appwrite-server-sdk-vs-client-sdk/+page.markdoc
Outdated
Show resolved
Hide resolved
src/routes/blog/post/appwrite-server-sdk-vs-client-sdk/+page.markdoc
Outdated
Show resolved
Hide resolved
src/routes/blog/post/appwrite-storage-file-manager/+page.markdoc
Outdated
Show resolved
Hide resolved
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
…arkdoc Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/routes/blog/post/appwrite-messaging-push-email/`+page.markdoc:
- Around line 84-92: The example calls users.createTarget with providerType set
to sdk.MessagingProviderType.Email, but sdk is undefined; fix by importing or
referencing the messaging enum used by createTarget (e.g., bring in the
MessagingProviderType enum or the SDK namespace) and update the snippet so
providerType uses the imported symbol instead of
sdk.MessagingProviderType.Email; check the surrounding snippet for ID.unique()
and providerId usage and ensure the new import matches those symbols (e.g.,
import MessagingProviderType or import * as sdk) so users.createTarget compiles.
In `@src/routes/blog/post/appwrite-teams-roles/`+page.markdoc:
- Around line 98-102: The file imports Databases from 'appwrite' but then
instantiates an undefined TablesDB, causing a ReferenceError; update the imports
and/or instantiation so they match: either import TablesDB from its module (or
the correct class name) and keep const tablesDB = new TablesDB(client), or
replace new TablesDB(client) with new Databases(client) (and adjust subsequent
calls like tablesDB.createRow to use the correct API), ensuring the identifiers
Databases, TablesDB, client, and createRow are consistent.
- Line 100: The code incorrectly instantiates a non-existent TablesDB class;
replace uses of TablesDB with the correct Appwrite SDK class Databases (e.g.,
change the import/export and the instantiation from new TablesDB(client) to new
Databases(client)) so the variable tablesDB becomes a Databases instance,
keeping the same client argument and leaving other symbols (ID, Permission,
Role) unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 985d705d-150c-4e25-a02a-750a378373a5
⛔ Files ignored due to path filters (14)
static/images/blog/appwrite-auth-methods/cover.pngis excluded by!**/*.pngstatic/images/blog/appwrite-custom-domains/cover.pngis excluded by!**/*.pngstatic/images/blog/appwrite-functions-guide/cover.pngis excluded by!**/*.pngstatic/images/blog/appwrite-indexes/cover.pngis excluded by!**/*.pngstatic/images/blog/appwrite-magic-link/cover.pngis excluded by!**/*.pngstatic/images/blog/appwrite-messaging-push-email/cover.pngis excluded by!**/*.pngstatic/images/blog/appwrite-oauth/cover.pngis excluded by!**/*.pngstatic/images/blog/appwrite-permissions/cover.pngis excluded by!**/*.pngstatic/images/blog/appwrite-query-api/cover.pngis excluded by!**/*.pngstatic/images/blog/appwrite-realtime/cover.pngis excluded by!**/*.pngstatic/images/blog/appwrite-server-sdk-vs-client-sdk/cover.pngis excluded by!**/*.pngstatic/images/blog/appwrite-storage-file-manager/cover.pngis excluded by!**/*.pngstatic/images/blog/appwrite-teams-roles/cover.pngis excluded by!**/*.pngstatic/images/blog/appwrite-webhooks/cover.pngis excluded by!**/*.png
📒 Files selected for processing (16)
.optimize-cache.jsonsrc/routes/blog/post/appwrite-auth-methods/+page.markdocsrc/routes/blog/post/appwrite-custom-domains/+page.markdocsrc/routes/blog/post/appwrite-functions-guide/+page.markdocsrc/routes/blog/post/appwrite-indexes/+page.markdocsrc/routes/blog/post/appwrite-magic-link/+page.markdocsrc/routes/blog/post/appwrite-messaging-push-email/+page.markdocsrc/routes/blog/post/appwrite-oauth/+page.markdocsrc/routes/blog/post/appwrite-permissions/+page.markdocsrc/routes/blog/post/appwrite-query-api/+page.markdocsrc/routes/blog/post/appwrite-realtime/+page.markdocsrc/routes/blog/post/appwrite-server-sdk-vs-client-sdk/+page.markdocsrc/routes/blog/post/appwrite-storage-file-manager/+page.markdocsrc/routes/blog/post/appwrite-teams-roles/+page.markdocsrc/routes/blog/post/appwrite-webhooks/+page.markdocsrc/routes/docs/advanced/platform/webhooks/+page.markdoc
👮 Files not reviewed due to content moderation or server errors (8)
- src/routes/blog/post/appwrite-indexes/+page.markdoc
- src/routes/blog/post/appwrite-query-api/+page.markdoc
- .optimize-cache.json
- src/routes/blog/post/appwrite-storage-file-manager/+page.markdoc
- src/routes/blog/post/appwrite-functions-guide/+page.markdoc
- src/routes/blog/post/appwrite-permissions/+page.markdoc
- src/routes/blog/post/appwrite-server-sdk-vs-client-sdk/+page.markdoc
- src/routes/blog/post/appwrite-oauth/+page.markdoc
| ```js | ||
| const target = await users.createTarget({ | ||
| userId, | ||
| targetId: ID.unique(), | ||
| providerType: sdk.MessagingProviderType.Email, | ||
| identifier: 'user@example.com', | ||
| providerId | ||
| }); | ||
| ``` |
There was a problem hiding this comment.
Undefined reference to sdk in code example.
Line 88 uses sdk.MessagingProviderType.Email, but sdk is not imported or defined in the code snippet:
const target = await users.createTarget({
userId,
targetId: ID.unique(),
providerType: sdk.MessagingProviderType.Email, // ← sdk is undefined
identifier: 'user@example.com',
providerId
});🔧 Proposed fix
Either import the enum directly:
+import { Users, ID, MessagingProviderType } from 'appwrite';
+
const target = await users.createTarget({
userId,
targetId: ID.unique(),
- providerType: sdk.MessagingProviderType.Email,
+ providerType: MessagingProviderType.Email,
identifier: 'user@example.com',
providerId
});Or import as namespace:
+import * as sdk from 'appwrite';
+
const target = await users.createTarget({
// ... sdk.MessagingProviderType.Email works here
});🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/routes/blog/post/appwrite-messaging-push-email/`+page.markdoc around
lines 84 - 92, The example calls users.createTarget with providerType set to
sdk.MessagingProviderType.Email, but sdk is undefined; fix by importing or
referencing the messaging enum used by createTarget (e.g., bring in the
MessagingProviderType enum or the SDK namespace) and update the snippet so
providerType uses the imported symbol instead of
sdk.MessagingProviderType.Email; check the surrounding snippet for ID.unique()
and providerId usage and ensure the new import matches those symbols (e.g.,
import MessagingProviderType or import * as sdk) so users.createTarget compiles.
| ```js | ||
| import { Databases, ID, Permission, Role } from 'appwrite'; | ||
|
|
||
| const tablesDB = new TablesDB(client); |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify the correct database class name in Appwrite SDK
# Search for Databases or TablesDB class exports
rg -n "export.*class (Databases|TablesDB)" --type=ts --type=js
# Search for usage patterns
rg -n "new (Databases|TablesDB)" --type=js --type=ts -C2
# Check SDK documentation
fd -e md -e markdoc . -x rg -l "new Databases" {}Repository: appwrite/website
Length of output: 2238
🏁 Script executed:
#!/bin/bash
# Read the blog post file to see context around line 100
sed -n '90,115p' "src/routes/blog/post/appwrite-teams-roles/+page.markdoc"Repository: appwrite/website
Length of output: 952
🏁 Script executed:
#!/bin/bash
# Check if the blog post imports anything and how it imports
head -30 "src/routes/blog/post/appwrite-teams-roles/+page.markdoc"Repository: appwrite/website
Length of output: 1724
🏁 Script executed:
#!/bin/bash
# Find how other blog posts handle database initialization
rg -n "new Databases|import.*databases" "src/routes/blog/" -A2 -B2Repository: appwrite/website
Length of output: 13433
Fix incorrect class name in database initialization.
Line 100 uses TablesDB, which doesn't exist in the Appwrite SDK:
import { TablesDB, ID, Permission, Role } from 'appwrite';
const tablesDB = new TablesDB(client);Change TablesDB to Databases, which is the correct class exported by the SDK. All other blog posts in the repository consistently use this class name.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/routes/blog/post/appwrite-teams-roles/`+page.markdoc at line 100, The
code incorrectly instantiates a non-existent TablesDB class; replace uses of
TablesDB with the correct Appwrite SDK class Databases (e.g., change the
import/export and the instantiation from new TablesDB(client) to new
Databases(client)) so the variable tablesDB becomes a Databases instance,
keeping the same client argument and leaving other symbols (ID, Permission,
Role) unchanged.
|
|
||
| **Trade-offs:** You take on responsibility for the password reset flow, email verification, and account recovery. Users also have to remember yet another password, which drives adoption of weak credentials. Pairing email/password with MFA significantly mitigates this. | ||
|
|
||
| **Security note:** Appwrite handles the Argon2 hashing, but you still need to enforce HTTPS, rate-limit login attempts, and prompt users to verify their email address after registration. |
There was a problem hiding this comment.
Not sure about this, but do we cover rate limiting after a few failed attempts?
What does this PR do?
(Provide a description of what this PR does.)
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)
Summary by CodeRabbit