MCPcopy Index your code
hub / github.com/VGabriel45/SolidityVisualizer

github.com/VGabriel45/SolidityVisualizer @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
121 symbols 376 edges 54 files 17 documented · 14% updated 8mo ago★ 38
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Image

License Kofi

Solidity Visualizer

Visualize any Solidity project.

⚙️ Tech Stack

  • Frontend: Next.js, TypeScript, Tailwind CSS, ShadCN
  • Backend: FastAPI, Python, Server Actions
  • Database: PostgreSQL (with Drizzle ORM)
  • AI: OpenAI o3-mini, Claude 3.5 Sonnet
  • Deployment: Vercel (Frontend), EC2 (Backend)
  • CI/CD: GitHub Actions
  • Analytics: PostHog, Api-Analytics

🤔 About

This project was created to help Solidity developers explore and understand Blockchain projects faster and better, personally I have been in the position where I need to understand a new project but quickly realized the codebase is too massive for me to dig through manually, not to mention that Solidity smart contracts are not always the easiest to understand.

Please follow the instructions to run this locally, this is a demo app and it is not deployed anyhwere yet.

🔒 How to diagram private repositories

You can simply click on "Private Repos" in the header and follow the instructions by providing a GitHub personal access token with the repo scope.

You can also self-host this app locally (backend separated as well!) with the steps below.

🛠️ Self-hosting / Local Development

  1. Clone the repository
git clone https://github.com/VGabriel45/solidityVisualizer.git
cd solidityVisualizer
  1. Install dependencies
pnpm i
  1. Set up environment variables (create .env)
cp .env.example .env

Then edit the .env file with your Anthropic API key and optional GitHub personal access token.

  1. Run backend
docker compose up --build -d

Logs available at docker-compose logs -f The FastAPI server will be available at localhost:8000

  1. Start local database
chmod +x start-database.sh
./start-database.sh

When prompted to generate a random password, input yes. The Postgres database will start in a container at localhost:5432

  1. Initialize the database schema
pnpm db:push

You can view and interact with the database using pnpm db:studio

  1. Run Frontend
pnpm dev

You can now access the website at localhost:3000 and edit the rate limits defined in backend/app/routers/generate.py in the generate function decorator.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Acknowledgements

Shoutout to Romain Courtois's Gitingest for inspiration and styling

Support the Project

Solidity Visualizer is an open-source tool. If you find it useful for your work, consider supporting the ongoing development.

  • ⭐ Star this repository
  • 🔀 Share with others who might find it useful
  • 🐛 Report bugs and suggest features
  • 💻 Contribute to the codebase

Your support helps make Solidity Visualizer better for everyone in the blockchain community! Thank you!

Extension points exported contracts — how you extend this code

CopyButtonProps (Interface)
(no doc)
src/components/copy-button.tsx
GenerateApiResponse (Interface)
(no doc)
src/lib/fetch-backend.ts
GitHubResponse (Interface)
(no doc)
src/app/_actions/github.ts
StreamState (Interface)
(no doc)
src/hooks/useDiagram.ts
ApiKeyDialogProps (Interface)
(no doc)
src/components/api-key-dialog.tsx
ModifyApiResponse (Interface)
(no doc)
src/lib/fetch-backend.ts
StreamResponse (Interface)
(no doc)
src/hooks/useDiagram.ts
MermaidChartProps (Interface)
(no doc)
src/components/mermaid-diagram.tsx

Core symbols most depended-on inside this repo

cn
called by 19
src/lib/utils.ts
format_user_message
called by 7
backend/app/utils/format_message.py
_get_headers
called by 5
backend/app/services/github_service.py
call_o3_api_stream
called by 3
backend/app/services/o3_mini_openai_service.py
count_tokens
called by 3
backend/app/services/claude_service.py
cacheDiagramAndExplanation
called by 3
src/app/_actions/cache.ts
getLastGeneratedDate
called by 3
src/app/_actions/repo.ts
get_default_branch
called by 2
backend/app/services/github_service.py

Shape

Function 69
Method 24
Interface 17
Class 7
Route 4

Languages

TypeScript64%
Python36%

Modules by API surface

src/hooks/useDiagram.ts12 symbols
backend/app/services/github_service.py10 symbols
backend/app/routers/generate.py9 symbols
src/components/loading.tsx8 symbols
src/lib/fetch-backend.ts6 symbols
src/components/main-card.tsx6 symbols
src/app/_actions/cache.ts5 symbols
backend/app/services/o3_mini_openrouter_service.py5 symbols
backend/app/services/o3_mini_openai_service.py5 symbols
backend/app/services/o1_mini_openai_service.py5 symbols
src/components/private-repos-dialog.tsx4 symbols
src/components/header.tsx4 symbols

For agents

$ claude mcp add SolidityVisualizer \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact