Skip to content
Merged

Dev #99

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
bd201c3
feat(project): Added projects
SteakFisher Jun 16, 2026
bfdfe30
fix(datetime): Slight changes
SteakFisher Jun 16, 2026
4cbc1ed
fix(webhooks): potential leak)
SteakFisher Jun 16, 2026
4b9f81e
fix(user): Cache invalidation
SteakFisher Jun 16, 2026
2b54ffb
fix: composite PK for usersTable, token validation, ensureUserExists …
SteakFisher Jun 17, 2026
287a146
fix: add model.min(1), provider default, token count .min(0) in creat…
SteakFisher Jun 17, 2026
3821899
fix: scope row lock, deleteWebhookEndpoint, and remove metadata from …
SteakFisher Jun 17, 2026
c0755c7
fix: resolve all greptile findings — billing, auth, tests, schema, va…
SteakFisher Jun 18, 2026
7b6179f
fix: prevent dashboard self-revoke, remove unsafe cast in query.ts
SteakFisher Jun 19, 2026
91b3696
fix(schema.ts): added project_id to clickhouse db schema
0xanshu Jun 21, 2026
b6410a7
fix(generateInitialAPIKey): now API key gets inserted into the db
0xanshu Jun 23, 2026
d998a50
fix(generateInitialAPIKey): idempotency gaurd added
0xanshu Jun 24, 2026
97cb89e
fix(project): schema fixes
0xanshu Jun 24, 2026
37d1423
test: add integration tests for Query Engine and Data Engine gRPC ser…
SteakFisher Jun 25, 2026
8c4d0aa
refactor: Phase 1 (SQL dialect abstraction) + Phase 3 (Data engine mo…
SteakFisher Jun 25, 2026
16bf9cb
chore: custom error types, derive Zod enum from registry, explicit OU…
SteakFisher Jun 25, 2026
4788da8
feat(createDashboardKey): made a new route to handle creation of dash…
0xanshu Jun 26, 2026
94184ac
fix(resgisterApiRoutes.ts): fixed params
0xanshu Jun 26, 2026
e9348f1
fix(apiKeys.ts): fixed linting errors
0xanshu Jun 26, 2026
06e61d9
fix(apiKeys): fixed greptile issues
0xanshu Jun 27, 2026
1f4553b
fix(queryEvents): fixed greptile issues
0xanshu Jun 27, 2026
e3fee51
fix(db): constrain config keys
0xanshu Jun 27, 2026
1550d8d
feat(projects): added project create, update, delete routes and func
0xanshu Jun 28, 2026
4ca65cb
fix(projects): fixed projects checking
0xanshu Jun 28, 2026
8b2fa2b
fix(project.ts): fixed multiple grep issues
0xanshu Jun 28, 2026
8441040
fix(projcets.ts): handling failure in updating dodo webhooks
0xanshu Jun 28, 2026
3a45993
fix(projcets.ts): now accepting a dashboard-only target apiKeyId
0xanshu Jun 28, 2026
f076f9f
fix(projcets.ts): fixed greptile issues
0xanshu Jun 28, 2026
0f6fae9
fix(projcets.ts): using left join to insert data for projects
0xanshu Jun 29, 2026
a63ee9b
fix(projcets.ts): currency mismatch fixed
0xanshu Jun 29, 2026
609ab4c
fix(projcets.ts): added API key expiry handling to various files
0xanshu Jun 29, 2026
ffef9a8
fix(projcets.ts): several auth issues are fixed
0xanshu Jun 29, 2026
0b62aaf
fix(projects.ts): checking for existing checkout links THEN making th…
0xanshu Jun 29, 2026
6f309e7
fix(projects.ts): clickhouse startup cleanup
0xanshu Jun 29, 2026
aa3ea44
fix(projects): handling partial metadata insertion failure
0xanshu Jun 29, 2026
4951286
fix(projects): fixed multiple greptile issues
0xanshu Jun 29, 2026
3380597
Merge pull request #93 from 0xanshu/0xanshu/project
SteakFisher Jun 30, 2026
5184332
chore: rename SCRAWN_KEY to MASTER_API_KEY, add MASTER_API_KEY_HASH, …
SteakFisher Jul 1, 2026
d0986f5
Merge pull request #96 from ScrawnDotDev/feat/cli_autogen
SteakFisher Jul 1, 2026
39df8f4
refactor(query): refactoring the query engine
0xanshu Jul 1, 2026
c71e760
fix(analytics): computed filters now have the condition
0xanshu Jul 3, 2026
c37c05c
fix(analytics): implemented auth checks in query
0xanshu Jul 3, 2026
b47f89f
fix(analytics): fixed linting errors
0xanshu Jul 3, 2026
e527bc4
fix(analytics): taking orderBy in query now
0xanshu Jul 3, 2026
99407f5
fix(analytics): applied pagination globally
0xanshu Jul 3, 2026
6eea7cf
fix(analytics): matched protobuf orderBy field with zod
0xanshu Jul 3, 2026
ea6d3ac
fix(analytics): restored output-cache fields
0xanshu Jul 3, 2026
37c0862
fix(analytics): preserve eventType predicates
0xanshu Jul 3, 2026
b0fed5c
fix(analytics): fixed values in fieldRegistery
0xanshu Jul 3, 2026
043c29f
fix(analytics): fixed AI debit assertions
0xanshu Jul 3, 2026
feddc3a
fix(analytics): reject unknown aggregations
0xanshu Jul 3, 2026
462c9ff
Merge pull request #97 from 0xanshu/refactor/analytics
SteakFisher Jul 4, 2026
7610b1d
fix(products): products are now created automatically
0xanshu Jul 6, 2026
9bde46f
fix(products): removed product_id from zod
0xanshu Jul 6, 2026
6f55b52
fix(products): webhook url now contains product id
0xanshu Jul 6, 2026
ed81030
fix(products): handling rejected promise better now
0xanshu Jul 6, 2026
2595e00
fix(products): removed typecasting from promise results
0xanshu Jul 6, 2026
f9be0c5
fix(products): changed to Currency type from dodo
0xanshu Jul 6, 2026
e2cb64a
fix(products): correct path to import Currency type now
0xanshu Jul 6, 2026
41ebfe6
Merge pull request #98 from 0xanshu/feat/dodo-products-creation
SteakFisher Jul 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ DATABASE_URL=postgres://postgres:postgres@localhost:5432/scrawn
CLICKHOUSE_URL=http://default:clickhouse@localhost:8123/scrawn

HMAC_SECRET=
MASTER_API_KEY_HASH= # hex(HMAC-SHA256(HMAC_SECRET, <raw master key>)) — computed with HMAC_SECRET as the signing key (used for project creation during onboarding)
APP_URL=http://localhost:8060 # URL the Scrawn backend is hosted on

# SENTRY_DSN=
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ services:
NODE_ENV: production
HMAC_SECRET: ${HMAC_SECRET}
APP_URL: ${APP_URL}
MASTER_API_KEY_HASH: ${MASTER_API_KEY_HASH}

dashboard:
profiles:
Expand All @@ -77,6 +78,6 @@ services:
BETTER_AUTH_URL: http://localhost:3000
SCRAWN_BASE_URL: http://server:8060
SCRAWN_HTTP_URL: http://server:8060
SCRAWN_KEY: ${SCRAWN_KEY}
MASTER_API_KEY: ${MASTER_API_KEY}


2 changes: 1 addition & 1 deletion proto
Submodule proto updated from d9ceee to e4b723
3 changes: 2 additions & 1 deletion src/__tests__/auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ import { getPostgresDB } from "../storage/db/postgres/db";
import { webhookEndpointsTable } from "../storage/db/postgres/schema";
import { DateTime } from "luxon";
import { clearDatabase } from "./db";
import { insertKey } from "./fixtures/apiKey";
import { insertKey, TEST_PROJECT_ID } from "./fixtures/apiKey";

async function insertWebhookEndpoint(apiKeyId: string): Promise<void> {
const db = getPostgresDB();
await db.insert(webhookEndpointsTable).values({
projectId: TEST_PROJECT_ID,
apiKeyId,
url: "https://example.com/webhook",
privateKey: "test-private-key",
Expand Down
4 changes: 3 additions & 1 deletion src/__tests__/createAPIKey.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
registerEvent,
} from "./fixtures/grpc";
import { verifyApiKeyCreated } from "./assertions/events";
import { createTestApiKey } from "./fixtures/apiKey";
import { createTestApiKey, TEST_PROJECT_ID } from "./fixtures/apiKey";
import { getPostgresDB } from "../storage/db/postgres/db";
import { hashAPIKey } from "../utils/hashAPIKey";
import {
Expand Down Expand Up @@ -44,6 +44,7 @@ async function createDashboardApiKey(): Promise<{
key: hashAPIKey(rawKey),
role: "dashboard",
expiresAt: DateTime.utc().plus({ years: 1 }).toISO(),
projectId: TEST_PROJECT_ID,
})
.returning({ id: apiKeysTable.id });
return { rawKey, id: key!.id };
Expand Down Expand Up @@ -149,6 +150,7 @@ describe("AuthService", () => {

const db = getPostgresDB();
await db.insert(webhookEndpointsTable).values({
projectId: TEST_PROJECT_ID,
apiKeyId: res.apiKeyId,
url: "https://example.com/webhook",
privateKey: "test-private-key",
Expand Down
Loading
Loading