Commit Graph

121 Commits

Author SHA1 Message Date
BilalG1
3fe82b68b6
Convex implementation (#913)
<!--

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

-->

<!-- ELLIPSIS_HIDDEN -->


----

> [!IMPORTANT]
> Add Convex integration with new auth helpers, update access token
handling, and include documentation, examples, and tests for the new
features.
> 
>   - **Features**:
> - Add Convex integration with new auth helpers for Convex clients and
HTTP in `client-app-impl.ts` and `server-app-impl.ts`.
> - Support for Convex context in user APIs and partial user retrieval.
> - Access tokens now include `is_anonymous` for better anonymous
handling in `tokens.tsx`.
>   - **Documentation**:
> - Add Convex integration guide in `docs/templates/others/convex.mdx`.
> - Update docs navigation in `docs/docs-platform.yml` and
`docs/templates/meta.json`.
>   - **Examples**:
> - Add Convex + Next.js example app in `examples/convex` with auth
wiring, functions, schema, and UI.
>   - **Tests**:
>     - Add E2E tests for Convex auth flows in `convex.test.ts`.
> - Update JWT payload checks in `backend-helpers.ts` and
`anonymous-comprehensive.test.ts`.
>   - **Chores**:
>     - Add Convex dependencies in `package.json` files.
> - Update CI steps for example environments in `e2e-api-tests.yaml` and
`e2e-source-of-truth-api-tests.yaml`.
> 
> <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 aa0983a8b7. 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**
- Convex integration: auth helpers for Convex clients/HTTP, Convex-aware
user APIs, and partial-user retrieval (token/convex).
- Access tokens now surface is_anonymous for clearer anonymous handling.

- **Documentation**
  - Added Convex integration guide and nav entries.

- **Examples**
- New Convex + Next.js example app with auth wiring, backend functions,
schema, and UI.

- **Tests**
  - Added E2E tests covering Convex auth flows and JWT payload checks.

- **Chores**
  - Added Convex deps, CI env steps, and workspace/test config updates.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Konstantin Wohlwend <n2d4xc@gmail.com>
2025-09-24 19:16:45 +00:00
Konstantin Wohlwend
f22e1d6996 Update review assigner script 2025-09-10 12:05:04 -07:00
Konstantin Wohlwend
4148a4ab2d Automatic review assignment 2025-09-10 10:50:35 -07:00
Armin Stepanyan
a77d50c145
Clarifying Recurse ML Naming Rules (#872)
I've noticed `naming.mdc` has been responsible for a lot of false
positives in your PRs. This PR takes a stab at improving it.
<!-- ELLIPSIS_HIDDEN -->
2025-09-02 09:31:14 -07:00
Konstantin Wohlwend
3ab5aa5c94 Only run E2E repeats on main/dev branches
Some checks failed
all-good: Did all the other checks pass? / all-good (push) Has been cancelled
Ensure Prisma migrations are in sync with the schema / check_prisma_migrations (22.x) (push) Has been cancelled
Docker Emulator Test / docker (push) Has been cancelled
Docker Server Build and Push / Docker Build and Push Server (push) Has been cancelled
Docker Server Test / docker (push) Has been cancelled
Runs E2E API Tests / build (22.x) (push) Has been cancelled
Runs E2E API Tests with external source of truth / build (22.x) (push) Has been cancelled
Lint & build / lint_and_build (latest) (push) Has been cancelled
Dev Environment Test / restart-dev-and-test (push) Has been cancelled
Run setup tests / setup-tests (push) Has been cancelled
TOC Generator / TOC Generator (push) Has been cancelled
2025-08-25 22:33:33 -07:00
Konstantin Wohlwend
c8c12f8ef2 Update sync-main-to-dev script 2025-08-25 14:09:27 -07:00
Konstantin Wohlwend
fba89196fb Sync main commits back to dev 2025-08-25 12:00:26 -07:00
Konsti Wohlwend
ae620bb1bf
Wildcard domains (#830) 2025-08-19 22:59:21 -07:00
Konstantin Wohlwend
92a39dd6da Various small fixes 2025-08-19 18:16:08 -07:00
BilalG1
249271b22d
Payment dogfooding (#847)
https://www.loom.com/share/642ec83442594512817f571e7e96514c?sid=42b82e19-bca3-488a-9257-8dbad1a26e29
2025-08-19 15:47:10 -07:00
Konsti Wohlwend
acd03b7af5
Add Claude Code GitHub Workflow (#833)
## 🤖 Installing Claude Code GitHub App

This PR adds a GitHub Actions workflow that enables Claude Code
integration in our repository.

### What is Claude Code?

[Claude Code](https://claude.ai/code) is an AI coding agent that can
help with:
- Bug fixes and improvements  
- Documentation updates
- Implementing new features
- Code reviews and suggestions
- Writing tests
- And more!

### How it works

Once this PR is merged, we'll be able to interact with Claude by
mentioning @claude in a pull request or issue comment.
Once the workflow is triggered, Claude will analyze the comment and
surrounding context, and execute on the request in a GitHub action.

### Important Notes

- **This workflow won't take effect until this PR is merged**
- **@claude mentions won't work until after the merge is complete**
- The workflow runs automatically whenever Claude is mentioned in PR or
issue comments
- Claude gets access to the entire PR or issue context including files,
diffs, and previous comments

### Security

- Our Anthropic API key is securely stored as a GitHub Actions secret
- Only users with write access to the repository can trigger the
workflow
- All Claude runs are stored in the GitHub Actions run history
- Claude's default tools are limited to reading/writing files and
interacting with our repo by creating comments, branches, and commits.
- We can add more allowed tools by adding them to the workflow file
like:

```
allowed_tools: Bash(npm install),Bash(npm run build),Bash(npm run lint),Bash(npm run test)
```

There's more information in the [Claude Code action
repo](https://github.com/anthropics/claude-code-action).

After merging this PR, let's try mentioning @claude in a comment on any
PR to get started!
2025-08-07 18:44:49 -07:00
Zai Shi
a7acab4646
Auto migration (#526)
<!--

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

-->

<!-- ELLIPSIS_HIDDEN -->


----

> [!IMPORTANT]
> Introduces an automated database migration system, replacing manual
Prisma commands with new scripts and updating workflows, configurations,
and tests accordingly.
> 
>   - **Auto-Migration System**:
> - Introduces `db-migrations.ts` script for handling database
migrations automatically.
> - Adds utility functions in `utils.tsx` for managing migration files.
> - Implements `applyMigrations` and `runMigrationNeeded` in `index.tsx`
for executing migrations.
>   - **Workflow and Scripts**:
> - Updates GitHub workflows (`check-prisma-migrations.yaml`,
`e2e-api-tests.yaml`) to use new migration commands.
> - Replaces `prisma migrate` commands with `db:init`, `db:migrate`,
etc., in `package.json` and `README.md`.
>   - **Testing**:
> - Adds `auto-migration.tests.ts` for testing migration logic and
concurrency handling.
>   - **Configuration**:
> - Updates `.env.development` and `vitest.config.ts` for new
environment variables and paths.
> - Modifies `turbo.json` and `package.json` to include new migration
tasks and scripts.
> 
> <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 2c24183879. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>


<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-07-24 02:38:37 +02:00
Konsti Wohlwend
22fe096141
Fix source of truth for custom schemas (#764)
Co-authored-by: Zai Shi <zaishi00@outlook.com>
2025-07-18 11:01:29 -07:00
Armin Stepanyan
bdf8c0e5f9
Add Recurse ML rules for naming and code patterns (#780) 2025-07-18 09:58:23 -07:00
Konsti Wohlwend
a7ef394be4
Source of Truth (#660)
Co-authored-by: Zai Shi <zaishi00@outlook.com>
2025-07-11 17:59:03 -07:00
Konstantin Wohlwend
a00dcb1cb1 Move Docker test actions to Ubicloud 2025-07-08 18:28:34 -07:00
Zai Shi
668ab68ebb Update Docker build workflow to use ubicloud 2025-07-03 14:12:14 -07:00
Konstantin Wohlwend
d96dceb42b Remove Fern GH Actions 2025-06-20 15:34:42 -07:00
Madison
4e467c4026
New docs (#698)
Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
Co-authored-by: Madison Kennedy <madison@Madisons-MacBook-Pro.local>
Co-authored-by: BilalG1 <bg2002@gmail.com>
2025-06-20 13:30:01 -07:00
Konstantin Wohlwend
ab5d33647d Better logging for all-good 2025-06-17 15:11:23 -07:00
Konstantin Wohlwend
2bcbe01ea5 Fix all-good script 2025-06-17 09:28:10 -07:00
Zai Shi
097fbc6e4c
Fix docker (#664)
Some checks failed
all-good: Did all the other checks pass? / all-good (push) Has been cancelled
Ensure Prisma migrations are in sync with the schema / check_prisma_migrations (22.x) (push) Has been cancelled
Docker Emulator Test / docker (push) Has been cancelled
Docker Server Build and Push / Docker Build and Push Server (push) Has been cancelled
Docker Server Test / docker (push) Has been cancelled
Runs E2E API Tests / build (22.x) (push) Has been cancelled
Lint & build / lint_and_build (latest) (push) Has been cancelled
Preview Docs / run (push) Has been cancelled
Dev Environment Test / restart-dev-and-test (push) Has been cancelled
Run setup tests / setup-tests (push) Has been cancelled
TOC Generator / TOC Generator (push) Has been cancelled
<!--

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

-->

<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Enable Docker build by removing fail step and switch from `bcrypt` to
`bcryptjs` for password hashing.
> 
>   - **Docker Workflow**:
> - Removed temporary fail step in
`.github/workflows/docker-server-build.yaml` to enable Docker build
process.
>   - **Dependencies**:
> - Replaced `bcrypt` with `bcryptjs` in `package.json` and `hashes.tsx`
for password hashing.
>     - Updated `@types/bcrypt` to `@types/bcryptjs` in `package.json`.
>   - **Documentation**:
> - Added `docker/README.md` with instructions for building and running
Docker containers for server and emulator.
> 
> <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 c7a3ed9f11. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
2025-05-08 01:31:03 +02:00
Htoo Pyae Lwin
466c891fab
chore: add arm support in docker build (#633)
<!--

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

-->

<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Add ARM support to Docker build in GitHub Actions workflow by
including `linux/arm64` platform.
> 
>   - **GitHub Actions**:
> - Add ARM support to Docker build in
`.github/workflows/docker-server-build.yaml` by including `linux/arm64`
in `platforms` parameter of `docker/build-push-action`.
> 
> <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 10630c432b. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
2025-05-07 02:28:36 +02:00
Konstantin Wohlwend
ead128680d Disable Docker build 2025-04-29 08:57:34 -07:00
Armin Stepanyan
b493a89130
Disable recurse status checks (#618) 2025-04-11 09:15:49 -07:00
Konstantin Wohlwend
1311467c1b Run auto-assign on draft PRs 2025-04-10 10:18:47 -07:00
Konsti Wohlwend
cc3c563c76
Fix auto assign action (#612) 2025-04-07 11:52:39 -07:00
Konstantin Wohlwend
77997b1a1e Auto assign PR creator 2025-04-07 11:43:16 -07:00
Konsti Wohlwend
07be60f054
Port dashboard to Next.js 15 (#560)
<!--

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

-->

<!-- ELLIPSIS_HIDDEN -->


----

> [!IMPORTANT]
> Port dashboard to Next.js 15, update dependencies, and enhance Docker
workflows.
> 
>   - **Next.js 15 Migration**:
> - Update `next` to `15.2.3` in `apps/backend/package.json`,
`apps/dashboard/package.json`, and `examples/demo/package.json`.
>     - Remove MDX support in `next.config.mjs`.
> - Use `turbopack` in `dev` scripts in `apps/dashboard/package.json`
and `examples/demo/package.json`.
>   - **Docker Workflows**:
>     - Add `docker-emulator-test.yaml` for testing Docker emulator.
> - Rename `docker-build.yaml` to `docker-server-build.yaml` and
`docker-test.yaml` to `docker-server-test.yaml`.
>     - Update `docker-compose.yaml` for emulator setup.
>   - **Code Refactoring**:
> - Convert several `Page` components to async functions in
`apps/dashboard/src/app`.
>     - Use `dynamic` import for `react-globe.gl` in `globe.tsx`.
>     - Remove `experimental` config in `next.config.mjs`.
>   - **Dependency Updates**:
> - Update `react` and `react-dom` to `19.0.0` in
`apps/backend/package.json`, `apps/dashboard/package.json`, and
`examples/demo/package.json`.
> - Add `pnpm` overrides for `@types/react` and `@types/react-dom` in
multiple `package.json` files.
>   - **Miscellaneous**:
>     - Add `docker/readme.md` for Docker instructions.
>     - Update `entrypoint.sh` for Docker server setup.
>     - Remove `globals.d.ts` as it's empty.
> 
> <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 5f5d8fd65c. It will automatically
update as commits are pushed.</sup>


<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Zai Shi <zaishi00@outlook.com>
2025-03-24 00:03:50 +01:00
Konstantin Wohlwend
0e05662e4e Increase test workers 2025-03-19 15:13:24 -07:00
Konstantin Wohlwend
2605850f95 Increase Vitest test timeout 2025-03-19 15:12:05 -07:00
Konstantin Wohlwend
217e6da8b6 Verbose test outputs 2025-03-19 14:07:21 -07:00
Konstantin Wohlwend
656bf4c44b chore: update package versions 2025-03-19 12:54:10 -07:00
Konstantin Wohlwend
130c8e648e Fix CI 2025-03-19 09:32:10 -07:00
Konstantin Wohlwend
79668811db Disable file parallelism for dev tests 2025-03-18 13:13:52 -07:00
Zai Shi
fa599792d6 allow outside PR to run fern preview 2025-03-13 09:56:27 -07:00
Konstantin Wohlwend
717cb7e12c Remove PR trigger for Docker push 2025-03-13 09:46:08 -07:00
Konstantin Wohlwend
66c5823349 Run auto-update only once per day 2025-03-12 17:10:03 -07:00
Konstantin Wohlwend
08d7403527 Run auto-update every 6 hours 2025-03-12 17:07:15 -07:00
Konstantin Wohlwend
16704f778c Attempt CI fix 2025-03-12 16:50:55 -07:00
Konstantin Wohlwend
4a52f52721 Fix CI 2025-03-12 14:52:54 -07:00
Konstantin Wohlwend
67dc31687f Fix all-good for PRs 2025-03-12 14:42:12 -07:00
Konstantin Wohlwend
8cc3393110 GH Actions push trigger only on main or dev branches 2025-03-12 10:52:35 -07:00
Konstantin Wohlwend
bd687e8c43 Re-add pull request trigger to GH Actions 2025-03-12 10:43:36 -07:00
Konstantin Wohlwend
7c3c4863ab Fix GitHub Actions concurrency 2025-03-10 14:09:09 -07:00
Konstantin Wohlwend
1f10e26139 Fix GH Actions concurrency 2025-03-10 14:07:59 -07:00
Konstantin Wohlwend
a2dbecb606 Cancel in-progress GitHub Actions on feature branches 2025-03-10 12:14:58 -07:00
Konstantin Wohlwend
7f2a378286 Run E2E tests only once 2025-03-10 12:10:06 -07:00
Konstantin Wohlwend
e5b32013cb Update all-good to understand neutral checks 2025-03-10 12:04:51 -07:00
Konstantin Wohlwend
d24105dd42 Use PAT for auto update 2025-03-07 14:19:08 -08:00