CodeFossil - Time-Traveling AI IDE
Inspiration
The "Retro vs Modern" theme sparked a realization: programming history isn't just nostalgia, it's educational gold. Modern developers take features like garbage collection, OOP, and dynamic typing for granted without understanding the constraints that shaped them. Meanwhile, enterprises struggle with billions of lines of legacy COBOL code that nobody knows how to modernize.
What if we could experience programming history firsthand while also solving the legacy code crisis?
CodeFossil was born from this dual mission: teach programming evolution through authentic constraints while providing practical tools for code modernization.
What It Does
CodeFossil is a dual-mode web IDE that bridges 50+ years of programming history.
CRT Mode - The Time Machine
Code across three distinct eras:
- 1972 Era: C programming with 4KB RAM constraints, procedural paradigm
- 1985 Era: Early C++ with 64KB RAM, object-oriented revolution
- 2025 Era: Modern Python with unlimited resources
Features include AI code evolution that transforms your code across all three eras with side-by-side comparisons, an AI pair programmer providing real-time suggestions that respect era constraints, speed coding challenges with AI-generated problems and intelligent verification, authentic CRT effects including scanlines, phosphor glow, screen flicker, and era-specific color palettes, and an interactive terminal with 20+ commands.
Fossil Mode - The Archaeologist
Upload legacy code in COBOL, Fortran, Pascal, BASIC, or Assembly and receive automatic language and era detection, modern Python translation, security analysis, historical context and interesting facts, and migration strategy recommendations.
How We Built It
Architecture
The frontend uses React 18 with Vite and Tailwind CSS, organized with component-based architecture for CRT and Fossil modes, custom CSS animations for authentic retro effects, and a real-time terminal with command history.
The backend uses Vercel Serverless Functions with one endpoint proxying AI requests securely and another handling code execution via Piston API.
We integrated two primary APIs: OpenRouter with Grok Code Fast 1 for AI code generation, debugging, evolution, and challenge verification, and Piston API for sandboxed code execution of C, C++, and Python.
Key Technical Implementations
Era-Specific AI Personalities: Created three distinct personalities (C-MASTER for 1972, CPP-WIZARD for 1985, QUANTUM-Q for 2025) that influence code generation, explanations, and debugging approaches to match historical context.
Code Evolution Algorithm: The system parses original code, makes sequential API calls for each era, applies era-specific constraints in prompts, cleans markdown formatting, animates transitions with a visual timeline, and allows insertion of any version.
Challenge Verification System: Instead of string matching, we use AI-powered semantic verification. The system executes student code via Piston API, captures output and errors, submits to AI with the reference solution for semantic comparison, and returns feedback with hints while allowing multiple attempts.
CRT Visual Effects: Custom CSS animations create an authentic retro feel with synchronized scanline animation, phosphor glow text shadows, random screen glitches in retro modes, and era-specific color palettes.
Challenges We Faced
API Key Security
Direct OpenRouter API calls would expose keys in client-side code. We built an Express proxy server for local development and migrated to Vercel serverless functions for production, allowing secure API calls without exposing credentials.
Code Execution Sandbox
Running user code safely without server infrastructure was critical. Piston API provides free, sandboxed execution. We had to transform their response format to match our expected structure for consistent handling.
Era-Appropriate Code Generation
The AI initially generated modern code regardless of era constraints. We solved this by crafting detailed personality prompts with strict requirements about line limits, function complexity, and historical references. It took multiple iterations to achieve consistent era-appropriate output.
Challenge Verification Reliability
String matching fails for valid alternative solutions. Our AI semantic verification approach allows student code that works differently but achieves the same result to be marked correct, with the AI providing hints for partial solutions.
CRT Effects Performance
Multiple overlapping animations caused lag. We optimized by using CSS animations over JavaScript, implementing a single scanline element instead of multiple, lazy loading the Matrix effect canvas, and disabling effects during modals.
Terminal Command History
Arrow key navigation for command history required proper state management. We implemented a command history array with index tracking and proper bounds checking for navigation.
Deployment Configuration
Express proxy servers don't work on Vercel. We converted to serverless functions, created API endpoints for OpenRouter and Piston, updated configuration to use relative paths in production, and managed environment variables through Vercel dashboard.
What We Learned
Technical Lessons
Serverless architecture on Vercel is ideal for API proxying with zero DevOps overhead. Getting consistent AI output requires extremely detailed constraints in prompts. Hardware-accelerated CSS animations significantly outperform JavaScript for smooth 60fps effects. AI-powered semantic verification is more powerful than rigid test cases for code evaluation.
Design Lessons
Authentic CRT effects create genuine immersion in the retro experience. The boot sequence effectively primes users for the historical programming environment. Combining educational value with practical utility broadens the appeal significantly.
Product Lessons
Teaching why modern features exist is more valuable than just explaining what they do. Legacy code modernization addresses a real billion-dollar enterprise problem. Multiple memorable moments throughout the experience create lasting impact.
What's Next
Immediate Enhancements
Add more eras including 1960s Assembly, 1990s Java, and 2010s JavaScript. Implement collaborative mode for real-time pair programming across eras. Create a leaderboard to track challenge completion times globally. Add code golf mode to optimize for minimum size in each era.
Enterprise Features
Develop batch processing to analyze entire legacy codebases. Generate migration reports with executive summaries and ROI calculations. Integrate specialized ML models for security vulnerability detection. Add version control integration for Git history visualization.
Educational Features
Build curriculum mode with structured lessons through programming history. Create professor dashboard to track student progress. Link to era-appropriate historical documentation and manuals. Generate AI-powered video tutorials for each concept.
Built With
- css
- express.js
- grok
- grok-code-fast-1
- llm
- lucide-react
- node.js
- openrouter-api
- openrouteservice
- piston-api
- react
- tailwind-css
- vercel
- vite
- vt323-font
Log in or sign up for Devpost to join the conversation.