Skip to content

PageMode Demo (Frontend + Django Backend + MongoDB integration) - #43

Merged
rakesh-snippyly merged 7 commits into
mainfrom
privado-demo
Jan 16, 2026
Merged

rakesh-snippyly merged 7 commits into
mainfrom
privado-demo

Conversation

@yoen-velt

@yoen-velt yoen-velt commented Jan 15, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request

Description

Type of Change

  • New demo application
  • Bug fix
  • Feature enhancement
  • Documentation update
  • Infrastructure/tooling change
  • Other (please describe):

Monorepo Structure Checklist

If adding a new demo, ensure you've followed the 5-level structure:

  • Placed in correct path: apps/<framework>/<document>/<type>/<implementation>/<library-or-solution>/<demo>/
  • Updated package.json with scoped name: @apps/<framework>-<document>-<library-or-solution>-<demo>
  • Created comprehensive README.md in the demo directory
  • Verified build passes: pnpm --filter <package-name> build
  • Verified dev server runs: pnpm --filter <package-name> dev

Deployment Checklist

If this demo should be deployed:

  • Added/updated Vercel project configuration
  • Updated GitHub Actions workflows (if applicable)
  • Verified deployment paths in CI/CD configs

Testing

  • Tested locally with pnpm -w install && pnpm -w build
  • Verified all affected apps still build
  • Tested dev servers for affected apps

Documentation

  • Updated relevant documentation (if needed)
  • Added demo to master-sample-app (if applicable)
  • Updated deployment docs (if applicable)

Related Issues

Screenshots/Videos

Additional Context


For Reviewers

Demo Location

Path: apps/<framework>/<document>/<type>/<implementation>/<library-or-solution>/<demo>/

Package name: @apps/<...>

How to Test

# Install dependencies
pnpm -w install

# Run the specific demo
pnpm --filter @apps/<package-name> dev

# Build the specific demo
pnpm --filter @apps/<package-name> build

Structure Verification

The demo follows the 5-level hierarchy:

  1. Framework:
  2. Document:
  3. Type:
  4. Implementation:
  5. Library/Solution:
  6. Demo:

Documentation: See README_MONOREPO.md and docs/structure.md for more details on the monorepo structure.


Note

Introduces a full-stack self-hosted demo for Page Mode Forms combining Next.js (React) with a Django backend using MongoDB.

  • New demo app under apps/react/self-hosting/forms/page-mode-demo with Velt integration, custom UI, and Tailwind setup
  • Django backend (app/api/velt/backend) exposing comments, reactions, users, attachments, and token endpoints; Next.js token route added
  • Frontend data providers wired to backend (VeltDataProviders.ts) and app-level auth/document initialization
  • Backend restructured (flattened to backend/config and backend/api/handlers) with updated imports and tests location
  • Environment/config and scripts added (.env.local.example, backend .env.example, package.json dev:all/dev:backend, CSP headers, Vercel config)
  • Security/error handling improvements: proper JSON decode handling in token handler; conditional TLS cert skipping only in DEBUG
  • Comprehensive docs: setup, integration, restructure notes, and API usage

Written by Cursor Bugbot for commit bbf30b0. This will update automatically on new commits. Configure here.

@vercel

vercel Bot commented Jan 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
sample-apps-codemirror-non-react-crdt-demo Ready Ready Preview, Comment Jan 16, 2026 0:19am
sample-apps-dashboard-postgres-demo Error Error Jan 16, 2026 0:19am
sample-apps-tanstack-comment-aggregation Building Building Preview, Comment Jan 16, 2026 0:19am
sample-apps-tiptap-non-react-crdt-demo Ready Ready Preview, Comment Jan 16, 2026 0:19am
15 Skipped Deployments
Project Deployment Review Updated (UTC)
master-sample-app Ignored Ignored Preview Jan 16, 2026 0:19am
sample-apps-ag-grid-comment-aggregation Ignored Ignored Preview Jan 16, 2026 0:19am
sample-apps-ag-grid-multiple-tools Ignored Ignored Preview Jan 16, 2026 0:19am
sample-apps-ag-grid-single-tool Ignored Ignored Preview Jan 16, 2026 0:19am
sample-apps-codemirror-crdt-demo Ignored Ignored Preview Jan 16, 2026 0:19am
sample-apps-dashboard-demo Ignored Ignored Preview Jan 16, 2026 0:19am
sample-apps-dashboard-inline-comments-demo Ignored Ignored Preview Jan 16, 2026 0:19am
sample-apps-dashboard-mongo-db-demo Ignored Ignored Preview Jan 16, 2026 0:19am
sample-apps-lexical-comments-demo Ignored Ignored Preview Jan 16, 2026 0:19am
sample-apps-reactflow-demo Ignored Ignored Preview Jan 16, 2026 0:19am
sample-apps-slatejs-comments-demo Ignored Ignored Preview Jan 16, 2026 0:19am
sample-apps-tanstack-multiple-tools Ignored Ignored Preview Jan 16, 2026 0:19am
sample-apps-tanstack-single-tool Ignored Ignored Preview Jan 16, 2026 0:19am
sample-apps-tiptap-comments-demo Ignored Ignored Preview Jan 16, 2026 0:19am
sample-apps-tiptap-crdt-demo Ignored Ignored Preview Jan 16, 2026 0:19am

Review with Vercel Agent

return JsonResponse({
'success': True,
'statusCode': 200
}, status=200)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Delete operations ignore result and report false success

Low Severity

The delete_comment and delete_reaction handlers capture the return value from store.delete_comment() and store.delete_reaction() in a deleted variable but never use it. These store functions return False when no document was found to delete, but the handlers always return success: True regardless. This misleads clients into thinking deletions succeeded when the target item didn't exist.

Additional Locations (1)

Fix in Cursor Fix in Web

try:
data = json.loads(request.body)
user_ids = data.get('userIds', [])
users = db_get_users(user_ids)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing type validation allows incorrect MongoDB query behavior

Medium Severity

The get_users handler retrieves userIds from the request and passes it directly to db_get_users without validating it's actually a list. If a client sends {"userIds": "abc"} (a string instead of an array), MongoDB's $in operator in store.get_users will iterate over the string's characters, matching documents where userId equals 'a', 'b', or 'c'. This returns incorrect results and could expose unintended user data.

Fix in Cursor Fix in Web

@rakesh-snippyly
rakesh-snippyly merged commit bef2ae8 into main Jan 16, 2026
20 of 23 checks passed

This branch had an error being deployed

1 failed and 18 active (16 outdated) deployments
Preview – sample-apps-dashboard-postgres-demo — bbf30b02 Deployed Jan 16, 2026 by vercel[bot]
Preview – sample-apps-codemirror-non-react-crdt-demo — bbf30b02 Deployed Jan 16, 2026 by vercel[bot]
Preview – sample-apps-tiptap-non-react-crdt-demo — bbf30b02 Deployed Jan 16, 2026 by vercel[bot]
Preview – sample-apps-ag-grid-multiple-tools — e1f4b7be Deployed Jan 15, 2026 by vercel[bot]
Preview – sample-apps-ag-grid-comment-aggregation — e1f4b7be Deployed Jan 15, 2026 by vercel[bot]
Preview – sample-apps-codemirror-crdt-demo — e1f4b7be Deployed Jan 15, 2026 by vercel[bot]
Preview – sample-apps-tiptap-comments-demo — e1f4b7be Deployed Jan 15, 2026 by vercel[bot]
Preview – sample-apps-dashboard-mongo-db-demo — e1f4b7be Deployed Jan 15, 2026 by vercel[bot]
Preview – sample-apps-dashboard-demo — e1f4b7be Deployed Jan 15, 2026 by vercel[bot]
Preview – sample-apps-tanstack-comment-aggregation — e1f4b7be Deployed Jan 15, 2026 by vercel[bot]
Preview – sample-apps-slatejs-comments-demo — e1f4b7be Deployed Jan 15, 2026 by vercel[bot]
Preview – sample-apps-ag-grid-single-tool — e1f4b7be Deployed Jan 15, 2026 by vercel[bot]
Preview – sample-apps-reactflow-demo — e1f4b7be Deployed Jan 15, 2026 by vercel[bot]
Preview – sample-apps-tanstack-single-tool — e1f4b7be Deployed Jan 15, 2026 by vercel[bot]
Preview – sample-apps-tiptap-crdt-demo — e1f4b7be Deployed Jan 15, 2026 by vercel[bot]
Preview – sample-apps-lexical-comments-demo — e1f4b7be Deployed Jan 15, 2026 by vercel[bot]
Preview – sample-apps-tanstack-multiple-tools — e1f4b7be Deployed Jan 15, 2026 by vercel[bot]
Preview – master-sample-app — e1f4b7be Deployed Jan 15, 2026 by vercel[bot]
Preview – sample-apps-dashboard-inline-comments-demo — e1f4b7be Deployed Jan 15, 2026 by vercel[bot]
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.

2 participants