Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 1 addition & 26 deletions .github/workflows/npm-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
CHANGESET_FILE=".changeset/update-package-versions-${GITHUB_RUN_ID}.md"
cat > "$CHANGESET_FILE" <<'EOF'
---
"@stackframe/stack": patch
"@hexclave/next": patch
---

Update package versions.
Expand All @@ -89,28 +89,3 @@ jobs:
git commit -m "chore: update package versions"
git push origin dev

# Hexclave rebrand mirror publish (Tier 2). Each publishable `@stackframe/*`
# package is re-published as `@hexclave/*` with all cross-deps pinned to one
# shared `@hexclave` version. Built artifacts (`dist/`) are also rewritten by
# the script so cross-package require()/import specifiers + the build-time
# package-version sentinel point at `@hexclave/*` instead of `@stackframe/*`.
#
# Hardcoded to 1.0.0 — `pnpm publish` skips versions already on npm, so
# after the first successful run on main this becomes a no-op. PR 3 in
# the rebrand sequence renames the source packages natively to
# `@hexclave/*` and deletes this entire mirror flow; until then, 1.0.0
# is the one-shot cutover version.
#
# Runs AFTER `Update package versions on dev` because that step asserts a
# clean working tree (`git diff --exit-code HEAD`); the rewrite below
# mutates package.json files in-place and would trip that assertion.
- name: Checkout main for Hexclave mirror rewrite
run: git checkout main

- name: Rewrite package names to @hexclave/*
run: pnpm tsx scripts/rewrite-packages-to-hexclave.ts --version=1.0.0

- name: Publish @hexclave/* mirror packages
run: pnpm publish -r --no-git-checks --access public
env:
NPM_CONFIG_PROVENANCE: true
12 changes: 6 additions & 6 deletions .github/workflows/qemu-emulator-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ jobs:
if: matrix.arch == 'amd64'
run: |
# Turbo's task graph for stack-cli#build includes
# @stackframe/dashboard#build:rde-standalone, which transitively
# depends on @stackframe/stack#build (via dashboard → stack).
# @hexclave/dashboard#build:rde-standalone, which transitively
# depends on @hexclave/next#build (via dashboard → stack).
# The pnpm filter must cover the dashboard dep tree too so that
# devDependencies like tailwindcss are installed for the build.
pnpm install --frozen-lockfile --filter '@stackframe/stack-cli...' --filter '@stackframe/dashboard...'
pnpm exec turbo run build --filter='@stackframe/stack-cli...'
pnpm install --frozen-lockfile --filter '@hexclave/cli...' --filter '@hexclave/dashboard...'
pnpm exec turbo run build --filter='@hexclave/cli...'

- name: Start emulator and verify
if: matrix.arch == 'amd64'
Expand Down Expand Up @@ -270,8 +270,8 @@ jobs:
- name: Install stack-cli deps + build
run: |
# See "Build stack-cli" step comment for why dashboard filter is needed
pnpm install --frozen-lockfile --filter '@stackframe/stack-cli...' --filter '@stackframe/dashboard...'
pnpm exec turbo run build --filter='@stackframe/stack-cli...'
pnpm install --frozen-lockfile --filter '@hexclave/cli...' --filter '@hexclave/dashboard...'
pnpm exec turbo run build --filter='@hexclave/cli...'

- name: Download built image
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Stack Logo](/.github/assets/logo.png)](https://hexclave.com)
[![Hexclave Logo](/.github/assets/logo.png)](https://hexclave.com)

<h3 align="center">
<a href="https://docs.hexclave.com">📘 Docs</a>
Expand All @@ -13,7 +13,7 @@ Hexclave is a managed user authentication solution. It is developer-friendly and

Hexclave gets you started in just five minutes, after which you'll be ready to use all of its features as you grow your project. Our managed service is completely optional and you can export your user data and self-host, for free, at any time.

We support Next.js, React, and JavaScript frontends, along with any backend that can use our [REST API](https://docs.hexclave.com/api/overview). Check out our [setup guide](https://docs.hexclave.com/docs/next/getting-started/setup) to get started.
We support Next.js, React, and JavaScript frontends, along with any backend that can use our [REST API](https://docs.hexclave.com/api/overview). Check out our [setup guide](https://docs.hexclave.com/getting-started/setup) to get started.

<div align="center">
<img alt="Hexclave Setup" src=".github/assets/create-project.gif" width="400" />
Expand Down Expand Up @@ -140,7 +140,7 @@ pnpm test # useful: --no-watch (disables watch mode) and --bail 1 (stops after t

You can now open the dev launchpad at [http://localhost:8100](http://localhost:8100). From there, you can navigate to the dashboard at [http://localhost:8101](http://localhost:8101), API on port 8102, demo on port 8103, docs on port 8104, Inbucket (e-mails) on port 8105, and Prisma Studio on port 8106. See the dev launchpad for a list of all running services.

Your IDE may show an error on all `@stackframe/XYZ` imports. To fix this, simply restart the TypeScript language server; for example, in VSCode you can open the command palette (Ctrl+Shift+P) and run `Developer: Reload Window` or `TypeScript: Restart TS server`.
Your IDE may show an error on all `@hexclave/XYZ` imports. To fix this, simply restart the TypeScript language server; for example, in VSCode you can open the command palette (Ctrl+Shift+P) and run `Developer: Reload Window` or `TypeScript: Restart TS server`.

Pre-populated .env files for the setup below are available and used by default in `.env.development` in each of the packages. However, if you're creating a production build (eg. with `pnpm run build`), you must supply the environment variables manually (see below).

Expand Down Expand Up @@ -192,5 +192,5 @@ Note: When working with AI, you should keep a terminal tab with the dev server o
## ❤ Contributors

<a href="https://github.com/hexclave/hexclave/graphs/contributors">
<img src="https://contrib.rocks/image?repo=stack-auth/stack&columns=9" width="100%" />
<img src="https://contrib.rocks/image?repo=hexclave/hexclave&columns=9" width="100%" />
</a>
6 changes: 3 additions & 3 deletions apps/backend/instrumentation-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import * as Sentry from "@sentry/nextjs";
import { getBrowserCompatibilityReport } from "@stackframe/stack-shared/dist/utils/browser-compat";
import { sentryBaseConfig } from "@stackframe/stack-shared/dist/utils/sentry";
import { nicify } from "@stackframe/stack-shared/dist/utils/strings";
import { getBrowserCompatibilityReport } from "@hexclave/shared/dist/utils/browser-compat";
import { sentryBaseConfig } from "@hexclave/shared/dist/utils/sentry";
import { nicify } from "@hexclave/shared/dist/utils/strings";

Sentry.init({
...sentryBaseConfig,
Expand Down
8 changes: 4 additions & 4 deletions apps/backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stackframe/backend",
"version": "2.8.103",
"name": "@hexclave/backend",
"version": "1.0.0",
"repository": "https://github.com/hexclave/hexclave",
"private": true,
"type": "module",
Expand Down Expand Up @@ -85,8 +85,8 @@
"@react-email/render": "^1.2.1",
"@sentry/nextjs": "^10.45.0",
"@simplewebauthn/server": "^13.3.0",
"@stackframe/stack": "workspace:*",
"@stackframe/stack-shared": "workspace:*",
"@hexclave/next": "workspace:*",
"@hexclave/shared": "workspace:*",
"@upstash/qstash": "^2.8.2",
"@vercel/functions": "^2.0.0",
"@vercel/otel": "^1.10.4",
Expand Down
14 changes: 7 additions & 7 deletions apps/backend/prisma/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ import { createOrUpdateProjectWithLegacyConfig, getProject } from '@/lib/project
import { seedDummyProject } from '@/lib/seed-dummy-data';
import { DEFAULT_BRANCH_ID, getSoleTenancyFromProjectBranch } from '@/lib/tenancies';
import { getPrismaClientForTenancy, globalPrismaClient } from '@/prisma-client';
import { ALL_APPS } from '@stackframe/stack-shared/dist/apps/apps-config';
import { DEFAULT_EMAIL_THEME_ID } from '@stackframe/stack-shared/dist/helpers/emails';
import { AdminUserProjectsCrud } from '@stackframe/stack-shared/dist/interface/crud/projects';
import { ITEM_IDS, PLAN_LIMITS } from '@stackframe/stack-shared/dist/plans';
import { DayInterval } from '@stackframe/stack-shared/dist/utils/dates';
import { throwErr } from '@stackframe/stack-shared/dist/utils/errors';
import { typedEntries, typedFromEntries } from '@stackframe/stack-shared/dist/utils/objects';
import { ALL_APPS } from '@hexclave/shared/dist/apps/apps-config';
import { DEFAULT_EMAIL_THEME_ID } from '@hexclave/shared/dist/helpers/emails';
import { AdminUserProjectsCrud } from '@hexclave/shared/dist/interface/crud/projects';
import { ITEM_IDS, PLAN_LIMITS } from '@hexclave/shared/dist/plans';
import { DayInterval } from '@hexclave/shared/dist/utils/dates';
import { throwErr } from '@hexclave/shared/dist/utils/errors';
import { typedEntries, typedFromEntries } from '@hexclave/shared/dist/utils/objects';

const MONTHLY_REPEAT: DayInterval = [1, "month"];

Expand Down
4 changes: 2 additions & 2 deletions apps/backend/scripts/backfill-internal-free-plans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import { ensureFreePlanForBillingTeam } from "@/lib/payments/ensure-free-plan";
// eslint-disable-next-line @typescript-eslint/no-deprecated -- idiomatic way to get the internal tenancy today (see plan-entitlements.ts)
import { DEFAULT_BRANCH_ID, getSoleTenancyFromProjectBranch, type Tenancy } from "@/lib/tenancies";
import { globalPrismaClient } from "@/prisma-client";
import { HexclaveAssertionError } from "@stackframe/stack-shared/dist/utils/errors";
import { getOrUndefined } from "@stackframe/stack-shared/dist/utils/objects";
import { HexclaveAssertionError } from "@hexclave/shared/dist/utils/errors";
import { getOrUndefined } from "@hexclave/shared/dist/utils/objects";

// Page size for streaming teams. Big enough to amortise round-trips,
// small enough to stay tiny in memory (~18KB per page).
Expand Down
4 changes: 2 additions & 2 deletions apps/backend/scripts/benchmark-internal-metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* Seeds synthetic events under a unique project_id so real data is never
* touched; cleans up via ALTER TABLE ... DELETE on exit.
*
* Run: pnpm --filter @stackframe/backend run with-env:dev tsx scripts/benchmark-internal-metrics.ts
* Run: pnpm --filter @hexclave/backend run with-env:dev tsx scripts/benchmark-internal-metrics.ts
* Env knobs:
* BENCH_USERS (default 200_000) – distinct users in the perf seed
* BENCH_EVENTS_USER (default 5) – $token-refresh events per user
Expand All @@ -49,7 +49,7 @@
*/

import { getClickhouseAdminClient, getClickhouseAdminClientForMetrics } from "@/lib/clickhouse";
import { getEnvVariable } from "@stackframe/stack-shared/dist/utils/env";
import { getEnvVariable } from "@hexclave/shared/dist/utils/env";
import { randomUUID } from "node:crypto";

const RUN_ID = randomUUID();
Expand Down
2 changes: 1 addition & 1 deletion apps/backend/scripts/clickhouse-migrations.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getClickhouseAdminClient } from "@/lib/clickhouse";
import { getEnvVariable } from "@stackframe/stack-shared/dist/utils/env";
import { getEnvVariable } from "@hexclave/shared/dist/utils/env";

export async function runClickhouseMigrations() {
const start = performance.now();
Expand Down
2 changes: 1 addition & 1 deletion apps/backend/scripts/generate-migration-imports.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { writeFileSyncIfChanged } from '@stackframe/stack-shared/dist/utils/fs';
import { writeFileSyncIfChanged } from '@hexclave/shared/dist/utils/fs';
import fs from 'fs';
import path from 'path';
import { MIGRATION_FILES_DIR, getMigrationFiles } from '../src/auto-migrations/utils';
Expand Down
10 changes: 5 additions & 5 deletions apps/backend/scripts/generate-openapi-fumadocs.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { parseOpenAPI, parseWebhookOpenAPI } from '@/lib/openapi';
import { isSmartRouteHandler } from '@/route-handlers/smart-route-handler';
import { webhookEvents } from '@stackframe/stack-shared/dist/interface/webhooks';
import { writeFileSyncIfChanged } from '@stackframe/stack-shared/dist/utils/fs';
import { HTTP_METHODS } from '@stackframe/stack-shared/dist/utils/http';
import { typedKeys } from '@stackframe/stack-shared/dist/utils/objects';
import { stringCompare } from '@stackframe/stack-shared/dist/utils/strings';
import { webhookEvents } from '@hexclave/shared/dist/interface/webhooks';
import { writeFileSyncIfChanged } from '@hexclave/shared/dist/utils/fs';
import { HTTP_METHODS } from '@hexclave/shared/dist/utils/http';
import { typedKeys } from '@hexclave/shared/dist/utils/objects';
import { stringCompare } from '@hexclave/shared/dist/utils/strings';
import fs from 'fs';
import { glob } from 'glob';
import path from 'path';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deindent } from "@stackframe/stack-shared/dist/utils/strings";
import { deindent } from "@hexclave/shared/dist/utils/strings";
import fs from "node:fs";
import path from "node:path";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import { getStripeForAccount } from "@/lib/stripe";
// eslint-disable-next-line @typescript-eslint/no-deprecated -- idiomatic way to get the internal tenancy today (see plan-entitlements.ts)
import { DEFAULT_BRANCH_ID, getSoleTenancyFromProjectBranch, type Tenancy } from "@/lib/tenancies";
import { getPrismaClientForTenancy, globalPrismaClient, retryTransaction } from "@/prisma-client";
import { HexclaveAssertionError } from "@stackframe/stack-shared/dist/utils/errors";
import { getOrUndefined } from "@stackframe/stack-shared/dist/utils/objects";
import { HexclaveAssertionError } from "@hexclave/shared/dist/utils/errors";
import { getOrUndefined } from "@hexclave/shared/dist/utils/objects";
import type Stripe from "stripe";

// Page size for streaming teams. Big enough to amortise round-trips,
Expand Down
6 changes: 3 additions & 3 deletions apps/backend/scripts/run-bulldozer-studio.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getEnvVariable } from "@stackframe/stack-shared/dist/utils/env";
import { HexclaveAssertionError } from "@stackframe/stack-shared/dist/utils/errors";
import { deindent, stringCompare } from "@stackframe/stack-shared/dist/utils/strings";
import { getEnvVariable } from "@hexclave/shared/dist/utils/env";
import { HexclaveAssertionError } from "@hexclave/shared/dist/utils/errors";
import { deindent, stringCompare } from "@hexclave/shared/dist/utils/strings";
import ELK from "elkjs/lib/elk.bundled.js";
import http from "node:http";
import { performance } from "node:perf_hooks";
Expand Down
8 changes: 4 additions & 4 deletions apps/backend/scripts/run-cron-jobs.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getEnvVariable } from "@stackframe/stack-shared/dist/utils/env";
import { captureError, HexclaveAssertionError } from "@stackframe/stack-shared/dist/utils/errors";
import { runAsynchronously, wait } from "@stackframe/stack-shared/dist/utils/promises";
import { Result } from "@stackframe/stack-shared/dist/utils/results";
import { getEnvVariable } from "@hexclave/shared/dist/utils/env";
import { captureError, HexclaveAssertionError } from "@hexclave/shared/dist/utils/errors";
import { runAsynchronously, wait } from "@hexclave/shared/dist/utils/promises";
import { Result } from "@hexclave/shared/dist/utils/results";

const endpoints = [
"/api/latest/internal/external-db-sync/sequencer",
Expand Down
6 changes: 3 additions & 3 deletions apps/backend/scripts/run-email-queue.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getEnvVariable } from "@stackframe/stack-shared/dist/utils/env";
import { HexclaveAssertionError } from "@stackframe/stack-shared/dist/utils/errors";
import { runAsynchronously, wait } from "@stackframe/stack-shared/dist/utils/promises";
import { getEnvVariable } from "@hexclave/shared/dist/utils/env";
import { HexclaveAssertionError } from "@hexclave/shared/dist/utils/errors";
import { runAsynchronously, wait } from "@hexclave/shared/dist/utils/promises";

async function main() {
console.log("Starting email queue processor...");
Expand Down
8 changes: 4 additions & 4 deletions apps/backend/scripts/verify-data-integrity/api.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import fs from "fs";
import { getEnvVariable } from "@stackframe/stack-shared/dist/utils/env";
import { HexclaveAssertionError } from "@stackframe/stack-shared/dist/utils/errors";
import { deepPlainEquals, filterUndefined } from "@stackframe/stack-shared/dist/utils/objects";
import { deindent } from "@stackframe/stack-shared/dist/utils/strings";
import { getEnvVariable } from "@hexclave/shared/dist/utils/env";
import { HexclaveAssertionError } from "@hexclave/shared/dist/utils/errors";
import { deepPlainEquals, filterUndefined } from "@hexclave/shared/dist/utils/objects";
import { deindent } from "@hexclave/shared/dist/utils/strings";

export type EndpointOutput = {
status: number,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { getClickhouseAdminClient } from "@/lib/clickhouse";
import { CLICKHOUSE_COLUMN_NORMALIZERS } from "@/lib/external-db-sync";
import type { Tenancy } from "@/lib/tenancies";
import { getPrismaClientForTenancy } from "@/prisma-client";
import { DEFAULT_DB_SYNC_MAPPINGS } from "@stackframe/stack-shared/dist/config/db-sync-mappings";
import { HexclaveAssertionError } from "@stackframe/stack-shared/dist/utils/errors";
import { deindent } from "@stackframe/stack-shared/dist/utils/strings";
import { DEFAULT_DB_SYNC_MAPPINGS } from "@hexclave/shared/dist/config/db-sync-mappings";
import { HexclaveAssertionError } from "@hexclave/shared/dist/utils/errors";
import { deindent } from "@hexclave/shared/dist/utils/strings";

import type { RecurseFunction } from "./recurse";

Expand Down
12 changes: 6 additions & 6 deletions apps/backend/scripts/verify-data-integrity/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import { syncExternalDatabases } from "@/lib/external-db-sync";
import { createPaymentsSchema } from "@/lib/payments/schema/index";
import { DEFAULT_BRANCH_ID, getSoleTenancyFromProjectBranch } from "@/lib/tenancies";
import { getPrismaClientForTenancy, globalPrismaClient } from "@/prisma-client";
import type { OrganizationRenderedConfig } from "@stackframe/stack-shared/dist/config/schema";
import { getEnvVariable } from "@stackframe/stack-shared/dist/utils/env";
import { HexclaveAssertionError } from "@stackframe/stack-shared/dist/utils/errors";
import { omit } from "@stackframe/stack-shared/dist/utils/objects";
import { wait } from "@stackframe/stack-shared/dist/utils/promises";
import { deindent } from "@stackframe/stack-shared/dist/utils/strings";
import type { OrganizationRenderedConfig } from "@hexclave/shared/dist/config/schema";
import { getEnvVariable } from "@hexclave/shared/dist/utils/env";
import { HexclaveAssertionError } from "@hexclave/shared/dist/utils/errors";
import { omit } from "@hexclave/shared/dist/utils/objects";
import { wait } from "@hexclave/shared/dist/utils/promises";
import { deindent } from "@hexclave/shared/dist/utils/strings";
import fs from "fs";

import { createApiHelpers, loadOutputData, type OutputData } from "./api";
Expand Down
16 changes: 8 additions & 8 deletions apps/backend/scripts/verify-data-integrity/payments-verifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import type { Tenancy } from "@/lib/tenancies";
import { getItemQuantityForCustomer } from "@/lib/payments/customer-data";
import { SubscriptionStatus } from "@/generated/prisma/client";
import type { getPrismaClientForTenancy } from "@/prisma-client";
import type { OrganizationRenderedConfig } from "@stackframe/stack-shared/dist/config/schema";
import type { TransactionEntry } from "@stackframe/stack-shared/dist/interface/crud/transactions";
import { FAR_FUTURE_DATE, addInterval, getIntervalsElapsed, type DayInterval } from "@stackframe/stack-shared/dist/utils/dates";
import { getEnvVariable } from "@stackframe/stack-shared/dist/utils/env";
import { HexclaveAssertionError } from "@stackframe/stack-shared/dist/utils/errors";
import { deepPlainEquals } from "@stackframe/stack-shared/dist/utils/objects";
import { deindent, stringCompare, typedToUppercase } from "@stackframe/stack-shared/dist/utils/strings";
import { urlString } from "@stackframe/stack-shared/dist/utils/urls";
import type { OrganizationRenderedConfig } from "@hexclave/shared/dist/config/schema";
import type { TransactionEntry } from "@hexclave/shared/dist/interface/crud/transactions";
import { FAR_FUTURE_DATE, addInterval, getIntervalsElapsed, type DayInterval } from "@hexclave/shared/dist/utils/dates";
import { getEnvVariable } from "@hexclave/shared/dist/utils/env";
import { HexclaveAssertionError } from "@hexclave/shared/dist/utils/errors";
import { deepPlainEquals } from "@hexclave/shared/dist/utils/objects";
import { deindent, stringCompare, typedToUppercase } from "@hexclave/shared/dist/utils/strings";
import { urlString } from "@hexclave/shared/dist/utils/urls";

import type { ExpectStatusCode } from "./api";
import { fetchAllTransactionsForProject } from "./stripe-payout-integrity";
Expand Down
Loading
Loading