Skip to content

francinii/governomicsCR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GovernomicsCR Project

This repository contains both the backend (FastAPI) and frontend (Next.js) for the GovernomicsCR application.

This study introduces GovernomicsCR, an AI driven analytical system designed to examine and compare Costa Rica’s economic growth across presidential administrations. The system integrates structured datasets, a multi agent pipeline orchestrated with LangGraph, Langchain, and a FastAPI backend for automated report generation. Additionally, a React based frontend using the shadcnui component library provides an interactive interface that allows users to formulate queries, select predefined questions, and receive structured analytical outputs.

GovernomicsCR processes historical GDP data, synthesizes sectoral, industrial, regime based, and expenditure related indicators, and produces coherent analytical reports. The results show the feasibility of using large language models to support economic monitoring and policy analysis.


1. Project Structure

Backend (be_government)

  • .env: Environment variables (not tracked by Git)
  • requirements.txt: Python dependencies
  • app/:
    • agents/
    • api/
    • clients/
    • core/
    • data/
    • models/
    • pipelines/
    • prompts/
    • services/
    • utils/

Frontend (fe_government)

  • Next.js project bootstrapped with create-next-app
  • app/: Main pages and components
  • assets/: Static resources (CSS, images, etc.)
  • notebooks/: Jupyter notebooks for analysis
  • scripts/: Utility scripts
  • data/: Frontend data files

2. Installation & Setup

Backend

2.1. Create and activate a virtual environment

python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activate

2.2. Install dependencies

pip install -r requirements.txt

2.3. Configure environment variables

Create a .env file in the root of be_government with:

GROQ_API_KEY="your_groq_api_key"
OPENAI_API_KEY="your_openai_api_key"

2.4. Run the backend

uvicorn app.main:app --reload

Frontend

2.1. Install dependencies

cd fe_government
npm install

2.2. Run the frontend

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 in your browser to view the app.


3. Usage & Development

Backend

  • Entry point: main.py
  • Modify logic in app/ and add services, agents, or endpoints as needed
  • Run tests in tests/

Frontend

  • Edit pages in app/page.tsx or components in app/
  • Changes are reflected automatically in the browser

4. Resources & Documentation

Backend

Frontend


5. Deployment

Backend

  • Run locally using Uvicorn (see above)
  • For production, deploy using your preferred Python hosting solution

Frontend

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors