Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/api/src/lib/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export const useAuth: (

const options = {
trustedOrigins: [env.FE_APP_URL],
baseURL: env.BETTER_AUTH_URL,
secret: env.BETTER_AUTH_SECRET,
baseURL: env.INFISCAL_BETTER_AUTH_URL,
secret: env.INFISCAL_BETTER_AUTH_SECRET,
database: drizzleAdapter(db, { provider: 'pg', schema }),
...betterAuthConfig,
// anything that needs db below this line
Expand Down
4 changes: 2 additions & 2 deletions apps/api/src/partykit/internal/AI.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Be encouraging but thorough in your evaluation. Focus on understanding their tho
this.room = room;

this.client = new OpenAI({
apiKey: this.env.OPENROUTER_API_KEY,
apiKey: this.env.INFISCAL_OPENROUTER_API_KEY,
baseURL: 'https://openrouter.ai/api/v1',
});
}
Expand Down Expand Up @@ -341,7 +341,7 @@ User's question: ${userMessage.content}

private getDb() {
if (!this.db) {
const sql = postgres(this.env.DATABASE_URL);
const sql = postgres(this.env.INFISCAL_DATABASE_URL);
this.db = drizzle(sql);
}

Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/partykit/privateRoom.do.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class PrivateRoomServer extends YServer<AppContext['Bindings']> {

private getDb() {
if (!this.db) {
const sql = postgres(this.env.DATABASE_URL);
const sql = postgres(this.env.INFISCAL_DATABASE_URL);
this.db = drizzle(sql);
}

Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/partykit/room.do.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export class RoomServer extends YServer<AppContext['Bindings']> {

private getDb() {
if (!this.db) {
const sql = postgres(this.env.DATABASE_URL);
const sql = postgres(this.env.INFISCAL_DATABASE_URL);
this.db = drizzle(sql);
}

Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/services/third-party/Loops.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class LoopsService {
private client: LoopsClient;

constructor(private readonly ctx: Context<AppContext>) {
this.client = new LoopsClient(this.ctx.env.LOOPS_API_KEY);
this.client = new LoopsClient(this.ctx.env.INFISCAL_LOOPS_API_KEY);
}

async createContact(params: { email: string; name: string }) {
Expand Down
4 changes: 2 additions & 2 deletions apps/api/src/services/third-party/Stripe.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { Context } from 'hono';
import { Stripe } from 'stripe';
import { AppContext } from '@/index';

const STRIPE_SECRET_KEY = process.env.STRIPE_SECRET_KEY;
const STRIPE_SECRET_KEY = process.env.INFISCAL_STRIPE_SECRET_KEY;
if (!STRIPE_SECRET_KEY) {
throw new Error('STRIPE_SECRET_KEY is not set');
}

const STRIPE_WEBHOOK_SECRET = process.env.STRIPE_WEBHOOK_SECRET;
const STRIPE_WEBHOOK_SECRET = process.env.INFISCAL_STRIPE_WEBHOOK_SECRET;
if (!STRIPE_WEBHOOK_SECRET) {
throw new Error('STRIPE_WEBHOOK_SECRET is not set');
}
Expand Down
28 changes: 14 additions & 14 deletions apps/api/worker-configuration.d.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
/* eslint-disable */
// Generated by Wrangler by running `wrangler types` (hash: f871f0bb7812599a823fbf1908f4876c)
// Generated by Wrangler by running `wrangler types` (hash: 006b55bf04295474ed35860d23be26ae)
// Runtime types generated with workerd@1.20250617.0 2025-06-01 nodejs_compat,nodejs_compat_populate_process_env
declare namespace Cloudflare {
interface Env {
ASSETS_URL: "https://assets.coderscreen.com";
NODE_ENV: string;
FE_APP_URL: string;
BETTER_AUTH_URL: string;
FREE_PLAN_ID: string;
STRIPE_PUBLISHABLE_KEY: string;
STRIPE_SECRET_KEY: string;
STRIPE_WEBHOOK_SECRET: string;
DATABASE_URL: string;
LOOPS_API_KEY: string;
OPENROUTER_API_KEY: string;
BETTER_AUTH_SECRET: string;
GOOGLE_CLIENT_ID: string;
GOOGLE_CLIENT_SECRET: string;
GITHUB_CLIENT_ID: string;
GITHUB_CLIENT_SECRET: string;
INFISCAL_STRIPE_PUBLISHABLE_KEY: string;
INFISCAL_STRIPE_SECRET_KEY: string;
INFISCAL_STRIPE_WEBHOOK_SECRET: string;
INFISCAL_DATABASE_URL: string;
INFISCAL_LOOPS_API_KEY: string;
INFISCAL_OPENROUTER_API_KEY: string;
INFISCAL_BETTER_AUTH_URL: string;
INFISCAL_BETTER_AUTH_SECRET: string;
INFISCAL_GOOGLE_CLIENT_ID: string;
INFISCAL_GOOGLE_CLIENT_SECRET: string;
INFISCAL_GITHUB_CLIENT_ID: string;
INFISCAL_GITHUB_CLIENT_SECRET: string;
SANDBOX: DurableObjectNamespace<import("./src/index").Sandbox>;
Room: DurableObjectNamespace<import("./src/index").PartyServer>;
PrivateRoom: DurableObjectNamespace<import("./src/index").PrivateRoomServer>;
Expand All @@ -32,7 +32,7 @@ type StringifyValues<EnvType extends Record<string, unknown>> = {
[Binding in keyof EnvType]: EnvType[Binding] extends string ? EnvType[Binding] : string;
};
declare namespace NodeJS {
interface ProcessEnv extends StringifyValues<Pick<Cloudflare.Env, "ASSETS_URL" | "NODE_ENV" | "FE_APP_URL" | "BETTER_AUTH_URL" | "FREE_PLAN_ID" | "STRIPE_PUBLISHABLE_KEY" | "STRIPE_SECRET_KEY" | "STRIPE_WEBHOOK_SECRET" | "DATABASE_URL" | "LOOPS_API_KEY" | "OPENROUTER_API_KEY" | "BETTER_AUTH_SECRET" | "GOOGLE_CLIENT_ID" | "GOOGLE_CLIENT_SECRET" | "GITHUB_CLIENT_ID" | "GITHUB_CLIENT_SECRET">> {}
interface ProcessEnv extends StringifyValues<Pick<Cloudflare.Env, "ASSETS_URL" | "NODE_ENV" | "FE_APP_URL" | "FREE_PLAN_ID" | "INFISCAL_STRIPE_PUBLISHABLE_KEY" | "INFISCAL_STRIPE_SECRET_KEY" | "INFISCAL_STRIPE_WEBHOOK_SECRET" | "INFISCAL_DATABASE_URL" | "INFISCAL_LOOPS_API_KEY" | "INFISCAL_OPENROUTER_API_KEY" | "INFISCAL_BETTER_AUTH_URL" | "INFISCAL_BETTER_AUTH_SECRET" | "INFISCAL_GOOGLE_CLIENT_ID" | "INFISCAL_GOOGLE_CLIENT_SECRET" | "INFISCAL_GITHUB_CLIENT_ID" | "INFISCAL_GITHUB_CLIENT_SECRET">> {}
}

// Begin runtime types
Expand Down
3 changes: 1 addition & 2 deletions apps/api/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
"vars": {
"NODE_ENV": "production",
"FE_APP_URL": "https://app.coderscreen.com",
"FREE_PLAN_ID": "free",
"BETTER_AUTH_URL": "https://api.coderscreen.com/auth",
"ASSETS_URL": "https://assets.coderscreen.com",
"FREE_PLAN_ID": "free",
},
"containers": [
{
Expand Down