Skip to content
FineconePublic

About

Cognitive connection of frontend and backend

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

Finecone

AI-powered financial analysis and report generation system for the Korean market.

About This Project

Finecone is an AI system that analyzes DART financial statements and analyst reports to provide tailored answers to user queries. This repository contains the source code for both the backend and frontend components of the application.

Example:

  • Query: "Generate a report on Samsung Electronics' business overview and key products."
  • Result: A professionally structured corporate analysis report in Markdown format.

Architecture

This project is a monorepo containing two separate applications:

  • backend/: A Python-based AI backend powered by FastAPI and LangGraph. It handles the core logic of report generation and question answering.
  • frontend/: A TypeScript-based web application built with Next.js, providing the user interface.

For detailed setup and usage instructions, please refer to the specific README file within each directory.

Quick Start

Prerequisites

  • Node.js (v18 or later recommended)
  • Python (3.11 or later)
  • pnpm (Node.js package manager)
  • uv (Python package manager, recommended)

1. Clone the Repository

git clone https://github.com/Finecone/Finecone.git
cd Finecone

2. Set Up & Run the Backend

For detailed instructions, see the backend README.

cd backend

# Create and activate virtual environment
uv venv
source .venv/bin/activate  # macOS/Linux
# .venv\Scripts\activate   # Windows

# Install dependencies
uv pip install -e ".[test]"

# Set up environment variables
cp .env.example .env
# Add your API keys to the .env file

# Run the server
uvicorn src.finecone.api.main:app --reload --port 8000

3. Set Up & Run the Frontend

For detailed instructions, see the frontend README.

# Navigate to the frontend directory from the root
cd frontend

# Install dependencies
pnpm install

# Run the development server
pnpm dev

Once both servers are running, you can access the web application at http://localhost:3000.

Connecting Frontend and Backend

For the frontend and backend to communicate, they rely on a simple network configuration:

  • Backend API: The Python backend (FastAPI) runs on http://localhost:8000 by default. It is configured with CORS (Cross-Origin Resource Sharing) to accept requests specifically from the frontend's default address (http://localhost:3000).

  • Frontend Configuration: The Next.js frontend needs to know the backend's address. This is configured using an environment variable in the frontend/.env file:

    NEXT_PUBLIC_BACKEND_URL=http://localhost:8000
    

If you change the port for the backend, you must update the NEXT_PUBLIC_BACKEND_URL variable in the frontend's .env file to match.

About

Cognitive connection of frontend and backend

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors