A modern, interactive code visualization tool that helps developers understand and analyze code structure and complexity over time.
Try out the live demo at: codevi.netlify.app
- Interactive Timeline: Visualize code structure with an intuitive timeline interface
- Syntax Highlighting: Clear color-coding for different code elements:
- Keywords (Deep Red)
- Classes (Rich Green)
- Functions (Deep Purple)
- Variables (Rich Blue)
- Operators (Warm Orange)
- Strings (Ocean Blue)
- Numbers (Ruby Red)
- Comments (Neutral Gray)
- Decorators (Bright Orange)
- Complexity Visualization: Toggle between syntax highlighting and complexity view
- Complexity Metrics:
- Low Complexity (Green): Simple, straightforward code
- Medium Complexity (Yellow): Moderate control flow and nesting
- High Complexity (Red): Complex logic and deep nesting
- Code Structure Analysis: Automatic analysis of:
- Control flow statements
- Nesting levels
- Logical operators
- Dependencies
- Search Functionality: Filter code segments based on text search
- Filter Dialog: Show/hide specific code types:
- Keywords
- Classes
- Functions
- Variables
- Operators
- Strings
- Numbers
- Comments
- Zoom Controls: Adjust timeline view scale
- Mini-map Navigation: Quick navigation through large codebases with visual preview
- Scrolling: Smooth scrolling with proper viewport management
- Dark/Light Mode: Optimized color schemes for both themes
- Responsive Layout: Adapts to different screen sizes
- Interactive Tooltips: Detailed information on hover
- Modern Design:
- Clean, minimalist interface
- Subtle shadows and transitions
- Professional color palette
- High contrast for readability
- Code Input: Built-in code editor with syntax highlighting
- Real-time Updates: Immediate visualization of code changes
- Error Handling: Validation and error reporting for code input
- Clone the repository:
git clone https://github.com/yourusername/code_timeline_preview.git- Install dependencies:
npm install- Run the development server:
npm run dev- Open http://localhost:3000 in your browser
- Input Code: Paste your code in the left editor panel
- Explore Visualization:
- Use the timeline view on the right
- Toggle between syntax and complexity views
- Use search and filters to focus on specific code elements
- Navigate:
- Use the mini-map for quick navigation
- Zoom in/out to adjust detail level
- Scroll through longer code files
You can run the application using Docker. Here's how:
- Docker installed on your machine
- Docker Compose (optional, for development)
# Build the image
docker build -t code-timeline . --load # Run the container
docker run -p 3000:3000 code-timelineThe application will be available at http://localhost:3000
For development, you can use volume mounts to reflect changes immediately:
docker run -p 3000:3000 -v $(pwd):/app code-timeline npm run dev# Stop the container
docker stop <container_id>
# Remove the container
docker rm <container_id>
# List running containers
docker ps
# View container logs
docker logs <container_id>
# Rebuild the image after changes
docker build -t code-timeline . --loadIf you encounter any issues:
-
Make sure ports are not in use:
lsof -i :3000
-
Clean up Docker resources:
docker system prune
-
Check container logs:
docker logs <container_id>
- Frontend: Next.js, React
- Styling: Tailwind CSS
- Code Editor: Ace Editor
- Icons: Lucide React
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.