https://github.com/opensass/nano-og
🦞 A Blazingly Fast 🚀 AI-powered Open Graph Image Generator
https://github.com/opensass/nano-og
api axum deployment dioxus dioxus-fullstack gemini gemini-nano gemini-nano-in-chrome pinata pinata-api pinata-ipfs rust
Last synced: 8 months ago
JSON representation
🦞 A Blazingly Fast 🚀 AI-powered Open Graph Image Generator
- Host: GitHub
- URL: https://github.com/opensass/nano-og
- Owner: opensass
- License: mit
- Created: 2024-12-03T13:42:20.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-03T10:46:51.000Z (12 months ago)
- Last Synced: 2025-04-01T00:01:46.018Z (11 months ago)
- Topics: api, axum, deployment, dioxus, dioxus-fullstack, gemini, gemini-nano, gemini-nano-in-chrome, pinata, pinata-api, pinata-ipfs, rust
- Language: Rust
- Homepage: https://opensass.org/nanoog
- Size: 1.35 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🌌 Nano OG 🎨
[](https://www.rust-lang.org/)
[](https://www.rust-lang.org)
[](https://github.com/nano-og)
[](LICENSE)
[](https://discord.com/invite/b5JbvHW5nv)
| 🐧 Linux `(Recommended)` | 🪟 Windows |
| :------: | :------: |
| [**Download Executable**](https://github.com/opensass/nano-og/releases/download/v0.0.1/dist.zip) | [**Download Executable**](https://github.com/opensass/nano-og/releases/download/v0.0.1/dist.rar) |
| [**Set Environment Variables**](https://github.com/opensass/nano-og#-setting-up-env-vars) | [**Set Environment Variables**](https://github.com/opensass/nano-og#-setting-up-env-vars) |
| unzip files | unzip files |
| execute `./dist/nano-og` | execute `.\dist\nano-og.exe` |
## 📐 Architecture

## 📸 Demo
| 🐧 Linux `(Recommended)` | 🪟 Windows |
| :------: | :------: |
| | |
## 🚀 About Nano OG
**Nano OG** is a blazing-fast, AI-powered tool for generating **Open Graph (OG)** images, empowering developers, marketers, and designers to create eye-catching visuals optimized for social media and SEO.
With support for real-time previews, customizable designs, and developer-friendly APIs, Nano OG takes the hassle out of crafting stunning OG images.
> [!IMPORTANT]
>
> Nano OG leverages **Gemini Nano**, which is currently only supported on Windows:
>
> 1. **Google Chrome Canary**: Ensure you have the latest version of [**Chrome Canary**](https://www.google.com/chrome/canary/) installed on your machine.
> 2. **Gemini Nano AI Model**: Make sure the latest Gemini AI weights are downloaded to avoid compatibility issues.
>
## 🖥️ Pre-Built Binaries
Prefer downloading a ready-to-go binary? We've got you covered! Grab the pre-compiled binaries for your platform from the links above and get started immediately.
> **⚡ Key Features of Pre-Built Binaries:**
>
> - Ready-to-use `.exe` or Linux binary.
> - Simple setup for environment variables.
> - Optimized for speed and ease of use.
## 🤓 For the Hardcore Nerds
Prefer compiling everything from scratch? Here's what you'll need to get started.
### 🛠️ Prerequisites
1. **Install `rustup`**:
```sh
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
1. **Install `Dioxus CLI`**:
```sh
cargo install dioxus-cli
```
1. **Clone the Repository**:
```sh
git clone https://github.com/opensass/nano-og.git
cd nano-og
```
## 🔑 Setting Up Env Vars
Before running Nano OG, configure the necessary environment variables for external services like **MongoDB** and **Pinata**.
### Create an `.env` File
In the project root, copy the example `.env` file:
```sh
cp .env.example .env
```
Edit the `.env` file with your credentials:
```sh
MONGODB_USR=your-mongodb-user
MONGODB_PWD=your-mongodb-password
MONGODB_CLSTR=your-cluster.mongodb.net
MONGODB_DB_NAME=nano-ogs
JWT_SECRET=your-jwt-secret
PINATA_API_KEY=your-pinata-api-key
PINATA_API_SECRET=your-pinata-api-secret
```
- **MongoDB**: Follow [this guide](./MongoDB.md) to set up and connect your database.
- **JWT Secret**: Generate a secure key using OpenSSL:
```sh
openssl rand -hex 128
```
- **Pinata API**: Get your API keys from [Pinata's developer portal](https://pinata.cloud/).
## 🚀 Building and Running
Once the environment is set up, you're ready to build and run Nano OG.
### Build the Client
```sh
dx serve
```
Navigate to [http://localhost:3000](http://localhost:3000) to access Nano OG.
## ✅ Features
- **AI-Powered Generation**: Leverage Genini Nano AI for local and fast, high-quality OG images.
- **Customizable Designs**: Tailor images to fit your brand perfectly.
- **Real-Time Previews**: Instant updates as you tweak designs.
- **Lightning-Fast Backend**: Built with Rust for high performance.
- **Secure Storage**: Data is stored safely using MongoDB and JWT authentication.
## 🛠️ Tech Stack
- **Axum**: Rust Backend for performance and security.
- **Dioxus**: Fast, reactive rusty UI framework.
- **MongoDB**: Flexible, scalable data storage.
- **Pinata API**: Simplified media uploads to IPFS.
## 📜 License
Nano OG is licensed under the [MIT License](./LICENSE).
Feel free to use, modify, and distribute this project within the terms of the license.
## 💬 Need Help?
Join the conversation on [Discord](https://discord.com/invite/b5JbvHW5nv) or open an issue on [GitHub](https://github.com/opensass/nano-og/issues).