./start.shVisit: http://localhost:5173
docker-compose up --buildVisit: http://localhost:3000
p4Lens/
├── backend/ # FastAPI + P4 Parser
├── frontend/ # React + Vite UI
├── README.md # Full documentation
└── start.sh # Quick start script
# Start everything
./start.sh
# Stop everything
./stop.sh
# Backend only
cd backend && uvicorn main:app --reload
# Frontend only
cd frontend && npm run dev# Start
docker-compose up -d
# Stop
docker-compose down
# Rebuild
docker-compose up --build
# View logs
docker-compose logs -f| Endpoint | Description |
|---|---|
| http://localhost:5173 | Frontend UI (dev) |
| http://localhost:3000 | Frontend UI (Docker) |
| http://localhost:8000 | Backend API |
| http://localhost:8000/docs | API Documentation |
| http://localhost:8000/health | Health Check |
- Upload a
.p4file - View the interactive pipeline visualization
- Click on nodes to see details
- Explore tables, actions, headers, and externs
cd backend
pip install -r requirements.txtcd frontend
rm -rf node_modules
npm install# Kill processes on port 8000
lsof -ti:8000 | xargs kill -9
# Kill processes on port 5173
lsof -ti:5173 | xargs kill -9# Clean everything
docker-compose down -v
docker system prune -af
docker-compose up --build- README.md - Full documentation
- CONTRIBUTING.md - How to contribute
- CHANGELOG.md - What changed
- PROJECT_SUMMARY.md - Overview of improvements
See README.md section "AWS VSCode Server Integration" for:
- SSH setup
- P4 compilation
- Remote debugging
- Security best practices
- Sample P4 files are in
backend/uploads/ - Logs are in
backend.logandfrontend.log - Use the minimap to navigate large programs
- Click nodes to see detailed information
- Check README.md
- Open an issue on GitHub
- Review API docs at /docs endpoint
Built with ❤️ for the P4 community