The AI README Generator is a full-stack application designed to automatically generate professional README.md files for public GitHub repositories. It consists of a modern, dark-themed React frontend and a powerful FastAPI backend. The backend leverages the OpenAI API to produce high-quality documentation based on the content of the source code. This project aims to simplify the process of creating well-structured README files, saving time for developers and maintaining consistency in documentation.
- Modern & Responsive UI: Enjoy a sleek, dark-themed interface that adapts seamlessly across all device sizes.
- Real-time Input Validation: Ensures the GitHub URL entered is structurally valid before processing.
- Clear State Indicators: Provides feedback with visual cues like spinners and status messages.
- Robust Error Handling: Displays user-friendly error alerts when issues arise.
- Convenient Output Management: Copy or download the generated README with ease.
- Fast & Asynchronous: Utilize FastAPI for high performance, capable of managing concurrent requests efficiently.
- Intelligent Code Crawling: Analyzes the repository content while ignoring irrelevant files and directories.
- AI-Powered Content Generation: Uses OpenAI's GPT models to craft human-like, high-quality documentation.
- Secure API Key Management: Protects the OpenAI API key using a .env file.
- UI Library: React
- Styling: Tailwind CSS
- HTTP Client: Axios
- Icons: Lucide React
- Framework: FastAPI
- Server: Uvicorn
- AI Integration: OpenAI Python Library
- Git Operations: GitPython
- Environment Management: python-dotenv
To set up and run this project, follow the instructions below.
-
Navigate to the backend directory:
cd backend -
Create and activate a virtual environment:
# Create the environment python3 -m venv .venv # Activate it source .venv/bin/activate
-
Install the necessary dependencies:
pip install "fastapi[all]" openai python-dotenv GitPython -
Configure your API Key:
Create a file named
.envin the backend directory and add your OpenAI API key to it:OPENAI_API_KEY="sk-YourSecretApiKeyHere"
- Navigate to the frontend directory and install dependencies:
cd frontend npm install
To run the application, both the backend server and frontend need to be started up:
- Open a terminal and ensure your virtual environment is activated.
- Run the following command to start the server:
The backend server will be running at http://127.0.0.1:8000.
uvicorn main:app --reload
- Open
index.htmlin your web browser.
- Navigate to the frontend directory in a new terminal.
- Run the development server:
npm run dev
- With both applications running, open the frontend application in your browser.
- Enter the URL for a public GitHub repository in the provided input field.
- Click "Generate README" to begin the process.
- The app will display a loading indicator while generating the README.
- Once complete, you can copy or download the generated README file using the available buttons.
This application streamlines README creation, making it effortless to keep your documentation informative and up-to-date. Enjoy generating high-quality README files with just a URL!