Spaces:
Build error
Build error
Colab User commited on
Commit ·
eab050b
1
Parent(s): 51ffef2
Initial commit: Deploy rasa-engine API server
Browse filesFiles changed (24)
- .dockerignoreAdded+7
- DockerfileAdded+28
- artifacts/api-server/build.mjsAdded+125
- artifacts/api-server/package.jsonAdded+33
- artifacts/api-server/src/app.tsAdded+34
- artifacts/api-server/src/index.tsAdded+25
- artifacts/api-server/src/lib/logger.tsAdded+20
- artifacts/api-server/src/routes/health.tsAdded+11
- artifacts/api-server/src/routes/index.tsAdded+10
- artifacts/api-server/src/routes/rasa/index.tsAdded+153
- artifacts/api-server/tsconfig.jsonAdded+20
- lib/api-spec/openapi.yamlAdded+207
- lib/api-spec/orval.config.tsAdded+72
- lib/api-spec/package.jsonAdded+11
- lib/db/drizzle.config.tsAdded+14
- lib/db/package.jsonAdded+25
- lib/db/src/index.tsAdded+16
- lib/db/src/schema/index.tsAdded+20
- lib/db/src/schema/rasa_analyses.tsAdded+21
- lib/db/tsconfig.jsonAdded+12
- package.jsonAdded+16
- pnpm-workspace.yamlAdded+159
- tsconfig.base.jsonAdded+25
- tsconfig.jsonAdded+19
1234567node_modulesbuild.env.git.vscode*.log*.tgz12345678910111213141516171819202122232425262728# Use an official Node.js runtime as a parent imageFROM node:18-alpine
# Set the working directory in the containerWORKDIR /app
# Install pnpmRUN npm install -g pnpm
# Copy package.json and pnpm-workspace.yaml to leverage Docker cacheCOPY package.json pnpm-workspace.yaml ./COPY artifacts/api-server/package.json artifacts/api-server/COPY lib/db/package.json lib/db/
# Install dependenciesRUN pnpm install --frozen-lockfile
# Copy the rest of the application codeCOPY . .
# Build the api-server projectRUN pnpm run build --filter=@workspace/api-server
# Expose the port the app runs onEXPOSE 3000
# Define the command to run the appCMD ["node", "./artifacts/api-server/build/index.mjs"]123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125import { createRequire } from "node:module";import path from "node:path";import { fileURLToPath } from "node:url";import { build as esbuild } from "esbuild";import esbuildPluginPino from "esbuild-plugin-pino";import { rm } from "node:fs/promises";
// Plugins (e.g. 'esbuild-plugin-pino') may use `require` to resolve dependenciesglobalThis.require = createRequire(import.meta.url);
const artifactDir = path.dirname(fileURLToPath(import.meta.url));
async function buildAll() { const distDir = path.resolve(artifactDir, "dist"); await rm(distDir, { recursive: true, force: true });
await esbuild({ entryPoints: [path.resolve(artifactDir, "src/index.ts")], platform: "node", bundle: true, format: "esm", outdir: distDir, outExtension: { ".js": ".mjs" }, logLevel: "info", // Some packages may not be bundleable, so we externalize them, we can add more here as needed. // Some of the packages below may not be imported or installed, but we're adding them in case they are in the future. // Examples of unbundleable packages: // - uses native modules and loads them dynamically (e.g. sharp) // - use path traversal to read files (e.g. @google-cloud/secret-manager loads sibling .proto files) external: [ "*.node", "sharp", "better-sqlite3", "sqlite3", "canvas", "bcrypt", "argon2", "fsevents", "re2", "farmhash", "xxhash-addon", "bufferutil", "utf-8-validate", "ssh2", "cpu-features", "dtrace-provider", "isolated-vm", "lightningcss", "pg-native", "oracledb", "mongodb-client-encryption", "nodemailer", "handlebars", "knex", "typeorm", "protobufjs", "onnxruntime-node", "@tensorflow/*", "@prisma/client", "@mikro-orm/*", "@grpc/*", "@swc/*", "@aws-sdk/*", "@azure/*", "@opentelemetry/*", "@google-cloud/*", "googleapis", "firebase-admin", "@parcel/watcher", "@sentry/profiling-node", "@tree-sitter/*", "aws-sdk", "classic-level", "dd-trace", "ffi-napi", "grpc", "hiredis", "kerberos", "leveldown", "miniflare", "mysql2", "newrelic", "odbc", "piscina", "realm", "ref-napi", "rocksdb", "sass-embedded", "sequelize", "serialport", "snappy", "tinypool", "usb", "workerd", "wrangler", "zeromq", "zeromq-prebuilt", "playwright", "puppeteer", "puppeteer-core", "electron", ], sourcemap: "linked", plugins: [ // pino relies on workers to handle logging, instead of externalizing it we use a plugin to handle it esbuildPluginPino({ transports: ["pino-pretty"] }) ], // Make sure packages that are cjs only (e.g. express) but are bundled continue to work in our esm output file banner: { js: `import { createRequire as __bannerCrReq } from 'node:module';import __bannerPath from 'node:path';import __bannerUrl from 'node:url';
globalThis.require = __bannerCrReq(import.meta.url);globalThis.__filename = __bannerUrl.fileURLToPath(import.meta.url);globalThis.__dirname = __bannerPath.dirname(globalThis.__filename); `, }, });}
buildAll().catch((err) => { console.error(err); process.exit(1);});123456789101112131415161718192021222324252627282930313233{ "name": "@workspace/api-server", "version": "0.0.0", "private": true, "type": "module", "scripts": { "dev": "export NODE_ENV=development && pnpm run build && pnpm run start", "build": "node ./build.mjs", "start": "node --enable-source-maps ./dist/index.mjs", "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { "@workspace/api-zod": "workspace:*", "@workspace/db": "workspace:*", "@workspace/integrations-gemini-ai": "workspace:*", "cookie-parser": "^1.4.7", "cors": "^2", "drizzle-orm": "catalog:", "express": "^5", "pino": "^9", "pino-http": "^10" }, "devDependencies": { "@types/cookie-parser": "^1.4.10", "@types/cors": "^2.8.19", "@types/express": "^5.0.6", "@types/node": "catalog:", "esbuild": "^0.27.3", "esbuild-plugin-pino": "^2.3.3", "pino-pretty": "^13", "thread-stream": "3.1.0" }}12345678910111213141516171819202122232425262728293031323334import express, { type Express } from "express";import cors from "cors";import pinoHttp from "pino-http";import router from "./routes";import { logger } from "./lib/logger";
const app: Express = express();
app.use( pinoHttp({ logger, serializers: { req(req) { return { id: req.id, method: req.method, url: req.url?.split("?")[0], }; }, res(res) { return { statusCode: res.statusCode, }; }, }, }),);app.use(cors());app.use(express.json());app.use(express.urlencoded({ extended: true }));
app.use("/api", router);
export default app;12345678910111213141516171819202122232425import app from "./app";import { logger } from "./lib/logger";
const rawPort = process.env["PORT"];
if (!rawPort) { throw new Error( "PORT environment variable is required but was not provided.", );}
const port = Number(rawPort);
if (Number.isNaN(port) || port <= 0) { throw new Error(`Invalid PORT value: "${rawPort}"`);}
app.listen(port, (err) => { if (err) { logger.error({ err }, "Error listening on port"); process.exit(1); }
logger.info({ port }, "Server listening");});1234567891011121314151617181920import pino from "pino";
const isProduction = process.env.NODE_ENV === "production";
export const logger = pino({ level: process.env.LOG_LEVEL ?? "info", redact: [ "req.headers.authorization", "req.headers.cookie", "res.headers['set-cookie']", ], ...(isProduction ? {} : { transport: { target: "pino-pretty", options: { colorize: true }, }, }),});1234567891011import { Router, type IRouter } from "express";import { HealthCheckResponse } from "@workspace/api-zod";
const router: IRouter = Router();
router.get("/healthz", (_req, res) => { const data = HealthCheckResponse.parse({ status: "ok" }); res.json(data);});
export default router;12345678910import { Router, type IRouter } from "express";import healthRouter from "./health";import rasaRouter from "./rasa";
const router: IRouter = Router();
router.use(healthRouter);router.use("/rasa", rasaRouter);
export default router;123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153import { Router } from "express";import { db } from "@workspace/db";import { rasaAnalysesTable } from "@workspace/db";import { AnalyzeRasaBody, DeleteRasaHistoryParams, GetRasaHistoryQueryParams } from "@workspace/api-zod";import { ai } from "@workspace/integrations-gemini-ai";import { desc, eq } from "drizzle-orm";
const router = Router();
const SYSTEM_PROMPT = `You are a Vedic Rasa Analysis engine built on three ancient sutras from the Vedic Sutras Framework:
1. **Natya Shastra / Rasa Sutras (Sutra 13)** — The Sentiment Analysis framework by Bharata Muni. The 9 primary Rasas (emotional essences) and their extended forms encode all human emotion into a deterministic matrix.
2. **Yoga Sutras of Patanjali (Sutra 10)** — The Attention & Memory framework. Dharana (focused attention) enables precise analysis by eliminating noise (Vritti) and isolating the core emotional signal.
3. **Nyaya Sutras (Sutra 3)** — The AI Logic & Inference framework by Akshapada Gautama. Apply the 5-step Pramana: Pratijna (hypothesis), Hetu (reason), Udaharana (example), Upanaya (application), Nigamana (conclusion).
**Rasa Detection:**Identify the dominant Rasa from this extended set: Love, Laughter, Compassion, Fury, Heroism, Fear, Disgust, Wonder, Peace, Surprise, Sadness, Calm, Courage, Mystery, Wisdom
**Hallucination Detection:**Analyze the text for factual inaccuracies, unsupported claims, logical fallacies, or fabricated information. Score from 0.0 (fully grounded) to 1.0 (completely hallucinated).
Return ONLY valid JSON with this exact structure (no markdown, no extra text):{ "rasa": { "name": "<one of the 15 Rasas>", "confidence": <float 0.0-1.0>, "explanation": "<brief Vedic-informed explanation of why this Rasa dominates>" }, "hallucination": { "score": <float 0.0-1.0>, "severity": "<none|low|medium|high|critical>", "problematic_statements": ["<statement1>", "<statement2>"] }, "summary": "<1-2 sentence synthesis of the text's essence through the Vedic lens>"}`;
router.post("/analyze", async (req, res) => { const parsed = AnalyzeRasaBody.safeParse(req.body); if (!parsed.success) { return res.status(400).json({ error: "Invalid request body" }); }
const { text } = parsed.data;
if (!text || text.trim().length === 0) { return res.status(400).json({ error: "Text is required" }); }
if (text.length > 10000) { return res.status(400).json({ error: "Text must be 10,000 characters or less" }); }
try { const response = await ai.models.generateContent({ model: "gemini-2.5-flash", contents: [ { role: "user", parts: [{ text: `Analyze this text using the Vedic Rasa and Nyaya Sutra frameworks:\n\n${text}` }], }, ], config: { systemInstruction: SYSTEM_PROMPT, responseMimeType: "application/json", maxOutputTokens: 8192, }, });
const rawText = response.text ?? "{}";
let analysis: { rasa: { name: string; confidence: number; explanation: string }; hallucination: { score: number; severity: string; problematic_statements: string[] }; summary: string; };
try { analysis = JSON.parse(rawText); } catch { return res.status(500).json({ error: "Failed to parse AI response" }); }
const timestamp = Date.now();
await db.insert(rasaAnalysesTable).values({ text, rasa_name: analysis.rasa.name, rasa_confidence: analysis.rasa.confidence, rasa_explanation: analysis.rasa.explanation, hallucination_score: analysis.hallucination.score, hallucination_severity: analysis.hallucination.severity, hallucination_problematic_statements: analysis.hallucination.problematic_statements, summary: analysis.summary, timestamp, });
return res.json({ rasa: analysis.rasa, hallucination: analysis.hallucination, summary: analysis.summary, text, timestamp, }); } catch (err) { req.log.error({ err }, "Rasa analysis failed"); return res.status(500).json({ error: "Analysis failed. Please try again." }); }});
router.get("/history", async (req, res) => { const parsed = GetRasaHistoryQueryParams.safeParse(req.query); const limit = parsed.success && parsed.data.limit ? parsed.data.limit : 50;
const records = await db .select() .from(rasaAnalysesTable) .orderBy(desc(rasaAnalysesTable.created_at)) .limit(limit);
return res.json( records.map((r) => ({ ...r, created_at: r.created_at.toISOString(), })) );});
router.delete("/history/:id", async (req, res) => { const parsed = DeleteRasaHistoryParams.safeParse(req.params); if (!parsed.success) { return res.status(400).json({ error: "Invalid id" }); }
const { id } = parsed.data;
const existing = await db .select() .from(rasaAnalysesTable) .where(eq(rasaAnalysesTable.id, id)) .limit(1);
if (existing.length === 0) { return res.status(404).json({ error: "Record not found" }); }
await db.delete(rasaAnalysesTable).where(eq(rasaAnalysesTable.id, id));
return res.status(204).send();});
export default router;1234567891011121314151617181920{ "extends": "../../tsconfig.base.json", "compilerOptions": { "outDir": "dist", "rootDir": "src", "types": ["node"] }, "include": ["src"], "references": [ { "path": "../../lib/db" }, { "path": "../../lib/api-zod" }, { "path": "../../lib/integrations-gemini-ai" } ]}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207openapi: 3.1.0info: # Do not change the title, if the title changes, the import paths will be broken title: Api version: 0.1.0 description: API specificationservers: - url: /api description: Base API pathtags: - name: health description: Health operations - name: rasa description: Vedic Rasa analysis operationspaths: /healthz: get: operationId: healthCheck tags: [health] summary: Health check description: Returns server health status responses: "200": description: Healthy content: application/json: schema: $ref: "#/components/schemas/HealthStatus" /rasa/analyze: post: operationId: analyzeRasa tags: [rasa] summary: Analyze text for Vedic Rasa and hallucination detection requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AnalyzeRasaBody" responses: "200": description: Analysis result content: application/json: schema: $ref: "#/components/schemas/AnalysisResult" "400": description: Bad request content: application/json: schema: $ref: "#/components/schemas/ApiError" "500": description: Server error content: application/json: schema: $ref: "#/components/schemas/ApiError" /rasa/history: get: operationId: getRasaHistory tags: [rasa] summary: Get analysis history parameters: - name: limit in: query required: false schema: type: integer responses: "200": description: List of past analyses content: application/json: schema: type: array items: $ref: "#/components/schemas/AnalysisRecord" /rasa/history/{id}: delete: operationId: deleteRasaHistory tags: [rasa] summary: Delete a history entry parameters: - name: id in: path required: true schema: type: integer responses: "204": description: Deleted "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/ApiError"components: schemas: HealthStatus: type: object properties: status: type: string required: - status AnalyzeRasaBody: type: object properties: text: type: string required: - text RasaResult: type: object properties: name: type: string confidence: type: number explanation: type: string required: - name - confidence - explanation HallucinationResult: type: object properties: score: type: number severity: type: string problematic_statements: type: array items: type: string required: - score - severity - problematic_statements AnalysisResult: type: object properties: rasa: $ref: "#/components/schemas/RasaResult" hallucination: $ref: "#/components/schemas/HallucinationResult" summary: type: string text: type: string timestamp: type: number required: - rasa - hallucination - summary - text - timestamp AnalysisRecord: type: object properties: id: type: integer text: type: string rasa_name: type: string rasa_confidence: type: number rasa_explanation: type: string hallucination_score: type: number hallucination_severity: type: string hallucination_problematic_statements: type: array items: type: string summary: type: string timestamp: type: number created_at: type: string required: - id - text - rasa_name - rasa_confidence - rasa_explanation - hallucination_score - hallucination_severity - hallucination_problematic_statements - summary - timestamp - created_at ApiError: type: object properties: error: type: string required: - error123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172import { defineConfig, InputTransformerFn } from "orval";import path from "path";
const root = path.resolve(__dirname, "..", "..");const apiClientReactSrc = path.resolve(root, "lib", "api-client-react", "src");const apiZodSrc = path.resolve(root, "lib", "api-zod", "src");
// Our exports make assumptions about the title of the API being "Api" (i.e. generated output is `api.ts`).const titleTransformer: InputTransformerFn = (config) => { config.info ??= {}; config.info.title = "Api";
return config;};
export default defineConfig({ "api-client-react": { input: { target: "./openapi.yaml", override: { transformer: titleTransformer, }, }, output: { workspace: apiClientReactSrc, target: "generated", client: "react-query", mode: "split", baseUrl: "/api", clean: true, prettier: true, override: { fetch: { includeHttpResponseReturnType: false, }, mutator: { path: path.resolve(apiClientReactSrc, "custom-fetch.ts"), name: "customFetch", }, }, }, }, zod: { input: { target: "./openapi.yaml", override: { transformer: titleTransformer, }, }, output: { workspace: apiZodSrc, client: "zod", target: "generated", schemas: { path: "generated/types", type: "typescript" }, mode: "split", clean: true, prettier: true, override: { zod: { coerce: { query: ['boolean', 'number', 'string'], param: ['boolean', 'number', 'string'], body: ['bigint', 'date'], response: ['bigint', 'date'], }, }, useDates: true, useBigInt: true, }, }, },});1234567891011{ "name": "@workspace/api-spec", "version": "0.0.0", "private": true, "scripts": { "codegen": "orval --config ./orval.config.ts" }, "devDependencies": { "orval": "^8.5.2" }}1234567891011121314import { defineConfig } from "drizzle-kit";import path from "path";
if (!process.env.DATABASE_URL) { throw new Error("DATABASE_URL, ensure the database is provisioned");}
export default defineConfig({ schema: path.join(__dirname, "./src/schema/index.ts"), dialect: "postgresql", dbCredentials: { url: process.env.DATABASE_URL, },});12345678910111213141516171819202122232425{ "name": "@workspace/db", "version": "0.0.0", "private": true, "type": "module", "exports": { ".": "./src/index.ts", "./schema": "./src/schema/index.ts" }, "scripts": { "push": "drizzle-kit push --config ./drizzle.config.ts", "push-force": "drizzle-kit push --force --config ./drizzle.config.ts" }, "dependencies": { "drizzle-orm": "catalog:", "drizzle-zod": "^0.8.3", "pg": "^8.20.0", "zod": "catalog:" }, "devDependencies": { "@types/node": "catalog:", "@types/pg": "^8.18.0", "drizzle-kit": "^0.31.9" }}12345678910111213141516import { drizzle } from "drizzle-orm/node-postgres";import pg from "pg";import * as schema from "./schema";
const { Pool } = pg;
if (!process.env.DATABASE_URL) { throw new Error( "DATABASE_URL must be set. Did you forget to provision a database?", );}
export const pool = new Pool({ connectionString: process.env.DATABASE_URL });export const db = drizzle(pool, { schema });
export * from "./schema";1234567891011121314151617181920// Export your models here. Add one export per file// export * from "./posts";//// Each model/table should ideally be split into different files.// Each model/table should define a Drizzle table, insert schema, and types://// import { pgTable, text, serial } from "drizzle-orm/pg-core";// import { createInsertSchema } from "drizzle-zod";// import { z } from "zod/v4";//// export const postsTable = pgTable("posts", {// id: serial("id").primaryKey(),// title: text("title").notNull(),// });//// export const insertPostSchema = createInsertSchema(postsTable).omit({ id: true });// export type InsertPost = z.infer<typeof insertPostSchema>;// export type Post = typeof postsTable.$inferSelect;
export * from "./rasa_analyses";123456789101112131415161718192021import { pgTable, serial, text, real, jsonb, timestamp, bigint } from "drizzle-orm/pg-core";import { createInsertSchema } from "drizzle-zod";import { z } from "zod/v4";
export const rasaAnalysesTable = pgTable("rasa_analyses", { id: serial("id").primaryKey(), text: text("text").notNull(), rasa_name: text("rasa_name").notNull(), rasa_confidence: real("rasa_confidence").notNull(), rasa_explanation: text("rasa_explanation").notNull(), hallucination_score: real("hallucination_score").notNull(), hallucination_severity: text("hallucination_severity").notNull(), hallucination_problematic_statements: jsonb("hallucination_problematic_statements").$type<string[]>().notNull().default([]), summary: text("summary").notNull(), timestamp: bigint("timestamp", { mode: "number" }).notNull(), created_at: timestamp("created_at").defaultNow().notNull(),});
export const insertRasaAnalysisSchema = createInsertSchema(rasaAnalysesTable).omit({ id: true, created_at: true });export type InsertRasaAnalysis = z.infer<typeof insertRasaAnalysisSchema>;export type RasaAnalysis = typeof rasaAnalysesTable.$inferSelect;123456789101112{ "extends": "../../tsconfig.base.json", "compilerOptions": { "composite": true, "declarationMap": true, "emitDeclarationOnly": true, "outDir": "dist", "rootDir": "src", "types": ["node"] }, "include": ["src"]}12345678910111213141516{ "name": "workspace", "version": "0.0.0", "license": "MIT", "scripts": { "preinstall": "sh -c 'rm -f package-lock.json yarn.lock; case \"$npm_config_user_agent\" in pnpm/*) ;; *) echo \"Use pnpm instead\" >&2; exit 1 ;; esac'", "build": "pnpm run typecheck && pnpm -r --if-present run build", "typecheck:libs": "tsc --build", "typecheck": "pnpm run typecheck:libs && pnpm -r --filter \"./artifacts/**\" --filter \"./scripts\" --if-present run typecheck" }, "private": true, "devDependencies": { "typescript": "~5.9.2", "prettier": "^3.8.1" }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159# ============================================================================# SECURITY: Minimum release age for npm packages (supply-chain attack defense)# ============================================================================## This setting requires that any npm package version must have been published# for at least 1 day (1440 minutes) before pnpm will allow installing it.# This is a critical defense against supply-chain attacks. In most cases,# malicious npm releases are discovered and pulled within hours, so a 1-day# delay provides a strong safety buffer.## DO NOT DISABLE THIS SETTING. Removing or setting it to 0 is considered# extremely dangerous and leaves the entire workspace vulnerable to supply-# chain attacks, which have been the #1 vector for npm ecosystem compromises.## If you absolutely need to install a package before the 1-day window has# passed (e.g. an urgent security bugfix), you can add it to the# `minimumReleaseAgeExclude` allowlist below. Only consider doing this for# packages released by trusted organizations with an impeccable security# posture (e.g. Replit packsges, react from Meta, typescript from Microsoft). Even then,# remove the exclusion once the 1-day window has passed.## Example:# minimumReleaseAgeExclude:# - react# - typescript## ============================================================================minimumReleaseAge: 1440
minimumReleaseAgeExclude: # Exclude @replit scoped packages from the minimum release age check. # These are published by Replit and trusted — the supply-chain attack vector # this setting guards against does not apply to our own packages. - '@replit/*' - stripe-replit-sync
packages: - artifacts/* - lib/* - lib/integrations/* - scripts
catalog: '@replit/vite-plugin-cartographer': ^0.5.1 '@replit/vite-plugin-dev-banner': ^0.1.1 '@replit/vite-plugin-runtime-error-modal': ^0.0.6 '@tailwindcss/vite': ^4.1.14 '@tanstack/react-query': ^5.90.21 '@types/node': ^25.3.3 '@types/react': ^19.2.0 '@types/react-dom': ^19.2.0 '@vitejs/plugin-react': ^5.0.4 class-variance-authority: ^0.7.1 clsx: ^2.1.1 drizzle-orm: ^0.45.1 framer-motion: ^12.23.24 lucide-react: ^0.545.0 # Must be this exact version because expo requires it react: 19.1.0 # Must be this exact version because expo requires it react-dom: 19.1.0 tailwind-merge: ^3.3.1 tailwindcss: ^4.1.14 tsx: ^4.21.0 vite: ^7.3.0 zod: ^3.25.76
autoInstallPeers: false
onlyBuiltDependencies: - '@swc/core' - esbuild - msw - unrs-resolver
overrides: # replit uses linux-x64 only, we can exclude all other platforms "esbuild>@esbuild/darwin-arm64": "-" "esbuild>@esbuild/darwin-x64": "-" "esbuild>@esbuild/freebsd-arm64": "-" "esbuild>@esbuild/freebsd-x64": "-" "esbuild>@esbuild/linux-arm": "-" "esbuild>@esbuild/linux-arm64": "-" "esbuild>@esbuild/linux-ia32": "-" "esbuild>@esbuild/linux-loong64": "-" "esbuild>@esbuild/linux-mips64el": "-" "esbuild>@esbuild/linux-ppc64": "-" "esbuild>@esbuild/linux-riscv64": "-" "esbuild>@esbuild/linux-s390x": "-" "esbuild>@esbuild/netbsd-arm64": "-" "esbuild>@esbuild/netbsd-x64": "-" "esbuild>@esbuild/openbsd-arm64": "-" "esbuild>@esbuild/openbsd-x64": "-" "esbuild>@esbuild/sunos-x64": "-" "esbuild>@esbuild/win32-arm64": "-" "esbuild>@esbuild/win32-ia32": "-" "esbuild>@esbuild/win32-x64": "-" "esbuild>@esbuild/aix-ppc64": '-' "esbuild>@esbuild/android-arm": '-' "esbuild>@esbuild/android-arm64": '-' "esbuild>@esbuild/android-x64": '-' "esbuild>@esbuild/openharmony-arm64": '-' "lightningcss>lightningcss-android-arm64": "-" "lightningcss>lightningcss-darwin-arm64": "-" "lightningcss>lightningcss-darwin-x64": "-" "lightningcss>lightningcss-freebsd-x64": "-" "lightningcss>lightningcss-linux-arm-gnueabihf": "-" "lightningcss>lightningcss-linux-arm64-gnu": "-" "lightningcss>lightningcss-linux-arm64-musl": "-" "lightningcss>lightningcss-linux-x64-musl": "-" "lightningcss>lightningcss-win32-arm64-msvc": "-" "lightningcss>lightningcss-win32-x64-msvc": "-" "@tailwindcss/oxide>@tailwindcss/oxide-android-arm64": "-" "@tailwindcss/oxide>@tailwindcss/oxide-darwin-arm64": "-" "@tailwindcss/oxide>@tailwindcss/oxide-darwin-x64": "-" "@tailwindcss/oxide>@tailwindcss/oxide-freebsd-x64": "-" "@tailwindcss/oxide>@tailwindcss/oxide-linux-arm-gnueabihf": "-" "@tailwindcss/oxide>@tailwindcss/oxide-linux-arm64-gnu": "-" "@tailwindcss/oxide>@tailwindcss/oxide-linux-arm64-musl": "-" "@tailwindcss/oxide>@tailwindcss/oxide-win32-arm64-msvc": "-" "@tailwindcss/oxide>@tailwindcss/oxide-win32-x64-msvc": "-" "@tailwindcss/oxide>@tailwindcss/oxide-linux-x64-musl": "-" "rollup>@rollup/rollup-android-arm-eabi": "-" "rollup>@rollup/rollup-android-arm64": "-" "rollup>@rollup/rollup-darwin-arm64": "-" "rollup>@rollup/rollup-darwin-x64": "-" "rollup>@rollup/rollup-freebsd-arm64": "-" "rollup>@rollup/rollup-freebsd-x64": "-" "rollup>@rollup/rollup-linux-arm-gnueabihf": "-" "rollup>@rollup/rollup-linux-arm-musleabihf": "-" "rollup>@rollup/rollup-linux-arm64-gnu": "-" "rollup>@rollup/rollup-linux-arm64-musl": "-" "rollup>@rollup/rollup-linux-loong64-gnu": "-" "rollup>@rollup/rollup-linux-loong64-musl": "-" "rollup>@rollup/rollup-linux-ppc64-gnu": "-" "rollup>@rollup/rollup-linux-ppc64-musl": "-" "rollup>@rollup/rollup-linux-riscv64-gnu": "-" "rollup>@rollup/rollup-linux-riscv64-musl": "-" "rollup>@rollup/rollup-linux-s390x-gnu": "-" "rollup>@rollup/rollup-linux-x64-musl": "-" "rollup>@rollup/rollup-openbsd-x64": "-" "rollup>@rollup/rollup-openharmony-arm64": "-" "rollup>@rollup/rollup-win32-arm64-msvc": "-" "rollup>@rollup/rollup-win32-ia32-msvc": "-" "rollup>@rollup/rollup-win32-x64-gnu": "-" "rollup>@rollup/rollup-win32-x64-msvc": "-" "@expo/ngrok-bin>@expo/ngrok-bin-darwin-arm64": "-" "@expo/ngrok-bin>@expo/ngrok-bin-darwin-x64": "-" "@expo/ngrok-bin>@expo/ngrok-bin-freebsd-ia32": "-" "@expo/ngrok-bin>@expo/ngrok-bin-freebsd-x64": "-" "@expo/ngrok-bin>@expo/ngrok-bin-linux-arm64": "-" "@expo/ngrok-bin>@expo/ngrok-bin-linux-arm": "-" "@expo/ngrok-bin>@expo/ngrok-bin-linux-ia32": "-" "@expo/ngrok-bin>@expo/ngrok-bin-sunos-x64": "-" "@expo/ngrok-bin>@expo/ngrok-bin-win32-ia32": "-" "@expo/ngrok-bin>@expo/ngrok-bin-win32-x64": "-" # drizzle-kit uses esbuild internally on an older version that's vulnerable, this overrides it "@esbuild-kit/esm-loader": "npm:tsx@^4.21.0" esbuild: "0.27.3"12345678910111213141516171819202122232425{ "compilerOptions": { "isolatedModules": true, "lib": ["es2022"], "module": "esnext", "moduleResolution": "bundler", "noEmitOnError": true, "noFallthroughCasesInSwitch": true, "noImplicitOverride": false, "noImplicitReturns": true, "noUnusedLocals": false, "noImplicitAny": true, "noImplicitThis": true, "strictNullChecks": true, "strictFunctionTypes": false, "strictBindCallApply": true, "strictPropertyInitialization": true, "useUnknownInCatchVariables": true, "alwaysStrict": true, "skipLibCheck": true, "target": "es2022", "types": [], "customConditions": ["workspace"] }}12345678910111213141516171819{ "extends": "./tsconfig.base.json", "compileOnSave": false, "files": [], "references": [ { "path": "./lib/db" }, { "path": "./lib/api-client-react" }, { "path": "./lib/api-zod" }, { "path": "./lib/integrations-gemini-ai" } ]}.dockerignoreAdded+7
DockerfileAdded+28
artifacts/api-server/build.mjsAdded+125
artifacts/api-server/package.jsonAdded+33
artifacts/api-server/src/app.tsAdded+34
artifacts/api-server/src/index.tsAdded+25
artifacts/api-server/src/lib/logger.tsAdded+20
artifacts/api-server/src/routes/health.tsAdded+11
artifacts/api-server/src/routes/index.tsAdded+10
artifacts/api-server/src/routes/rasa/index.tsAdded+153
artifacts/api-server/tsconfig.jsonAdded+20
lib/api-spec/openapi.yamlAdded+207
lib/api-spec/orval.config.tsAdded+72
lib/api-spec/package.jsonAdded+11
lib/db/drizzle.config.tsAdded+14
lib/db/package.jsonAdded+25
lib/db/src/index.tsAdded+16
lib/db/src/schema/index.tsAdded+20
lib/db/src/schema/rasa_analyses.tsAdded+21
lib/db/tsconfig.jsonAdded+12
package.jsonAdded+16
pnpm-workspace.yamlAdded+159
tsconfig.base.jsonAdded+25
tsconfig.jsonAdded+19