Intelligent Legal Visualization and Research
VisuaLex is an advanced web application designed to research, visualize, and study legal texts from Normattiva, EUR-Lex, and Brocardi. It combines a powerful async Python backend with a rich React-based frontend to transform complex regulations into interactive knowledge graphs and structured views.
| Document | Description |
|---|---|
| Architecture | System overview, diagrams, data flow |
| Python API Setup | Installation & configuration |
| Python API Reference | All endpoints with payloads |
| Node.js Backend | Platform services & Prisma schema |
| Frontend Setup | Installation & development |
| Component Library | Reusable UI components |
| User Guide | End-user documentation |
- Python 3.10+
- Node.js 18+
- PostgreSQL (for user data)
# 1. Clone and setup Python API
cd VisuaLexAPI
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
playwright install chromium # Required for PDF export
# 2. Setup Node.js Backend
cd backend
npm install
cp .env.example .env # Configure DATABASE_URL and JWT_SECRET
npm run prisma:generate
npm run prisma:migrate
# 3. Setup Frontend
cd ../frontend
npm install# Option 1: Use start script (recommended)
./start.sh
# Option 2: Manual (3 terminals)
# Terminal 1: Python API
source .venv/bin/activate && python app.py # :5000
# Terminal 2: Node.js Backend
cd backend && npm run dev # :3001
# Terminal 3: Frontend
cd frontend && npm run dev # :5173Access the application at: http://localhost:5173
- Multi-Source Search: Unified interface for Italian Laws (Normattiva) and EU Regulations (EUR-Lex)
- Study Mode: Distraction-free reading environment with annotation tools
- Brocardi Integration: Automatic retrieval of legal maxims and explanatory notes
- PDF Export: Generate high-quality PDFs of regulations for offline use
- Bookmarks & Dossiers: Organize your research with folders and collections
- Highlights & Annotations: Mark up articles with colors and notes
VisuaLexAPI/
├── app.py # Python API entry point (Quart)
├── visualex_api/ # Python API source
│ ├── services/ # Scrapers (Normattiva, EUR-Lex, Brocardi)
│ └── tools/ # Utilities (URN, parsing, config)
├── backend/ # Node.js platform backend
│ ├── prisma/ # Database schema
│ └── src/ # Express routes, controllers
├── frontend/ # React SPA (Vite + TypeScript)
│ └── src/
│ ├── components/ # UI & feature components
│ ├── store/ # Zustand state management
│ └── services/ # API clients
├── docs/ # Documentation
└── data/ # Local data storage
- "Playwright: no such driver": Run
playwright install chromium - PDF Export Fails: Ensure Chromium is installed via Playwright
- CORS Errors: Check that all services are running on correct ports
Internal/Educational Use. Please respect the Terms of Service of source data providers (Normattiva, EUR-Lex).