AI-Syntax / README.md
Hariprasath5128's picture
Prepare Syntax AI for Hugging Face Space
8a5fc23
metadata
title: AI-Syntax
emoji: 🚀
colorFrom: blue
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false

Syntax AI: Professional Code Engineering Suite

Syntax AI is an advanced development environment designed to streamline the code lifecycle through intelligent automation and real-time efficiency analytics. By leveraging specialized AI agents and a high-performance architecture, Syntax AI empowers developers to generate, optimize, and analyze source code within a unified, high-fidelity interface.


Core Capabilities

1. Automated Code Generation

Syntax AI provides instantaneous generation of syntactically correct and optimized code across multiple programming languages, including Python, JavaScript, C++, Java, and TypeScript. The system utilizes state-of-the-art Large Language Models (LLMs) to ensure high-quality output tailored to specific technical requirements.

2. Intelligent Code Modification

The platform features specialized agents for targeted code improvements:

  • Logic Refactoring: Enhances structural integrity and modernizes legacy syntax.
  • Performance Optimization: Increases computational efficiency and reduces resource overhead.
  • Error Detection & Correction: Identifies and repairs logical bugs and syntax errors automatically.

3. Integrated Efficiency Analytics

Syntax AI includes a sophisticated reporting engine that visualizes the impact of code modifications through quantitative metrics:

  • Time and Space Complexity Analysis
  • Execution Velocity Benchmarking
  • Readability and Maintainability Indexing
  • Industry Best Practice Compliance

Technical Architecture

Design Philosophy: "Galaxy Glass"

The user interface is built on a custom design system that prioritizes clarity and visual depth. The "Galaxy Glass" aesthetic utilizes dynamic starfield simulations, advanced glassmorphism components, and subtle micro-animations to create a focused, premium workspace.

Backend Infrastructure

  • Python (FastAPI): Serves the React UI, orchestrates AI inference, and exposes the API routes.
  • Phidata: Manages multi-agent task distribution and state.
  • Mistral AI: Provides the underlying transformer architecture for code intelligence.
  • PostgreSQL / Supabase (optional): Stores users and activity history when DATABASE_URL is configured.

Frontend Implementation

  • React.js: Facilitates a responsive and component-driven user experience.
  • SVG-DR (Dynamic Reporting): Custom SVG-based visualization for real-time analytics.
  • Vanilla CSS3: Tailored styling using hardware-accelerated animations.

Persistence Layer

  • MySQL: Relational database for robust user profile and session management.

Installation and Deployment

1. Prerequisites

  • Python 3.10 or higher
  • Node.js (v18+) and npm
  • Optional PostgreSQL / Supabase database

2. Environment Configuration

Define local environment variables in a .env file at the root directory (see .env.example for details):

MISTRAL_API_KEY=your_secured_key
DATABASE_URL=postgresql://username:password@host:port/database

3. Dependency Installation

# Python Backend Environment
pip install -r requirements.txt

# Frontend & Node Infrastructure
cd frontend
npm install

4. System Launch

# Start the FastAPI server
python server.py

# In a separate terminal, start the React dev server
cd frontend
npm start

5. Hugging Face Spaces

This repository is configured for a Docker Space.

Required secret:

  • MISTRAL_API_KEY

Optional secret:

  • DATABASE_URL

Notes:

  • The container exposes port 7860, which matches the Space metadata.
  • If DATABASE_URL is not set, the app falls back to in-memory login and activity storage so the demo still runs.
  • The React app is built inside the Docker image and served by FastAPI from the same container.

License

This project is released under the MIT License.


Developed by Hariprasath