Skip to content

Sairaj213/Synaptic_Codex_Forge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🖥️ Project: Synaptic Codex Forge

🤖 Production-Ready Code-Gen: “An interactive Streamlit application powered by Large Language Models.”


🚀 This project provides a powerful web UI to transform natural language prompts into complete, production-ready Python projects in seconds.

🖼️ The Forge features a sophisticated dual-agent backend: a Planner to create the project blueprint and a Coder to write the code, ensuring high-quality, structured output.

⚙️ The backend is powered by mistralai/Mistral-7B-Instruct-v0.3, loaded using 4-bit quantization to run a 7-billion parameter model in resource-constrained environments.


🗂️ Project Structure


📁 Synaptic_Codex_Forge/
├── main.py                         # Application entry point (runs the Streamlit app)
├── config.py                       # Central configuration for models and project templates
├── requirements.txt               
└── README.md                      
|
├── 📁 core/                        
│   ├── model.py                    # Handles loading the quantized LLM and generation
│   ├── agent.py                    # Orchestrates the Planner/Coder agent pipeline
│   └── prompts.py                  # Contains all prompt engineering logic
│
├── 📁 ui/                         
│   ├── sidebar.py                  # Renders the sidebar for controls and settings
│   ├── tabs_layout.py              # Renders the main tabbed interface for results
│   └── widgets.py                  # Contains reusable UI components (code viewer, stats)
│
├── 📁 utils/                      
│   ├── session_state.py            # Manages the Streamlit session state
│   └── file_manager.py             # Handles all file/folder creation and zipping
│
└── 📁 assets/                    

⚙️ Features & Parameters


🤖 Generation Parameters

  • Project Name — Customize the output folder name for your generated project.
  • Max New Tokens — Control the maximum length of the code the Coder agent can generate for each file.
  • Temperature — Adjust the randomness of the output; lower values are more deterministic, higher are more creative.
  • Debug Mode — A simple toggle to enable additional logging or diagnostic features.

🎨 Application Features

  • Structured Project Generation — Creates projects with a consistent, modular folder and file structure.
  • Live Generation Monitoring — Watch the agent's progress in real-time as it plans, creates files, and writes code.
  • In-App Code Viewer — Review all generated code with syntax highlighting directly in the UI before downloading.
  • Downloadable Project ZIP — Package and download the entire generated project as a single .zip file.
  • Clear Session Cache — Instantly reset the application state to start a new generation from scratch.

🔬 Generation Diagnostics

The application tabs provide a look under the hood at the entire generation pipeline.

Metric Description Location
Total Generation Time The total wall-clock time taken for the entire pipeline to complete. Stats & Download
Total Lines of Code A sum of all lines of code generated across all files in the project. Stats & Download
Project Plan The exact JSON blueprint created by the Planner agent before coding began. Plan & Monitor
Full Agent Log A complete, step-by-step log of the agent's actions, successes, and errors. Plan & Monitor



🚀 Getting Started


📋 1. Prerequisites

Before you begin, ensure you have the following essential tools installed on your system.

  • Python 3.11+: The core programming language.
  • Git: For cloning the repository.
  • pip and venv: Standard Python package and environment managers.
  • (Recommended) An NVIDIA GPU with CUDA installed to leverage 4-bit quantization.

⚙️ 2. Installation & Setup

This step-by-step guide will set up the entire project environment. Open your terminal or command prompt and execute the following commands.

1. Clone the Repository

First, clone this repository to your local machine.

git clone https://github.com/Sairaj213/Synaptic_Codex_Forge.git

2. Navigate to the Project Directory

Change into the newly created folder.

cd Synaptic_Codex_Forge

3. Create and Activate a Virtual Environment

This isolates the project's dependencies from your system-wide Python installation.

  • On Windows:
    python -m venv venv
    venv\Scripts\activate
  • On macOS / Linux:
    python3 -m venv venv
    source venv/bin/activate 
    (Your terminal prompt should now be prefixed with (venv))

4. Install Required Dependencies

This command reads the requirements.txt file and installs all necessary libraries into your virtual environment.

pip install -r requirements.txt

🛰️ 3. Launch the Application!

With the setup complete, you are now ready to launch the Visual Analysis Suite.

streamlit run main.py

Your default web browser will automatically open a new tab with the application running. The first time you select a model, it will be downloaded and cached, which may take a few minutes.

📷 Sample Images


The README.md looks way better in Visual Studio Code

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages