Skip to content

Miiu64/market-shield

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

101 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Market Shield

A modern web application for market conflict detection and analysis, built with React frontend and FastAPI backend.

Tech Stack

Frontend

  • Vite
  • TypeScript
  • React
  • shadcn/ui
  • Tailwind CSS

Backend

  • FastAPI
  • Python

Prerequisites

Setup Instructions

1. Clone the Repository

git clone <repository-url>
cd market-shield

2. Backend Setup (Python/FastAPI)

Create Python Virtual Environment

python3 -m venv myenv

Activate the Virtual Environment

On macOS/Linux:

source myenv/bin/activate

On Windows:

myenv\Scripts\activate

Set Up Environment Variables

Copy the example environment file and add your API keys:

cp .env-example .env

Then edit the .env file and add your API keys:

CLAUDE_API=your_claude_api_key_here
GRONQ_API=your_groq_api_key_here
LETTA_API=your_letta_api_key_here

Install Python Dependencies

pip3 install -r requirements.txt

3. Frontend Setup (React/Vite)

Navigate to the frontend directory and install dependencies:

cd app/frontend
npm install

Running the Application

Start the Backend (FastAPI)

From the root directory, with your virtual environment activated:

fastapi dev app/backend/main.py

Alternatively, you can use uvicorn directly:

uvicorn app.backend.main:app --reload

The FastAPI backend will be available at:

  • API: http://localhost:8000
  • API Documentation (Swagger UI): http://localhost:8000/docs
  • Alternative API Documentation (ReDoc): http://localhost:8000/redoc

Start the Frontend (React)

In a new terminal, navigate to the frontend directory and start the development server:

cd app/frontend
npm run dev

The React frontend will be available at http://localhost:5173 by default.

Development

Backend Development

Make sure to keep your virtual environment activated while developing:

source myenv/bin/activate  # On macOS/Linux
# or
myenv\Scripts\activate     # On Windows

To deactivate the virtual environment when you're done:

deactivate

Frontend Development

Available scripts in the frontend directory:

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run build:dev - Build for development
  • npm run lint - Run ESLint
  • npm run preview - Preview production build

Project Structure

market-shield/
├── app/
│   ├── backend/           # FastAPI backend
│   │   └── main.py
│   ├── frontend/          # React frontend
│   │   ├── src/
│   │   ├── public/
│   │   └── package.json
│   ├── data/              # Data files
│   └── models/            # ML models
├── myenv/                 # Python virtual environment
├── requirements.txt       # Python dependencies
└── README.md

About

Market Shield is your AI-powered financial radar, tracking global conflict and trends to deliver personalized tips that help you avoid price hikes, delays, and risk before it’s too late.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors