Expert-level code writing assistant! Write professional code using the power of Gemini AI with a modern Streamlit-based interface.
- ๐จ 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
git clone https://github.com/code-alchemist01/AI-Basic-Editor.git
cd AI-Basic-Editor# Copy the example file
copy .env.example .env
# Edit .env file and add your credentialspython run.pyThe application will automatically install required packages and start at http://localhost:8501.
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-flashgemini-2.0-flash(Recommended - Fast and powerful)gemini-1.5-pro(Most advanced model)gemini-1.5-flash(Quick response)
"Create a responsive navbar component with React"
"Write REST API with Node.js Express"
"Design modern layout with CSS Grid"
"Write a blog application with Python Flask"
"Create data analysis script with Pandas"
"Write async web service with FastAPI"
"Optimize PostgreSQL performance"
"Write MongoDB aggregation pipeline"
"Create SQL injection protected queries"
"Write Docker multi-stage build file"
"Create Kubernetes deployment yaml"
"Write CI/CD pipeline with GitHub Actions"
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
# 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- โ
API keys are securely stored in
.envfile - โ
.envfile is excluded from Git via.gitignore - โ Manual API key input for secure usage
- โ Database connections are managed securely
streamlit- Web interfacepsycopg2-binary- PostgreSQL connectiongoogle-generativeai- Gemini APIpython-dotenv- Environment variablessqlalchemy- ORM
- Fork the project
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
If you encounter issues:
- Make sure your
.envfile is properly configured - Check that PostgreSQL database is running
- Verify your Gemini API key is valid
- Check terminal for error messages
- Code syntax highlighting
- File upload/download
- Theme options
- Multi-language support
- Plugin system
- Code versioning