Repository navigation
Local development - #95
Merged
Merged
Conversation
…h database integration with new iconography assets
…nd routing system
…ted footer layout
…tion and authentication guard
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR adds infrastructure and UI to support connector template management (including a new FastAPI connector template) and introduces GitHub App–based automation for creating and propagating connector template updates, alongside several dashboard/UI refinements.
Changes:
- Added a self-hostable FastAPI connector template (Vercel/Docker-ready) under
static-system/my-connector-fastapi. - Introduced GitHub App automation endpoints and services to create repos from templates and propagate template updates to user repos.
- Updated dashboard UI/UX (navigation splash, animated icons, changelog, connector UI) and expanded DB/env handling.
Reviewed changes
Copilot reviewed 85 out of 95 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| temp-test/package.json | Adds a small Node test package for local experimentation. |
| static-system/my-connector/src/test-postgres-concurrency.ts | Removes an ad-hoc Postgres concurrency test script. |
| static-system/my-connector/src/test-mongo-config.ts | Removes an ad-hoc Mongo config test script. |
| static-system/my-connector/src/test-leakage-fix.ts | Removes an ad-hoc routing leakage verification script. |
| static-system/my-connector/mongo-test-results.txt | Removes generated test output from repo. |
| static-system/my-connector-fastapi/vercel.json | Adds Vercel rewrite config for FastAPI serverless entrypoint. |
| static-system/my-connector-fastapi/requirements.txt | Pins FastAPI connector Python dependencies. |
| static-system/my-connector-fastapi/README.md | Documents local run + Vercel deployment for FastAPI connector. |
| static-system/my-connector-fastapi/Dockerfile | Adds Docker build/run support for the FastAPI connector. |
| static-system/my-connector-fastapi/app/routes/rbsc.py | Adds placeholder router module. |
| static-system/my-connector-fastapi/app/routes/rbac.py | Adds placeholder router module. |
| static-system/my-connector-fastapi/app/routes/ingest.py | Implements ingest endpoint with signature validation + transformations. |
| static-system/my-connector-fastapi/app/routes/data.py | Implements data query endpoint with auth. |
| static-system/my-connector-fastapi/app/routes/cdn.py | Adds placeholder CDN upload route. |
| static-system/my-connector-fastapi/app/routes/auth.py | Adds placeholder auth routes. |
| static-system/my-connector-fastapi/app/routes/init.py | Marks routes as a package. |
| static-system/my-connector-fastapi/app/main.py | Creates FastAPI app with routers + CORS. |
| static-system/my-connector-fastapi/app/lib/security.py | Adds signature/JWT verification + timestamp validation. |
| static-system/my-connector-fastapi/app/lib/db/postgres.py | Adds asyncpg-based adapter for inserts/queries/updates/deletes. |
| static-system/my-connector-fastapi/app/lib/db/mongodb.py | Adds Motor-based adapter for inserts/queries/updates/deletes. |
| static-system/my-connector-fastapi/app/lib/db/base.py | Defines shared adapter interface. |
| static-system/my-connector-fastapi/app/lib/db/init.py | Adds adapter selection/cache logic. |
| static-system/my-connector-fastapi/app/lib/config.py | Adds env-prefix helper for connector env var namespacing. |
| static-system/my-connector-fastapi/app/lib/init.py | Marks lib as a package. |
| static-system/my-connector-fastapi/app/init.py | Marks app as a package. |
| static-system/my-connector-fastapi/api/index.py | Adds Vercel serverless entry importing the FastAPI app. |
| static-system/my-connector-fastapi/.gitignore | Ignores Python venv/cache artifacts for the FastAPI template. |
| src/lib/services/TemplateUpdateService.ts | Implements propagation of template-managed files to user repos via GitHub API + DB tracking. |
| src/lib/server-db.ts | Adds POSTPIPE_DB_URI support and connector status mutation helper(s). |
| src/lib/models/GithubApp.ts | Adds Mongoose models for GitHub installations/connectors. |
| src/lib/github/octokit.ts | Adds GitHub App Octokit helpers (installation/app). |
| src/lib/auth/mongodb.ts | Adds POSTPIPE_DB_URI support and updates setup error messaging. |
| src/components/ui/tooltip.tsx | Exposes Radix Portal for tooltip usage. |
| src/components/ui/sidebar-motion.tsx | Wraps sidebar icons for consistent sizing/layout. |
| src/components/ui/rainbow-button.tsx | Updates button styling and theme-related gradients. |
| src/components/ui/plasma-shader.tsx | Adds a WebGL shader background component. |
| src/components/ui/interactive-changelog-with-dialog.tsx | Adds a new v3.0.0 changelog entry. |
| src/components/ui/header-2.tsx | Updates external link from Studio to Kontext. |
| src/components/ui/dialog.tsx | Adjusts close button positioning/z-index. |
| src/components/ui/animated-words.tsx | Replaces scroll-based animation with while-in-view variants. |
| src/components/ui/animated-sidebar-icon.tsx | Adds reusable Lottie hover-play sidebar icon. |
| src/components/ui/animated-edit-icon.tsx | Adds reusable Lottie hover-play edit icon. |
| src/components/rbac/RBACEditModal.tsx | Tightens TS typing around grouped form entries. |
| src/components/layout/navigation-splash.tsx | Adds global navigation splash transition between major sections. |
| src/components/layout/dashboard-shell.tsx | Swaps sidebar icons to Lottie animations; tweaks layout styles. |
| src/components/layout/app-footer.tsx | Updates footer links and layout/typography. |
| src/components/icons/logo.tsx | Replaces small logo SVG with large brand mark SVG. |
| src/components/dashboard/version-update-modal.tsx | Adds a “v3 update” modal gated by localStorage. |
| src/components/dashboard/forms-client.tsx | Adds tooltip portal usage and tab state control + UI refinements. |
| src/components/dashboard/connectors-client.tsx | Adds edit-url dialog and (partially wired) verification-related UI updates. |
| src/app/static/page.tsx | Fetches session + connector count server-side and passes to client page. |
| src/app/layout.tsx | Mounts NavigationSplash in root layout. |
| src/app/globals.css | Adjusts accent/ring color variables for light/dark themes. |
| src/app/docs/connectors/page.tsx | Updates connector template repo URL to official org. |
| src/app/dashboard/layout.tsx | Mounts VersionUpdateModal within dashboard layout. |
| src/app/api/test-env/route.ts | Adds environment inspection endpoint. |
| src/app/api/github/webhooks/route.ts | Adds webhook handler to trigger template propagation on template pushes. |
| src/app/api/github/mass-update/route.ts | Adds protected endpoint to mass-bump dependency versions across connector repos. |
| src/app/api/github/create-repo/route.ts | Adds endpoint to generate a user repo from a template repo via GitHub App install. |
| src/app/api/github/callback/route.ts | Adds GitHub App installation callback handler + DB persistence. |
| src/app/api/admin/test-template-update/route.ts | Adds protected admin endpoint to manually trigger propagation. |
| src/app/actions/register.ts | Adds server action to list user GitHub installations. |
| src/app/actions/dashboard.ts | Adds server actions to update connector URL and mark connector status. |
| scripts/test-split-routing.js | Removes local routing test script. |
| scripts/test-optimized-routing.js | Removes local routing test script. |
| scripts/test-cross-db-routing.js | Removes local routing test script. |
| scripts/test-connector-auth.js | Removes local connector auth test script. |
| scratch_list_all.js | Removes scratch Mongo inspection script. |
| scratch_check_mongo.js | Removes scratch Mongo inspection script. |
| public/riven.svg | Adds Riven brand asset. |
| public/logos/Server.json | Adds Lottie asset for server icon. |
| public/logos/notification-V3.json | Adds Lottie asset for notifications. |
| public/logos/Edit.json | Adds Lottie asset for edit icon. |
| public/logos/backendSystems.json | Adds Lottie asset for backend systems icon. |
| public/logos/alertCircle.json | Adds Lottie asset for alert icon. |
| package.json | Adds Octokit dependencies for GitHub App automation. |
| package-lock.json | Locks Octokit dependency graph. |
| .gitignore | Ignores PyPI recovery codes and .kontext/ folder. |
Files not reviewed (1)
- temp-test/package-lock.json: Generated file
Suppressed comments (2)
static-system/my-connector-fastapi/app/lib/db/postgres.py:105
- json.loads(row["data"]) will raise if asyncpg returns JSONB as a dict (common default). The query path should handle native objects without decoding.
src/components/dashboard/connectors-client.tsx:286 - The status pill always renders the "Verified" label and success icon, even when connector.status is "Not Verified".
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+3
to
+9
| export async function GET() { | ||
| return NextResponse.json({ | ||
| DATABASE_URI: process.env.DATABASE_URI, | ||
| MONGODB_URI: process.env.MONGODB_URI, | ||
| NEW_DATABASE_URI: process.env.NEW_DATABASE_URI | ||
| }); | ||
| } |
Comment on lines
+7
to
+18
| function verifySignature(payload: string, signature: string | null) { | ||
| if (!WEBHOOK_SECRET) { | ||
| console.warn('GITHUB_WEBHOOK_SECRET is not set. Skipping signature verification.'); | ||
| return true; // For testing in environments without secret, but ideally false in prod | ||
| } | ||
| if (!signature) return false; | ||
|
|
||
| const hmac = crypto.createHmac('sha256', WEBHOOK_SECRET); | ||
| const digest = `sha256=${hmac.update(payload).digest('hex')}`; | ||
|
|
||
| return crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(digest)); | ||
| } |
Comment on lines
255
to
+258
| {connectors.map((connector) => { | ||
| const isVerified = connector.status === "Verified"; | ||
| const isVisible = visibleSecrets[connector.id]; | ||
| const accentClass = isVerified ? "bg-emerald-500" : "bg-amber-500"; | ||
| const glowClass = isVerified ? "from-emerald-500/5" : "from-amber-500/5"; | ||
| const accentClass = "bg-emerald-500"; | ||
| const glowClass = "from-emerald-500/5"; |
Comment on lines
+417
to
+425
| const connector = await getConnector(id); | ||
| if (!connector) return { success: false, error: "Connector not found" }; | ||
|
|
||
| try { | ||
| await updateConnectorStatus(id, "Verified", session.userId); | ||
| return { success: true }; | ||
| } catch (e: any) { | ||
| return { success: false, error: `Could not update connector status. Error: ${e.message}` }; | ||
| } |
Comment on lines
+17
to
+19
| const session = await getSession(); | ||
| const userId = session?.userId || '000000000000000000000000'; // Fallback just in case | ||
|
|
Comment on lines
+27
to
+28
| "@octokit/auth-app": "^8.3.0", | ||
| "@octokit/rest": "^22.0.1", |
Comment on lines
+60
to
+65
| def _get_table_name(self, context: Optional[Dict] = None) -> str: | ||
| context = context or {} | ||
| target = context.get("targetDb") or context.get("targetDatabase") | ||
| if target and not target.lower().startswith(("postgres", "pg", "neon")): | ||
| return target.replace("-", "_") | ||
| return "postpipe_submissions" |
| await conn.execute(f""" | ||
| INSERT INTO {table} (form_id, submission_id, timestamp, data) | ||
| VALUES ($1, $2, $3, $4) | ||
| """, submission["formId"], submission["submissionId"], ts_obj, json.dumps(submission.get("data", {}))) |
Comment on lines
+26
to
+30
| # Legacy secret fallback check | ||
| if token == secret: | ||
| return {"role": "admin"} | ||
|
|
||
| raise HTTPException(status_code=403, detail="Forbidden: Invalid Token") |
Comment on lines
+61
to
+65
| except Exception as e: | ||
| import traceback | ||
| traceback.print_exc() | ||
| raise HTTPException(status_code=500, detail=str(e)) | ||
|
|
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.
No description provided.