feat: Go backend, enhanced search, new widgets, Docker deploy

Major changes:
- Add Go backend (backend/) with microservices architecture
- Enhanced master-agents-svc: reranker, content-classifier, stealth-crawler,
  proxy-manager, media-search, fastClassifier, language detection
- New web-svc widgets: KnowledgeCard, ProductCard, ProfileCard, VideoCard,
  UnifiedCard, CardGallery, InlineImageGallery, SourcesPanel, RelatedQuestions
- Improved discover-svc with discover-db integration
- Docker deployment improvements (Caddyfile, vendor.sh, BUILD.md)
- Library-svc: project_id schema migration
- Remove deprecated finance-svc and travel-svc
- Localization improvements across services

Made-with: Cursor
This commit is contained in:
home
2026-02-27 04:15:32 +03:00
parent 328d968f3f
commit 06fe57c765
285 changed files with 53132 additions and 1871 deletions

View File

@@ -2,8 +2,8 @@
FROM node:22-alpine AS builder
WORKDIR /app
COPY package.json ./
RUN --mount=type=cache,target=/root/.npm \
npm install
COPY --from=npm-cache / /tmp/npm-cache
RUN npm install --cache /tmp/npm-cache --prefer-offline --no-audit
COPY tsconfig.json ./
COPY src ./src
RUN npm run build
@@ -11,8 +11,8 @@ RUN npm run build
FROM node:22-alpine
WORKDIR /app
COPY package.json ./
RUN --mount=type=cache,target=/root/.npm \
npm install --omit=dev
COPY --from=npm-cache / /tmp/npm-cache
RUN npm install --omit=dev --cache /tmp/npm-cache --prefer-offline --no-audit
COPY --from=builder /app/dist ./dist
EXPOSE 3015
ENV PORT=3015

View File

@@ -47,7 +47,7 @@ function getTarget(path: string): { base: string; rewrite: string } | null {
if (path.startsWith('/api/v1/create') || path.startsWith('/api/v1/export')) return { base: SVC.create, rewrite: path };
if (path.startsWith('/api/v1/memory')) return { base: SVC.memory, rewrite: path };
if (path.startsWith('/api/v1/tasks')) return { base: SVC.chat, rewrite: path };
if (path.startsWith('/api/v1/templates') || path.startsWith('/api/v1/connectors') || path.startsWith('/api/v1/collections')) return { base: SVC.projects, rewrite: path };
if (path.startsWith('/api/v1/projects') || path.startsWith('/api/v1/templates') || path.startsWith('/api/v1/connectors') || path.startsWith('/api/v1/collections')) return { base: SVC.projects, rewrite: path };
if (path.startsWith('/api/v1/notifications')) return { base: SVC.notifications, rewrite: path };
if (path.startsWith('/api/v1/billing')) return { base: SVC.billing, rewrite: path };
if (path.startsWith('/api/v1/admin')) return { base: SVC.audit, rewrite: path };
@@ -99,7 +99,7 @@ async function proxyRequest(req: FastifyRequest, reply: FastifyReply, stream = f
method,
headers,
body,
signal: AbortSignal.timeout(path === '/api/chat' ? 120000 : 30000),
signal: AbortSignal.timeout(path === '/api/chat' ? 300000 : 60000),
};
const res = await fetch(fullUrl, init);
@@ -138,7 +138,7 @@ async function proxyRequest(req: FastifyRequest, reply: FastifyReply, stream = f
if (path.startsWith('/api/v1/discover')) return reply.send({ items: [] });
if (path.startsWith('/api/geo-context')) return reply.send({ country: null, city: null });
if (path.startsWith('/api/translations')) return reply.send({});
if (path.startsWith('/api/v1/weather')) return reply.send({});
if (path.startsWith('/api/v1/weather')) return reply.status(503).send({ message: 'Weather service unavailable' });
return reply.status(503).send({ error: 'Service unavailable' });
}
}