Repository navigation
Postgres Self-hosting Dashboard Demo - #26
Merged
Merged
Conversation
yoen-velt
force-pushed
the
self-hosting-postgres
branch
from
December 19, 2025 20:39
4ea2536 to
0395153
Compare
|
|
||
| // [Velt] API key and auth token from environment variables | ||
| const NEXT_PUBLIC_VELT_API_KEY = "6xTcUFtlYAlCdh11zrKB"; | ||
| const VELT_AUTH_TOKEN = "bd4d5226050470b6c658054fcdf1092a"; |
There was a problem hiding this comment.
Bug: Hardcoded authentication token exposed in source code
The VELT_AUTH_TOKEN secret is hardcoded directly in the source code despite the comment claiming these values come from environment variables. This authentication token grants access to the Velt API and should never be committed to version control. The DATABASE_URL in store.ts correctly uses process.env, but these Velt credentials do not. This exposes the token to anyone with repository access and will persist in git history.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Type of Change
Monorepo Structure Checklist
If adding a new demo, ensure you've followed the 5-level structure:
apps/<framework>/<document>/<type>/<implementation>/<library-or-solution>/<demo>/package.jsonwith scoped name:@apps/<framework>-<document>-<library-or-solution>-<demo>pnpm --filter <package-name> buildpnpm --filter <package-name> devDeployment Checklist
If this demo should be deployed:
Testing
pnpm -w install && pnpm -w buildDocumentation
master-sample-app(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
Structure Verification
The demo follows the 5-level hierarchy:
Documentation: See README_MONOREPO.md and docs/structure.md for more details on the monorepo structure.
Note
Introduces a Next.js Postgres-backed self-hosting dashboard demo with Velt comments and updates the Mongo demo’s document ID handling and error responses.
apps/react/comments/dashboard/self-hosting/dashboard-postgres-demoVeltProvider,VeltComments,VeltCommentsSidebar, presence/tools) with custom UI (jobs table, detail modal, inline comments, sidebar, notifications).useCurrentDocument).app/api/velt/comments/{get,save,delete}/route.ts: fetch, upsert, and delete comment annotations.app/api/velt/comments/store.ts: PostgreSQL store with pool, table/init + indexes,getComments,saveComments(transactional upsert),deleteComment.app/api/velt/token/route.ts: token proxy endpoint for Velt auth.app/document/DocumentContext.tsx.VeltCommentDataProvidererror handling to return failures on non-OK/exception.Written by Cursor Bugbot for commit 356df05. This will update automatically on new commits. Configure here.