ragsume-ui is a modern web UI built with Next.js and TypeScript that provides an interactive interface for the RAGsume project. It includes a chat widget, loading spinners, and a job‑description matcher component, all styled with Tailwind CSS and ready for deployment on Vercel or any Node.js server.
- Prerequisites
- Getting Started
- Project Structure
- Key Components
- Environment Variables
- Building for Production
- Testing
- Deployment
- Contributing
- License
Make sure you have the following installed on your machine:
| Tool | Minimum Version |
|---|---|
| Node.js | 20.x |
| npm | 10.x (comes with Node) |
| Git | any recent version |
The project uses Next.js 14 with the new app/ directory structure, so a recent Node version is required.
git clone https://github.com/your-org/ragsume-ui.git
cd ragsume-uinpm cinpm ci ensures a clean, reproducible install based on package-lock.json.
npm run devOpen your browser at http://localhost:3000 – the app should load with hot‑module reloading enabled.
app/ # Next.js app router (pages, layout, globals)
├─ layout.tsx # Root layout with global CSS and metadata
├─ page.tsx # Home page entry point
└─ globals.css # Global Tailwind styles
components/ # Re‑usable UI components
├─ chat/ # Chat widget and related UI
│ ├─ ChatWidget.tsx
│ ├─ LoadingSpinner.tsx
│ ├─ MessageBubble.tsx
│ └─ SourceTrace.tsx
├─ matcher/ # JDMatcher component for job‑description matching
│ └─ JDMatcher.tsx
lib/ # Helper utilities and API wrappers
├─ api.ts # Functions that call the backend RAG API
├─ sse.ts # Server‑sent events handling
└─ types.ts # TypeScript type definitions
public/ # Static assets (logo, favicons, etc.)
The main chat interface located at components/chat/ChatWidget.tsx. It handles user input, displays messages, and streams responses from the backend via Server‑Sent Events.
Simple spinner component (components/chat/LoadingSpinner.tsx) shown while awaiting a response.
Component (components/matcher/JDMatcher.tsx) that lets users paste a job description and get a similarity score against a resume.
Create a .env.local file at the project root for any secret keys required by the backend API. Example:
NEXT_PUBLIC_API_BASE_URL=https://api.ragsume.com
The UI reads NEXT_PUBLIC_ prefixed variables at build time.
npm run build # Generates an optimized production build in .next
npm start # Starts the production serverThe build step includes TypeScript type‑checking, ESLint linting, and CSS minification.
The repository currently does not include a test suite, but you can add Jest or React Testing Library tests under a __tests__/ directory. A typical command would be:
npx jestDeploy to Vercel (recommended) by connecting the GitHub repository and selecting the default build command (npm run build). For other platforms, ensure the NODE_ENV is set to production and serve the .next directory with a Node server.
- Fork the repository.
- Create a feature branch (
git checkout -b feature/awesome-feature). - Make your changes and ensure the app still builds.
- Open a Pull Request describing the changes.
Please follow the existing code style (Prettier + ESLint) and include TypeScript typings for any new modules.
This project is licensed under the MIT License – see the LICENSE file for details.