This is the WebSVF repository that has all latest code for WebSVF 6.0.
- Modern React-based frontend using Vite
- Python-based backend using FastAPI
- Support for multiple SVF analysis tools
- Real-time code analysis and graph visualization
- Dark/Light mode support
- Session management for saving and sharing work
- CodeGPT integration for AI-assisted learning
Ensure you have the following installed on your machine:
- Clang
- Python 3.10+
- CMake 3.23+
- Node.js 20.x (via nvm recommended)
You can verify your installations:
python3 --version
cmake --version
clang --version
node -v
cd api
docker build -t svf-backend . && docker run svf-backend
- Install Python-SVF:
git clone "https://github.com/SVF-tools/SVF-Python.git"
cd SVF-Python
bash ./build.sh
# You may also need to install Python Wheels
python3 -m pip install dist/*.whl
- Install backend dependencies:
# Navigate to the api directory
cd api
python3 -m pip install -r requirements.txt
- Run the backend server:
python3 -m uvicorn app:app --host 0.0.0.0 --port 8080
To ensure code quality, run the following linting commands in the api
directory:
# Install linting tools if not already
cd api
python3 -m pip install ruff mypy
ruff check . --fix
mypy .
- Install Node Version Manager (nvm):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
- Install Node.js 20:
nvm install 20
nvm use 20
- Install dependencies:
# From the WebSVF root directory
npm install
- Run the application:
Development mode:
npm start
# The app will run on http://localhost:5173
Production build:
npm run build
# The build output will be in the dist/ directory
You can run the following commands in the root directory.
npm run lint
npm run lint:fix
npm run format
npm run format:check
npm run type-check
# Checks all of them together
npm run validate
If you want to use the CodeGPT feature locally, you'll need an OpenAI API key:
- Create an account with OpenAI
- Navigate to the API section
- Generate an API key
- Create a
.env
file in the root directory:
VITE_OPENAI_API_KEY='YOUR_API_KEY'
The frontend and backend is configured for deployment to GitHub Pages and Fly.io. Push to the master
branch to trigger automatic deployment via GitHub Actions.