How rehmat123/jira-agent works
Project type and purpose
• This is a full-stack “JIRA AI Agent” application.
• Its purpose is to provide an intelligent interface (React frontend) backed by an Express/Node.js API that uses the LangChain framework and OpenAI to automate JIRA ticket creation, updates, time tracking, and sprint management via natural-language commands.
File structure
Top-level directories and files:
• backend/ ── Node.js/Express code, LangChain integrations, JIRA tools, schemas, and server entrypoint (server.ts)
• src/ ── React + TypeScript frontend app, UI components, CSS, tests
• public/ ── Static assets (index.html, manifest, robots) served to the browser
• Configuration files: tsconfig.json (root & backend), pnpm-lock.yaml, package.json, .env.example, tailwind.config.js, postcss.config.js
Patterns & architectural choices:
• Separation of concerns between frontend (UI) and backend (API)
• In backend: tools/jira (JIRA API adapter), schemas (validation), templates (LangChain prompt templates)
• No internal database—state is ephemeral or managed externally; relies on external services (JIRA REST API, OpenAI API)
Key insights from the README
• Frontend: React + TypeScript + Tailwind CSS
• Backend: Express + LangChain + OpenAI + JIRA REST API
• Features: natural-language ticket management, time tracking, sprint dashboards
• Deployment: frontend serves on :3001, backend on :5001
• No mention of a database—heavy use of external APIs
1. User (Browser)
2. React Frontend (SPA)
• UI Components (src/components)
• Static hosting (public/)
3. API Gateway / Express Backend (backend/src/server.ts)
4. LangChain Orchestrator (backend/src/templates & chain setup)
5. JIRA Adapter (backend/src/tools/jira)
6. OpenAI Integration (LangChain → OpenAI API)
7. External Services:
• JIRA REST API
• OpenAI API
8. Configuration & Environment (.env variables)
b. Relationships & interactions:
• Browser ↔ React Frontend (HTTPS, WebSocket for real-time updates)
• Frontend → Backend API (HTTP REST calls)
• Backend → LangChain engine (in-process orchestration)
• LangChain Node calls:
– JIRA Adapter → JIRA REST API
– OpenAI Client → OpenAI API
• Responses flow back through each layer to the user
c. Architectural patterns & principles:
• Client-Server separation (SPA + API)
• Layered architecture:
– Presentation Layer (React)
– API Layer (Express routes/controllers)
– Business Logic / Orchestration Layer (LangChain chains & templates)
– Integration Layer (JIRA & OpenAI adapters)
• Configuration externalized via .env
• Type safety with TypeScript end-to-end
• Modular design: tools/, schemas/, templates/, components/
d. Technologies & frameworks labeling:
• React, Tailwind CSS
• Express.js, Node.js
• LangChain framework
• OpenAI API, JIRA REST API
• pnpm, Jest, ESLint/Prettier
Detailed capture of essential elements
• Static asset hosting (public/) separate from the React build output.
• LangChain “templates/system.ts” and “schemas/jira.schema.ts” as part of the orchestration layer.