stack/apps/backend/src
BilalG1 99c69b9c2f
encrypt neon connection strings, update connections route (#879)
<!--

Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md

-->

<!-- ELLIPSIS_HIDDEN -->


----

> [!IMPORTANT]
> Add secure Neon connection string handling and update connection
routes with new APIs and tests.
> 
>   - **Features**:
> - Add Neon integration APIs in `route.tsx` for project provisioning
and branch connection string registration.
> - Securely store Neon connection strings in a data vault in
`prisma-client.tsx` and `seed.ts`.
>     - Automatically run migrations on provision/update in `route.tsx`.
>   - **Refactor**:
> - Change schema resolution to asynchronous in `crud.tsx` and
`metrics/route.tsx`.
>   - **Chores**:
> - Add backend environment variables for various services in
`package.json`.
> - Add new backend dependency `@stackframe/stack` in `package.json`.
>   - **Tests**:
> - Add end-to-end tests for Neon provisioning and updates in
`provision.test.ts`.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=stack-auth%2Fstack-auth&utm_source=github&utm_medium=referral)<sup>
for 4cd96a74ff. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>

----


<!-- ELLIPSIS_HIDDEN -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- New Features
- Added Neon integration APIs to provision projects and register branch
connection strings.
- Securely store Neon connection strings in the data vault and run
migrations automatically on provision/update.

- Refactor
- Switched schema resolution to asynchronous calls across sessions,
users, and internal metrics for improved reliability.

- Chores
- Introduced comprehensive backend environment variables for auth,
email, storage, webhooks, telemetry, and payments.
  - Added a new backend dependency for stack integration.

- Tests
- Expanded end-to-end coverage for Neon provisioning, updates,
validation, and vault-based decryption.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
2025-09-09 21:35:07 +00:00
..
app encrypt neon connection strings, update connections route (#879) 2025-09-09 21:35:07 +00:00
auto-migrations Add S3 bucket (#816) 2025-08-01 20:30:44 +02:00
lib Include primary email and display name in JWT 2025-09-09 11:06:47 -07:00
oauth Better OAuth error logging 2025-09-08 22:17:33 -07:00
route-handlers Workflows (#873) 2025-09-03 01:22:08 -07:00
utils Workflows (#873) 2025-09-03 01:22:08 -07:00
analytics.tsx Fix event capture 2024-08-14 12:49:35 -07:00
globals.d.ts Split backend and dashboard (#83) 2024-06-18 15:49:31 +02:00
instrumentation.ts Source of Truth (#660) 2025-07-11 17:59:03 -07:00
middleware.tsx Workflows (#873) 2025-09-03 01:22:08 -07:00
polyfills.tsx Fix unhandled promise rejections in rawQuery 2025-04-11 09:59:45 -07:00
prisma-client.tsx encrypt neon connection strings, update connections route (#879) 2025-09-09 21:35:07 +00:00
s3.tsx Project logo upload (#817) 2025-08-19 04:45:16 +02:00
smart-router.tsx Move /api/v1 to /api/latest 2025-02-05 17:24:43 -08:00
stack.tsx encrypt neon connection strings, update connections route (#879) 2025-09-09 21:35:07 +00:00