Skip to content

Artypuppet/RegAlpha-Front

Repository files navigation

RegAlpha Frontend

React + TypeScript frontend for the RegAlpha Legislative Risk Engine.

Setup

  1. Install Node.js 20+ (using nvm):

    nvm install 20
    nvm use 20
  2. Install dependencies:

    npm install
  3. Configure environment:

    cp .env.example .env
    # Edit .env with your backend URL (default: http://localhost:8000)
  4. Run development server:

    npm run dev

The app will be available at http://localhost:5173

Tech Stack

  • React 18 + TypeScript (strict mode)
  • Vite (build tool)
  • Tailwind CSS (styling)
  • TanStack Query (data fetching & caching)
  • React Flow (graph visualization)
  • Dagre (graph layout algorithm)
  • Lucide React (icons)

Project Structure

src/
├── api/          # API client and TypeScript types
├── hooks/        # TanStack Query custom hooks
├── components/   # React components
└── utils/         # Helper functions and formatters

Features

  • Company Risk Analysis: View aggregate risk scores from multiple legislative risks
  • Knowledge Graph: Interactive visualization of company relationships using React Flow
  • Legislative Risks: Display active legislation affecting selected companies
  • Real-time Data: Integrated with Polymarket probabilities for risk assessment

Development

  • Build: npm run build
  • Preview: npm run preview
  • Lint: npm run lint

Environment Variables

  • VITE_API_BASE_URL: Backend API base URL (default: http://localhost:8000)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages