Project Info
This project did not submit a demo video on Devpost.
Inspiration
Mass layoffs always feel like lightning bolts devastating but “out-of-the-blue.” We wanted to give employees, recruiters, and policymakers foresight instead of hindsight. With WARN filings, news rumors, and tiny LLMs all in the open, we realized we could surface an objective layoff-risk score weeks or months before the pink-slips hit. That vision became Farsight.fyi.
What it does
Farsight.fyi is a hybrid AI-system web application that assesses the potential layoff risk of a company. Users enter a company name, and our system performs a multi-stage analysis in real-time: Data Aggregation: It scours the web for recent news articles and public data related to the company. Data Aggregation: It scours the web for recent news articles and public data related to the company. AI-Powered Feature Extraction: An LLM reads through the unstructured text of the articles to extract key risk factors. AI-Powered Feature Extraction: An LLM reads through the unstructured text of the articles to extract key risk factors. Predictive Modeling: These extracted features are fed into a CatBoost machine learning model, which calculates a quantitative risk score. Predictive Modeling: These extracted features are fed into a CatBoost machine learning model, which calculates a quantitative risk score. Insightful Reporting: The application presents the user with a final risk level, a detailed explanation of the contributing factors, and a summary of the key data points that influenced the score, all delivered through a clean and intuitive user interface. Insightful Reporting: The application presents the user with a final risk level, a detailed explanation of the contributing factors, and a summary of the key data points that influenced the score, all delivered through a clean and intuitive user interface.
How we built it
Frontend: Built using React and TypeScript, using Vite for local dev, Tailwind for styling and various components from shadcn/ui Backend: Python and FastAPI Real-time Communication: Socket.IO Web Scraping: Beautiful Soup and Selenium AI & Machine Learning: Claude 4 and a CatBoost model Database: Simple SQLite database
Challenges we ran into
Prompt Engineering: Designing prompts that could consistently and accurately extract specific, structured features from the diverse and noisy text of news articles required extensive iteration and refinement. Managing Asynchronous Tasks: Building a non-blocking, real-time user experience was complex. We had to carefully manage long-running analysis tasks on the backend to prevent timeouts and provide a smooth flow of status updates to the user via Socket.IO. Data Noise Reduction: Sifting through the vast amount of irrelevant information in news articles to isolate the true signals of company health was a significant data processing challenge.
Accomplishments we're proud of
Hybrid AI System: We successfully created a powerful pipeline that combines the natural language understanding of an LLM with the predictive power of a traditional gradient-boosting model. This allows us to create structured insights from unstructured data effectively. End-to-End Real-time Analysis: We are proud of building a complete, end-to-end system that can perform a complex, multi-stage analysis and present the results to the user in a matter of seconds, all while showing live progress. Intuitive User Experience: We designed a clean, responsive, and intuitive interface that makes a complex data analysis process feel simple and accessible to any user.
What we learned
Throughout this project, we gained deep insights into the practical application of modern AI and web technologies. We learned how to effectively chain different AI models together, the nuances of prompt engineering for data extraction, and the best practices for building responsive, asynchronous web applications with FastAPI and React.
What's next
Broader Data Integration: We plan to incorporate more diverse data sources, including financial reports (SEC filings), employee sentiment from sites like Glassdoor, and public market data. Historical Trend Analysis: A key upcoming feature will be the ability to track a company's risk score over time, providing users with a historical perspective on its stability. User Accounts & Watchlists: We will introduce user accounts, allowing individuals to save a personalized watchlist of companies and receive notifications when a company's risk profile changes significantly. API Access: To extend our reach, we plan to offer a public API that will allow other developers and services to integrate our layoff risk analysis into their own applications.
Farsight.fyi Dashboard
A responsive, AI-powered dashboard for analyzing company layoff risks. Built with React, Vite, TypeScript, and Tailwind CSS.
Features
- Risk Analysis: Visual gauge showing layoff risk score (0-100)
- Factor Analysis: SHAP-style visualization of contributing factors
- Trend Tracking: 30-day sparkline chart showing risk history
- Dark Mode: Toggle between light and dark themes
- Recent Lookups: Quick access to recently searched companies
- Responsive Design: Mobile-first approach with adaptive layouts
Getting Started
Prerequisites
- Node.js (version 16 or higher)
- npm or yarn
Installation
- Clone the repository:
git clone <repository-url>
cd layoff-radar
- Install dependencies:
npm install
- Set up environment variables:
cp .env.example .env
# Edit .env with your API configuration
- Start the development server:
npm run dev
- Open your browser and visit
http://localhost:5173
API Integration
The dashboard expects a REST API endpoint at /score/<company> that returns:
{
"company": "Tesla",
"risk": 82,
"top_factors": [
{"name": "Executive exits", "value": 0.34},
{"name": "Layoff-intent news", "value": 0.28},
{"name": "Funding cushion", "value": -0.05}
],
"history": [
{"date": "2025-06-11", "risk": 78}
],
"explanation": "High risk mainly because..."
}
Configuration
Set your API base URL in the .env file:
VITE_API_BASE_URL=https://your-api-domain.com
Building for Production
npm run build
The built files will be in the dist directory.
Technologies Used
- React - UI framework
- Vite - Build tool and dev server
- TypeScript - Type safety
- Tailwind CSS - Styling
- Recharts - Data visualization
- Radix UI - Accessible components
- Lucide React - Icons
License
MIT License
Analysis
View
Metric
- 16
- 11
- 7
- 4
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- AnthropicIn code
- CSSIn code
- FastAPIIn code
- HTMLIn code
- JavaScriptIn code
- PythonIn code
- ReactIn code
- Tailwind CSSIn code
- TypeScriptIn code
9 of 9 appear in the indexed code.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
229 KB
Source files
87
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
Jam-Cai/layoff-radar
112 files · 4.2 MB · @ 5477b71
Structure
Interface
58 files · 52%Screens, components and styles rendered to the user.
Application logic
30 files · 27%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript83%
- Python14%
- CSS1%
- Markdown1%
- JavaScript1%
- HTML0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
requirements.txt
pypi · 77- aiohappyeyeballs
- aiohttp
- aiosignal
- aiosqlite
- annotated-types
- anthropic
- anyio
- attrs
- beautifulsoup4
- bidict
- catboost
- certifi
- cffi
- charset-normalizer
- click
- colorama
- contourpy
- cycler
- +59 more
client/package.json
npm · 70- @hookform/resolvers
- @radix-ui/react-accordion
- @radix-ui/react-alert-dialog
- @radix-ui/react-aspect-ratio
- @radix-ui/react-avatar
- @radix-ui/react-checkbox
- @radix-ui/react-collapsible
- @radix-ui/react-context-menu
- @radix-ui/react-dialog
- @radix-ui/react-dropdown-menu
- @radix-ui/react-hover-card
- @radix-ui/react-label
- @radix-ui/react-menubar
- @radix-ui/react-navigation-menu
- @radix-ui/react-popover
- @radix-ui/react-progress
- @radix-ui/react-radio-group
- @radix-ui/react-scroll-area
- +52 more
package.json
npm · 1- axios
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.