ait
Personal AI platform built as a pnpm monorepo. Connects to external services (GitHub, Spotify, Linear, Notion, Slack, Google) via OAuth, syncs data through an ETL pipeline, stores embeddings in Qdrant, and provides RAG-powered AI responses via Ollama.
Preferences
- Package manager: pnpm (corepack, workspace protocol)
- Linter/formatter: Biome 1.9 — 2-space indent, single quotes, semicolons
- Error handling:
Result<T, E> pattern with ok() / err() — never throw in business logic
- Testing: Node.js native
node:test with describe/it, borp runner, c8 coverage
- Naming: PascalCase classes,
I prefix interfaces, camelCase methods, SCREAMING_SNAKE constants, kebab-case files
- Type files:
.types.ts, spec files: .spec.ts
- All packages: scoped
@ait/*
References
| Category |
Reference |
Description |
| Core |
core-architecture |
Layered architecture, data flow, package structure |
| Core |
core-entity-types |
Normalized entity types with __type strings |
| Core |
core-result-type |
Result<T,E>, ok(), err() usage patterns |
| Features |
features-oauth |
Encrypted credentials, factory pattern, token refresh |
| Features |
features-rag |
Qdrant, multi-query retrieval, reranking, streaming |
| Features |
features-scheduler |
BullMQ, priority queues, repeatable jobs |
| Features |
features-connectors |
GitHub, Spotify, Linear, Notion, Slack, Google connectors |
| Best Practices |
best-practices-testing |
Node.js native test runner, Docker services, c8 coverage |
Quick Reference
# Development
pnpm dev # Start all packages in parallel
pnpm start:services # Docker: PostgreSQL, Qdrant, Redis, Ollama, MinIO
pnpm test # Run all tests (starts test services automatically)
pnpm migrate # Run Drizzle migrations
pnpm generate:openapi # Generate OpenAPI specs for connectors
# Ports
# PostgreSQL: 5432 | Qdrant: 6333 | Redis: 6379
# Ollama: 11434 | MinIO: 9090 | Langfuse: 3333
# Gateway: 3000 | UIt (UI): 5173
# Models (env)
GENERATION_MODEL=gemma3:latest
EMBEDDINGS_MODEL=mxbai-embed-large:latest
// Result pattern
const result = await someOperation();
if (result.ok) {
console.log(result.value);
} else {
console.error(result.error);
}
// Connector factory
const service = connectorServiceFactory.getServiceByConfig(configId, userId);
1---2name: ait3description: Knowledge pack for AIt — a personal AI platform with monorepo architecture, RAG pipeline, OAuth connectors, and BullMQ scheduling.4metadata:5 author: mateonunez6 version: 1.0.07 source: https://skillmd.com/skills/aibot88/ait8 upstream: private9 stack: pnpm monorepo, Fastify, Drizzle ORM, Qdrant, Ollama, BullMQ, React + Vite10---1112# ait1314Personal AI platform built as a pnpm monorepo. Connects to external services (GitHub, Spotify, Linear, Notion, Slack, Google) via OAuth, syncs data through an ETL pipeline, stores embeddings in Qdrant, and provides RAG-powered AI responses via Ollama.1516## Preferences1718- **Package manager**: pnpm (corepack, workspace protocol)19- **Linter/formatter**: Biome 1.9 — 2-space indent, single quotes, semicolons20- **Error handling**: `Result<T, E>` pattern with `ok()` / `err()` — never throw in business logic21- **Testing**: Node.js native `node:test` with `describe`/`it`, `borp` runner, `c8` coverage22- **Naming**: PascalCase classes, `I` prefix interfaces, camelCase methods, SCREAMING_SNAKE constants, kebab-case files23- **Type files**: `.types.ts`, spec files: `.spec.ts`24- **All packages**: scoped `@ait/*`2526## References2728| Category | Reference | Description |29|----------|-----------|-------------|30| Core | [core-architecture](references/core-architecture.md) | Layered architecture, data flow, package structure |31| Core | [core-entity-types](references/core-entity-types.md) | Normalized entity types with `__type` strings |32| Core | [core-result-type](references/core-result-type.md) | `Result<T,E>`, `ok()`, `err()` usage patterns |33| Features | [features-oauth](references/features-oauth.md) | Encrypted credentials, factory pattern, token refresh |34| Features | [features-rag](references/features-rag.md) | Qdrant, multi-query retrieval, reranking, streaming |35| Features | [features-scheduler](references/features-scheduler.md) | BullMQ, priority queues, repeatable jobs |36| Features | [features-connectors](references/features-connectors.md) | GitHub, Spotify, Linear, Notion, Slack, Google connectors |37| Best Practices | [best-practices-testing](references/best-practices-testing.md) | Node.js native test runner, Docker services, c8 coverage |3839## Quick Reference4041```bash42# Development43pnpm dev # Start all packages in parallel44pnpm start:services # Docker: PostgreSQL, Qdrant, Redis, Ollama, MinIO45pnpm test # Run all tests (starts test services automatically)46pnpm migrate # Run Drizzle migrations47pnpm generate:openapi # Generate OpenAPI specs for connectors4849# Ports50# PostgreSQL: 5432 | Qdrant: 6333 | Redis: 637951# Ollama: 11434 | MinIO: 9090 | Langfuse: 333352# Gateway: 3000 | UIt (UI): 51735354# Models (env)55GENERATION_MODEL=gemma3:latest56EMBEDDINGS_MODEL=mxbai-embed-large:latest57```5859```typescript60// Result pattern61const result = await someOperation();62if (result.ok) {63 console.log(result.value);64} else {65 console.error(result.error);66}6768// Connector factory69const service = connectorServiceFactory.getServiceByConfig(configId, userId);70```