Skip to content
This repository was archived by the owner on Nov 29, 2025. It is now read-only.

code-alchemist01/AI-Basic-Editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– AI Basic Editor

Expert-level code writing assistant! Write professional code using the power of Gemini AI with a modern Streamlit-based interface.

โœจ Features

  • ๐ŸŽจ Modern Streamlit Interface: Gradient colors and responsive design
  • ๐Ÿ”— Gemini API Integration: Google's most advanced AI model
  • ๐Ÿ“Š PostgreSQL Database: Chat history and knowledge storage
  • ๐Ÿค– Expert Code Editor: Professional code writing with customized AI prompts
  • ๐Ÿ’ฌ Real-time Chat: Message history and cleanup features
  • ๐Ÿ”ง Easy Setup: Run with a single command

๐Ÿš€ Quick Start

1. Clone the Project

git clone https://github.com/code-alchemist01/AI-Basic-Editor.git
cd AI-Basic-Editor

2. Setup Environment Variables

# Copy the example file
copy .env.example .env

# Edit .env file and add your credentials

3. Run the Application

python run.py

The application will automatically install required packages and start at http://localhost:8501.

โš™๏ธ Configuration

.env File

Set the following variables in your .env file:

# PostgreSQL Database URL
DATABASE_URL=postgresql://username:password@localhost:5432/ai_editor

# Gemini API Key (https://makersuite.google.com/app/apikey)
GEMINI_API_KEY=your_gemini_api_key_here

# Gemini Model
GEMINI_MODEL=gemini-2.0-flash

Supported Models

  • gemini-2.0-flash (Recommended - Fast and powerful)
  • gemini-1.5-pro (Most advanced model)
  • gemini-1.5-flash (Quick response)

๐Ÿ“‹ Usage Examples

Web Development

"Create a responsive navbar component with React"
"Write REST API with Node.js Express"
"Design modern layout with CSS Grid"

Python Development

"Write a blog application with Python Flask"
"Create data analysis script with Pandas"
"Write async web service with FastAPI"

Database

"Optimize PostgreSQL performance"
"Write MongoDB aggregation pipeline"
"Create SQL injection protected queries"

DevOps

"Write Docker multi-stage build file"
"Create Kubernetes deployment yaml"
"Write CI/CD pipeline with GitHub Actions"
Ekran gรถrรผntรผsรผ 2025-10-02 235629 Ekran gรถrรผntรผsรผ 2025-10-02 224708 Ekran gรถrรผntรผsรผ 2025-10-02 224716 Ekran gรถrรผntรผsรผ 2025-10-02 235721 Ekran gรถrรผntรผsรผ 2025-10-02 235812 Ekran gรถrรผntรผsรผ 2025-10-02 224813 Ekran gรถrรผntรผsรผ 2025-10-02 224801

๐Ÿ› ๏ธ Development

Project Structure

AI-Basic-Editor/
โ”œโ”€โ”€ app.py              # Main Streamlit application
โ”œโ”€โ”€ database.py         # PostgreSQL database management
โ”œโ”€โ”€ gemini_client.py    # Gemini API integration
โ”œโ”€โ”€ run.py             # Run script
โ”œโ”€โ”€ requirements.txt   # Python dependencies
โ”œโ”€โ”€ database_schema.sql # Database schema
โ”œโ”€โ”€ .env.example       # Environment variables template
โ”œโ”€โ”€ .gitignore         # Git ignore file
โ””โ”€โ”€ README.md          # This file

Manual Installation

# Create virtual environment (optional)
python -m venv venv
venv\Scripts\activate  # Windows
# source venv/bin/activate  # Linux/Mac

# Install dependencies
pip install -r requirements.txt

# Start the application
streamlit run app.py

๐Ÿ”’ Security

  • โœ… API keys are securely stored in .env file
  • โœ… .env file is excluded from Git via .gitignore
  • โœ… Manual API key input for secure usage
  • โœ… Database connections are managed securely

๐Ÿ“ฆ Dependencies

  • streamlit - Web interface
  • psycopg2-binary - PostgreSQL connection
  • google-generativeai - Gemini API
  • python-dotenv - Environment variables
  • sqlalchemy - ORM

๐Ÿค Contributing

  1. Fork the project
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License.

๐Ÿ†˜ Support

If you encounter issues:

  1. Make sure your .env file is properly configured
  2. Check that PostgreSQL database is running
  3. Verify your Gemini API key is valid
  4. Check terminal for error messages

๐ŸŽฏ Future Features

  • Code syntax highlighting
  • File upload/download
  • Theme options
  • Multi-language support
  • Plugin system
  • Code versioning

About

AI-powered code editor with Streamlit interface and Gemini API integration. Write professional code with expert-level AI assistance, real-time chat, and PostgreSQL database storage. Features modern UI, multiple Gemini models support, and secure API key management.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages