Inspiration
Current AI coding assistants like GitHub Copilot and ChatGPT suffer from "Contextual Amnesia." They treat every developer the same, offering generic, "average" code that often ignores a project's specific architectural patterns, naming conventions, and error-handling styles. We spent more time refactoring AI suggestions to fit our style than actually writing code. We built CodeGhost to be the first AI assistant that doesn't just predict code—it learns your "Engineering DNA."
What it does
CodeGhost is a personalized AI pair programmer. It analyzes your existing repositories to build a Style Profile based on your actual coding habits.
Pattern Extraction: It parses your code to understand if you prefer functional vs. OOP, your favorite libraries, and your unique logic structures.
Contextual RAG Chat: A chat interface that performs semantic searches across your codebase to answer project-specific questions with 100% accuracy.
Personalized Suggestions: Using the learned DNA, it provides code that looks, feels, and functions exactly like you wrote it.
How we built it
The project is built on a high-performance modern stack:
Frontend: Next.js 14 with a "Cyberpunk" dark-theme UI, using Framer Motion for smooth animations and React Three Fiber for 3D elements.
Backend: Next.js API Routes integrated with Supabase.
Vector Engine: We used pgvector within Supabase to store and query code embeddings.
Intelligence: A dual-model approach using Google Gemini 1.5 Pro for deep reasoning and Groq (Llama 3) for ultra-fast chat responses.
Parsing: Custom logic using Babel Parser to analyze Abstract Syntax Trees (AST) for structural pattern recognition.
Challenges we ran into
The biggest hurdle was moving beyond simple "text search." Traditional AI just looks at words; we wanted CodeGhost to understand structure. Implementing AST (Abstract Syntax Tree) parsing to identify coding patterns across different file types was technically demanding. Additionally, balancing the high-reasoning capabilities of Gemini with the low-latency requirements of a coding assistant required a complex fallback and caching strategy.
Accomplishments that we're proud of
We are incredibly proud of the DNA Style Profile. Seeing the AI successfully identify a developer’s preference for specific design patterns and then replicating that style in a chat response felt like magic. We also managed to build a fully functional VS Code Extension and a web dashboard that sync in real-time using Supabase.
What we learned
We learned a massive amount about Vector Databases and the nuances of RAG (Retrieval-Augmented Generation). We discovered that the "Soul" of a codebase isn't in the comments, but in the AST structure. We also gained deep experience in orchestrating multiple LLMs to create a seamless user experience that balances speed and intelligence.
What's next for CodeGhost
Team DNA: Allowing teams to create a "Shared Ghost" that enforces consistent coding standards across large organizations.
Automated PR Reviews: A feature that automatically flags code in Pull Requests that deviates from the established project DNA.
Support for more languages: Expanding our AST parsing logic beyond JavaScript and TypeScript to Python, Go, and Rust.
Built With
- babel(parser)
- framermotion
- gemini
- lucidereact
- netlify
- next.js
- pgvector
- railway
- responsive-user-interface.-framer-motion:-for-advanced-ui-animations-and-page-transitions.-react-three-fiber:-to-power-the-3d-elements-on-the-landing-page.-lucide-react:-for-the-consistent
- supabase
- tailwindcss
- typescript
- zod
Log in or sign up for Devpost to join the conversation.