An open API service indexing awesome lists of open source software.

https://github.com/k1lgor/svnfluence

๐ŸŒŸ Find the SVN command you need nowโ€”effortlessly!
https://github.com/k1lgor/svnfluence

gin go subversion svn svnfluence

Last synced: about 2 months ago
JSON representation

๐ŸŒŸ Find the SVN command you need nowโ€”effortlessly!

Awesome Lists containing this project

README

          

# ๐Ÿš€ SVNfluence - AI-Powered SVN Command Generator

Welcome to **SVNfluence**, an AI-driven web application that helps developers quickly find and understand SVN (Subversion) commands using natural language queries. Built with Go, Gin, and powered by OpenAI, SVNfluence offers a sleek, responsive interface with a modern design, making it easy to navigate SVN commands in both light and dark themes.

๐ŸŒŸ **Find the SVN command you need nowโ€”effortlessly!**

---

## โœจ Features

- **AI-Powered Search**: Enter natural language queries (e.g., "how to add a file?") and get instant SVN command suggestions with descriptions, usage, and examples.
- **Responsive Design**: Beautiful, user-friendly UI with light and dark themes, featuring animated particle effects for a dynamic background.
- **Fast Performance**: Built with Go and Gin for high-speed, reliable web serving.
- **Cross-Platform**: Works seamlessly in browsers on desktop and mobile devices.
- **Open Source**: Contribute, fork, or customizeโ€”check out the code on GitHub!

---

## ๐Ÿ“ธ Screenshots

| Light Mode | Dark Mode |
|------------------------------------------------|-----------------------------------------------|
| ![Light Mode](./static/screenshots/light-mode.png) | ![Dark Mode](./static/screenshots/dark-mode.png) |

---

## ๐Ÿš€ Getting Started

### Prerequisites

- **Go**: Version 1.20 or higher (install via [golang.org](https://golang.org/dl/))
- **OpenAI API Key**: Sign up at [OpenAI](https://platform.openai.com/signup) and get an API key.
- **Git**: For cloning the repository (install via [git-scm.com](https://git-scm.com/downloads))

### Installation

1. Clone the repository:

```bash
git clone https://github.com/k1lgor/svnfluence.git
cd svnfluence
```

2. Set your OpenAI API key as an environment variable:

```bash
export OPENAI_API_KEY=your-api-key-here
```

3. Install dependencies:

```bash
go mod tidy
```

4. Run the application:

```bash
go run cmd/main.go
```

5. Open the browser and visit:

```bash
http://localhost:8080
```

---

## ๐Ÿ›  Usage

1. Navigate to the homepage and enter a query like โ€œhow to add a file?โ€ in the search bar.
2. Click โ€œSearchโ€ to get AI-generated SVN command suggestions, including the command, description, usage, and examples.
3. Toggle between light ๐ŸŒž and dark ๐ŸŒ™ themes using the button in the top-right corner.
4. Click the GitHub icon in the footer to visit the projectโ€™s repository or the developerโ€™s profile.

---

## Project Structure

SVNfluence is organized for scalability and maintainability:

```bash
svnfluence/
โ”œโ”€โ”€ cmd/ # Entry point for the application
โ”‚ โ””โ”€โ”€ main.go # Main application startup
โ”œโ”€โ”€ internal/ # Internal application logic
โ”‚ โ”œโ”€โ”€ api/ # API handlers and routes
โ”‚ โ”‚ โ””โ”€โ”€ handlers.go # HTTP handlers
โ”‚ โ”œโ”€โ”€ config/ # Configuration settings
โ”‚ โ”‚ โ””โ”€โ”€ config.go # Configuration loader
โ”‚ โ”œโ”€โ”€ models/ # Data structures
โ”‚ โ”‚ โ””โ”€โ”€ command.go # Command struct
โ”‚ โ””โ”€โ”€ openai/ # AI integration
โ”‚ โ””โ”€โ”€ openai.go # OpenAI API calls
โ”œโ”€โ”€ templates/ # HTML templates
โ”‚ โ”œโ”€โ”€ search.html
โ”‚ โ””โ”€โ”€ results.html
โ”œโ”€โ”€ static/ # Static assets (CSS, JS, images)
โ”‚ โ””โ”€โ”€ style.css
โ”œโ”€โ”€ go.mod # Go module file
โ””โ”€โ”€ go.sum # Go dependencies
```

## ๐Ÿณ Docker

Run SVNfluence in a container for easy deployment:

### Prerequisites

- **Docker**: Install Docker from [docker.com](https://www.docker.com/get-started)

### Build and Run

1. Build the Docker image:

```bash
docker build -t svnfluence:latest .
```

2. Run the container with your OpenAI API key:

```bash
docker run -d -p 8080:8080 -e OPENAI_API_KEY=your-api-key-here svnfluence:latest
```

### Health Check

SVNfluence includes a health endpoint at `/health`. The Dockerfile includes a `HEALTHCHECK` to monitor the app:

```dockerfile
HEALTHCHECK --interval=30s --timeout=3s \
CMD curl -f http://localhost:8080/health || exit 1
```

## โš ๏ธ License

SVNfluence is open-source software licensed under the MIT License. See the [LICENSE](LICENSE) file for details.