This repo contains a full MERN stack scaffold:
frontend/: Next.js + TypeScript + Tailwind + shadcn-style componentsbackend/: Node.js + Express + TypeScript API (dockerized)
cd frontend
npm install
npm run devcd backend
npm install
npm run devdocker build -t dev-bugger-api ./backend
# or
cd backend && docker compose up --buildCopy the example files and fill values:
frontend/env.example→frontend/.env.localbackend/env.example→backend/.env
Base URL: http://localhost:8000/api/v1
curl http://localhost:8000/api/v1/healthIngest a single JSON file (or a directory of JSON files).
curl -X POST \\
http://localhost:8000/api/v1/ingest \\
-H "Content-Type: application/json" \\
-d '{"path":"backend/src/data/daniel_lin_sessions (1).json"}'Response:
{"status":"ok","path":"backend/src/data/daniel_lin_sessions (1).json"}Search across embedded segments using vector search.
curl http://localhost:8000/api/v1/search \
-H "Content-Type: application/json" \
-d '{"query":"websocket","limit":5}'Request body fields:
query(required,qalso accepted)limitusernameprojectNameproducerproducerVersionschemaVersiontaskDescription
Example with filters:
curl http://localhost:8000/api/v1/search \
-H "Content-Type: application/json" \
-d '{"query":"logging","username":"daniellin","projectName":"video-streamer","limit":5}'
### AI answer (RAG)
The AI endpoint runs a tool-call to vector search and answers based on results.
```bash
curl http://localhost:8000/api/v1/ai \
-H "Content-Type: application/json" \
-d '{"q":"what did andrewwang ask about S3 uploads?","username":"andrewwang","limit":3}'Sample questions:
- "what did andrewwang ask about S3 uploads?"
- "summarize daniel's conversations about websockets"
- "show Diana's sessions about authentication failures"
- "what changes were suggested for batch encoding performance?"
## Scripts
Backend:
- `dev`: ts-node-dev with watch
- `build`: tsc build
- `start`: run compiled JS
- `pipeline`: run ingestion pipeline via `src/index.ts` (use `--file <path>`)
Example:
```bash
cd backend
npm run pipeline -- --file src/data/daniel_lin_sessions\\ \\(1\\).json
This scaffold is intentionally minimal. Add your own routes, controllers, and UI pages as needed.