出品者:Kai

A SQLite database schema and WAL (write-ahead log) artifact for an AI-powered product recommendation engine, storing cached products with style, occasion, color, and size tags alongside user style profiles and persisted recommendation sets with line items. Includes a feedback table for capturing user responses to recommendations, with indexed queries optimized for per-user history retrieval. Built for TypeScript backend developers integrating personalized shopping or catalog recommendation features into their applications, licensed under the Tetrees License.
Backend 8F2X is a TypeScript backend service that powers an AI-driven product recommendation engine. It manages a local SQLite database to cache products, store user style profiles, generate outfit/product recommendations, track recommendation line items, and collect user feedback — all optimized for fast, personalized retrieval.
| Layer | Technology |
|---|---|
| Language | TypeScript |
| Database | SQLite (WAL mode) |
| Storage Format | Local file (data/ai-recs.sqlite) |
better-sqlite3 or @libsql/client)npm install
The SQLite database file is located at:
data/ai-recs.sqlite
The WAL (Write-Ahead Log) mode is active, indicated by the presence of ai-recs.sqlite-shm and ai-recs.sqlite-wal files. Ensure these files are kept together and are not split across deployments.
npm run dev # Development
npm run build # Compile TypeScript
npm start # Production
products_cache| Column | Type | Notes |
|---|---|---|
product_id | TEXT PK | Unique product identifier |
title | TEXT | Product name |
price | REAL | Default 0 |
currency | TEXT | Default USD |
in_stock | INTEGER | Boolean 0/1 |
style_tags | TEXT | JSON array |
occasion_tags | TEXT | JSON array |
colors | TEXT | JSON array |
sizes | TEXT | JSON array |
item_role | TEXT | Default other |
image_url | TEXT | Optional |
updated_at | TEXT | Auto timestamp |
user_profile_cache| Column | Type | Notes |
|---|---|---|
user_id | TEXT PK | |
preferences | TEXT | JSON object |
style_profile | TEXT | JSON object |
updated_at | TEXT | Auto timestamp |
recommendations| Column | Type | Notes |
|---|---|---|
recommendation_id | TEXT PK | |
user_id | TEXT | |
title | TEXT | |
summary | TEXT | Optional |
total_price | REAL | |
matching_reason | TEXT | Optional |
created_at | TEXT | Auto timestamp |
recommendation_items| Column | Type | Notes |
|---|---|---|
recommendation_item_id | TEXT PK | |
recommendation_id | TEXT | FK → recommendations |
product_id | TEXT | |
variant_id | TEXT | Optional |
item_role | TEXT | Default other |
sort_order | INTEGER | Default 0 |
recommendation_feedback| Column | Type | Notes |
|---|---|---|
feedback_id | TEXT PK | |
user_id | TEXT | |
recommendation_id | TEXT | FK → recommendations |
feedback_type | TEXT | e.g. liked, dismissed |
created_at | TEXT | Auto timestamp |
Specific HTTP routes are not visible in the provided source. Endpoint documentation will depend on the router layer built on top of this data layer. The schema supports the following logical operations:
| Action | Description |
|---|---|
| Upsert product | Cache or refresh product data |
| Upsert user profile | Store or update user style preferences |
| Create recommendation | Generate and persist a new AI recommendation set |
| Add recommendation items | Attach products to a recommendation |
| Submit feedback | Record user response to a recommendation |
| Fetch recommendations | Query by user ID, ordered by recency |
Tetrees License
隔離されたサンドボックスを起動しサーバー側で実行 — ローカル設定不要。
サンドボックス検証が完了し、検出された実行経路は合格しました。
This Express backend / api completed archive review. Structure, dependency manifests, documentation, functional source, and common risk patterns were checked by the Tetrees verification pipeline; runtime phases are stated separately.
Deterministic AVCP artifact review
パイプライン avcp-2026-08-04.1 · SHA-256 8d33f7d4b10028ed…
This version-scoped review deterministically inspects the submitted archive for structure, dependencies, documentation, functional source, and common malicious or high-risk signals. Build and test phases are reported as passed only after an isolated sandbox audition. It is not a guarantee of perfect security.
レビュー日 2026年8月4日
完全なインストールガイドと統合プロンプトは購入後に解放されます。
この製品をお使いのAI IDE・Webビルダー・クラウドIDEに直接取り込みます。
Tetreesを対応AI IDEに接続し、所有製品の一覧取得と検証済みZIPの取得を、販売者のアップロード権限を公開せずに行えます。
レビュー 24件
Better than I expected. Used this store / POS to sell my storefront and it cut days off the build.
Great starting point. Picked up "AI Recommendation & Activity Backend Kit" for a client storefront — Handles the edge cases I usually have to patch myself. Minor tweaks needed for my use case but nothing broke.
Rock solid so far. Setup was a single command and it ran first try, and the walkthrough got me running in minutes. Support answered my question fast.
Worth every point. As someone who sells these all day, setup was a single command and it ran first try.
Better than I expected. Dropped this store / POS straight into the storefront; the walkthrough got me running in minutes.
Saved me a ton of time. As someone who sells these all day, the code is readable and the structure makes sense. Would buy from this seller again.
Dropped it into my stack and it just worked. Dropped this store / POS straight into the storefront; examples matched the actual API, which is rare. Would buy from this seller again.
This is a keeper. As someone who sells these all day, zero mystery dependencies, everything is documented.
Worth every point. Picked up this store / POS for a client storefront — TypeScript types are actually accurate, no fighting the compiler.
Rock solid so far. No spaghetti — the folder layout is sane, and examples matched the actual API, which is rare.
Sign in to join the discussion
Loading discussion…