https://github.com/jai0401/docsmith
docSmith is an AI-powered codebase documentation generator for analyzing codebases and producing structured docs. Supports GitHub repos & local files. Perfect for developers, writers, & project managers.
https://github.com/jai0401/docsmith
ai ai-readme-generator documentation-generator documentation-tool genai readme-ai readme-generator
Last synced: 6 months ago
JSON representation
docSmith is an AI-powered codebase documentation generator for analyzing codebases and producing structured docs. Supports GitHub repos & local files. Perfect for developers, writers, & project managers.
- Host: GitHub
- URL: https://github.com/jai0401/docsmith
- Owner: Jai0401
- License: mit
- Created: 2025-01-06T10:27:36.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-03-28T13:54:21.000Z (7 months ago)
- Last Synced: 2025-04-15T16:58:42.707Z (6 months ago)
- Topics: ai, ai-readme-generator, documentation-generator, documentation-tool, genai, readme-ai, readme-generator
- Language: JavaScript
- Homepage: https://doc-smith.vercel.app
- Size: 147 KB
- Stars: 11
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# docSmith
docSmith is an API designed to generate documentation, Dockerfiles, and Docker Compose configurations from a GitHub repository URL. It leverages the Gemini language model and Langchain to analyze the codebase and produce structured outputs.
[](https://doc-smith.vercel.app/)
**Key Features:**
* **Documentation Generation:** Automatically generates comprehensive documentation for a given GitHub repository.
* **Dockerfile Generation:** Creates a Dockerfile tailored to the project's needs.
* **Docker Compose Generation:** Generates a Docker Compose configuration for multi-container applications.
* **API-Driven:** Provides a RESTful API for easy integration with other tools and services.
**Supported Platforms/Requirements:**
* Python 3.7+
* FastAPI
* Langchain
* Google Gemini API
* Docker (for Dockerfile and Docker Compose generation)
* Node.js and npm (for Repomix installation)
## Getting Started
### Prerequisites
Before you begin, ensure you have the following installed:
* **Python:** Version 3.7 or higher.
* **pip:** Python package installer.
* **Docker:** For generating and using Dockerfiles and Docker Compose configurations.
* **Node.js and npm:** Required for installing Repomix.
* **Google Cloud Account:** Required to access the Gemini API.
* **Git:** Required to clone the repository.
### Installation
1. **Clone the repository:**
```bash
git clone
cd
```
2. **Create a virtual environment (recommended):**
```bash
python3 -m venv venv
source venv/bin/activate # On Linux/macOS
venv\Scripts\activate # On Windows
```
3. **Install the backend dependencies:**
```bash
cd backend
pip install -r requirements.txt
```
4. **Set up environment variables:**
* Create a `.env` file in the `backend` directory.
* Add your Google API key:
GOOGLE_API_KEY=
5. **Install Repomix:**
```bash
npm install -g repomix
```
This script checks if Repomix is installed and installs it globally using npm if it's not already present.
6. **Install the frontend dependencies:**
```bash
cd ../frontend
npm install
```
### Running the Application
1. **Start the backend server:**
```bash
cd ../backend
uvicorn main:app --host 0.0.0.0 --port 8000 --reload
```
This command starts the FastAPI server on port 8000 with hot reloading enabled.
2. **Start the frontend application:**
```bash
cd ../frontend
npm run dev
```
This command starts the Vite development server, typically on port 5173.## API Documentation
The backend provides the following API endpoints:
* **`POST /generate-docs-from-url`:** Generates documentation from a GitHub repository URL.
* **Input:**
```json
{
"url": "https://github.com/username/repository"
}
* **Output:** A string containing the generated documentation in Markdown format.
* **`POST /generate-dockerfile`:** Generates a Dockerfile from a GitHub repository URL.
* **Input:**
```json
{
"url": "https://github.com/username/repository"
}
* **Output:** A string containing the generated Dockerfile.
* **`POST /generate-docker-compose`:** Generates a Docker Compose configuration from a GitHub repository URL.
* **Input:**
```json
{
"url": "https://github.com/username/repository"
}
* **Output:** A string containing the generated Docker Compose configuration in YAML format.
* **`GET /ping`:** A lightweight route to keep the server alive.
* **Output:**
```json
{
"message": "Pong!"
}