Skip to content

Conversation

Copy link

Copilot AI commented Dec 6, 2025

Builds a production-ready Slack bot with retrieval-augmented generation over Slack conversations and documentation, plus a Next.js management dashboard.

Backend (Python 3.14 + FastAPI + Slack Bolt)

  • FastAPI server with REST endpoints for questions (/api/ask), document indexing, and message retrieval
  • Slack Bolt integration handling @mentions, DMs, and /wingman slash command
  • RAG pipeline: LangChain + OpenRouter/OpenAI for LLM, ChromaDB for vector search, PostgreSQL for persistence
  • Socket Mode support for local dev, HTTP mode ready for production
  • uv package manager for fast, reliable Python dependency installation

Core flow:

# backend/app/rag.py
def generate_response(question: str, channel_id: str = None):
    results = vector_store.similarity_search(question)  # Semantic retrieval
    context = build_context(results, channel_id)
    return llm.invoke(prompt.format(context=context, question=question))

Frontend (Next.js 14 + TypeScript ES2022)

  • Dashboard with question interface, document viewer, message browser
  • API client with TypeScript types
  • Tailwind CSS v4.1 with modern CSS-based configuration using @theme syntax
  • Node 24 runtime, responsive design

Infrastructure

  • compose.yaml orchestrating 5 services: backend API, bot worker, frontend, PostgreSQL, ChromaDB
  • Multi-stage Dockerfiles optimized for production with Python 3.14 and Node 24
  • Environment file separation: Service-specific .env.* files (.env.postgres, .env.chroma, .env.backend, .env.frontend)
  • .env.example with all Slack token types documented (xoxb/xoxp/xoxc/xoxd)

Documentation

  • SLACK_AUTH.md: Complete reference for Slack token types, scopes, security practices
  • SETUP.md: End-to-end setup from Slack app creation through troubleshooting
  • docs/getting-started.md: 5-minute deployment guide
  • CONTRIBUTING.md: Development workflow, testing, style guidelines

Tooling

  • mise.toml for unified task runner and tool version management (Python 3.14, Node 24)
  • Tasks: mise run up, mise run logs-bot, mise run test-backend, etc.
  • pytest setup with basic API tests

The bot indexes Slack threads automatically when mentioned, retrieves relevant context via semantic search, and generates responses grounded in workspace knowledge.

Original prompt

Create an OSS monorepo for a Slack support assistant: Python FastAPI + Slack Bolt backend (RAG over Slack threads/docs via LangChain + OpenRouter) and Next.js/TS dashboard. Include Postgres + Chroma, Dockerfiles and docker-compose for local eval, .env examples, and docs (README, SETUP, SLACK_AUTH with xoxp/xoxb/xoxc/xoxd auth options).


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Dec 6, 2025
Copilot AI and others added 2 commits December 6, 2025 13:12
Co-authored-by: johnnyhuy <27847622+johnnyhuy@users.noreply.github.com>
…TART, tests, and validation script

Co-authored-by: johnnyhuy <27847622+johnnyhuy@users.noreply.github.com>
Copilot AI changed the title [WIP] Create OSS monorepo for Slack support assistant Implement OSS monorepo for Slack support assistant with RAG-enabled backend and dashboard Dec 6, 2025
Copilot AI requested a review from johnnyhuy December 6, 2025 13:22
Copy link
Contributor

@johnnyhuy johnnyhuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot use mise.toml

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compose.yaml

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use use uv instead of pip install

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated backend Dockerfile to use uv for package installation. (4dc951d)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

node 24

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to Node 24. (4dc951d)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use tailwindcss v4.1 config

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migrated to Tailwind CSS v4.1 with @theme syntax in globals.css. Removed tailwind.config.ts and postcss.config.js. (4dc951d)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a later ts target

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated TypeScript target to ES2022. (4dc951d)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compose.yaml

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Renamed to compose.yaml. (4dc951d)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move env vars to .env files

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created separate .env files (.env.postgres, .env.chroma, .env.backend, .env.frontend) and updated compose.yaml to use env_file. (4dc951d)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use mise.toml instead to handle tasks and tool deps

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced with mise.toml containing all tasks and tool dependencies (Python 3.14, Node 24). (4dc951d)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move to ./docs/getting-started.md

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to docs/getting-started.md. (4dc951d)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

python 3.14

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to Python 3.14. (4dc951d)

… Tailwind v4.1, and env_file

Co-authored-by: johnnyhuy <27847622+johnnyhuy@users.noreply.github.com>
Copy link
Author

Copilot AI commented Dec 7, 2025

@copilot use mise.toml

Done! Created mise.toml with Python 3.14 and Node 24 configured, plus all tasks from the Makefile. (4dc951d)

Co-authored-by: johnnyhuy <27847622+johnnyhuy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants