diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index a0e77169..00000000 --- a/docs/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# Mintlify Starter Kit - -Click on `Use this template` to copy the Mintlify starter kit. The starter kit contains examples including - -- Guide pages -- Navigation -- Customizations -- API Reference pages -- Use of popular components - -### Development - -Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the documentation changes locally. To install, use the following command - -``` -npm i -g mintlify -``` - -Run the following command at the root of your documentation (where docs.json is) - -``` -mintlify dev -``` - -### Publishing Changes - -Install our Github App to auto propagate changes from your repo to your deployment. Changes will be deployed to production automatically after pushing to the default branch. Find the link to install on your dashboard. - -#### Troubleshooting - -- Mintlify dev isn't running - Run `mintlify install` it'll re-install dependencies. -- Page loads as a 404 - Make sure you are running in a folder with `docs.json` diff --git a/docs/api-reference/endpoint/create.mdx b/docs/api-reference/endpoint/create.mdx deleted file mode 100644 index 5689f1b6..00000000 --- a/docs/api-reference/endpoint/create.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: 'Create Plant' -openapi: 'POST /plants' ---- diff --git a/docs/api-reference/endpoint/delete.mdx b/docs/api-reference/endpoint/delete.mdx deleted file mode 100644 index 657dfc87..00000000 --- a/docs/api-reference/endpoint/delete.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: 'Delete Plant' -openapi: 'DELETE /plants/{id}' ---- diff --git a/docs/api-reference/endpoint/get.mdx b/docs/api-reference/endpoint/get.mdx deleted file mode 100644 index 56aa09ec..00000000 --- a/docs/api-reference/endpoint/get.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: 'Get Plants' -openapi: 'GET /plants' ---- diff --git a/docs/api-reference/endpoint/webhook.mdx b/docs/api-reference/endpoint/webhook.mdx deleted file mode 100644 index 32913402..00000000 --- a/docs/api-reference/endpoint/webhook.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: 'New Plant' -openapi: 'WEBHOOK /plant/webhook' ---- diff --git a/docs/api-reference/introduction.mdx b/docs/api-reference/introduction.mdx deleted file mode 100644 index c835b78b..00000000 --- a/docs/api-reference/introduction.mdx +++ /dev/null @@ -1,33 +0,0 @@ ---- -title: 'Introduction' -description: 'Example section for showcasing API endpoints' ---- - - - If you're not looking to build API reference documentation, you can delete - this section by removing the api-reference folder. - - -## Welcome - -There are two ways to build API documentation: [OpenAPI](https://mintlify.com/docs/api-playground/openapi/setup) and [MDX components](https://mintlify.com/docs/api-playground/mdx/configuration). For the starter kit, we are using the following OpenAPI specification. - - - View the OpenAPI specification file - - -## Authentication - -All API endpoints are authenticated using Bearer tokens and picked up from the specification file. - -```json -"security": [ - { - "bearerAuth": [] - } -] -``` diff --git a/docs/api-reference/openapi.json b/docs/api-reference/openapi.json deleted file mode 100644 index da5326ef..00000000 --- a/docs/api-reference/openapi.json +++ /dev/null @@ -1,217 +0,0 @@ -{ - "openapi": "3.1.0", - "info": { - "title": "OpenAPI Plant Store", - "description": "A sample API that uses a plant store as an example to demonstrate features in the OpenAPI specification", - "license": { - "name": "MIT" - }, - "version": "1.0.0" - }, - "servers": [ - { - "url": "http://sandbox.mintlify.com" - } - ], - "security": [ - { - "bearerAuth": [] - } - ], - "paths": { - "/plants": { - "get": { - "description": "Returns all plants from the system that the user has access to", - "parameters": [ - { - "name": "limit", - "in": "query", - "description": "The maximum number of results to return", - "schema": { - "type": "integer", - "format": "int32" - } - } - ], - "responses": { - "200": { - "description": "Plant response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Plant" - } - } - } - } - }, - "400": { - "description": "Unexpected error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - }, - "post": { - "description": "Creates a new plant in the store", - "requestBody": { - "description": "Plant to add to the store", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewPlant" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "plant response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Plant" - } - } - } - }, - "400": { - "description": "unexpected error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - }, - "/plants/{id}": { - "delete": { - "description": "Deletes a single plant based on the ID supplied", - "parameters": [ - { - "name": "id", - "in": "path", - "description": "ID of plant to delete", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "responses": { - "204": { - "description": "Plant deleted", - "content": {} - }, - "400": { - "description": "unexpected error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - } - } - } - }, - "webhooks": { - "/plant/webhook": { - "post": { - "description": "Information about a new plant added to the store", - "requestBody": { - "description": "Plant added to the store", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NewPlant" - } - } - } - }, - "responses": { - "200": { - "description": "Return a 200 status to indicate that the data was received successfully" - } - } - } - } - }, - "components": { - "schemas": { - "Plant": { - "required": [ - "name" - ], - "type": "object", - "properties": { - "name": { - "description": "The name of the plant", - "type": "string" - }, - "tag": { - "description": "Tag to specify the type", - "type": "string" - } - } - }, - "NewPlant": { - "allOf": [ - { - "$ref": "#/components/schemas/Plant" - }, - { - "required": [ - "id" - ], - "type": "object", - "properties": { - "id": { - "description": "Identification number of the plant", - "type": "integer", - "format": "int64" - } - } - } - ] - }, - "Error": { - "required": [ - "error", - "message" - ], - "type": "object", - "properties": { - "error": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - } - } - } - }, - "securitySchemes": { - "bearerAuth": { - "type": "http", - "scheme": "bearer" - } - } - } -} \ No newline at end of file diff --git a/docs/configurations/environment-variables.mdx b/docs/configurations/environment-variables.mdx deleted file mode 100644 index 5aaa5deb..00000000 --- a/docs/configurations/environment-variables.mdx +++ /dev/null @@ -1,114 +0,0 @@ ---- -title: "Environment Variables" -description: "Presenton can be customized and secured using environment variables. These variables control access, integrations, and model providers." ---- - -### 🔧 Core Configuration - -* **`CAN_CHANGE_KEYS`** - Controls whether users can view or modify API keys via the interface. - Set to `"false"` to keep keys hidden and locked, or `"true"` to allow modification. - *Example:* - - ```bash - CAN_CHANGE_KEYS="false" - ``` - -* **`LLM`** - Select the Large Language Model (LLM) provider to use. - Supported values: `"openai"`, `"google"`, `"ollama"`, `"custom"` - *Example:* - - ```bash - LLM="openai" - ``` - -### 🧠 Model Provider Specific Variables - -#### 🔹 OpenAI - -* **`OPENAI_API_KEY`** - Required if `LLM="openai"` - *Example:* - - ```bash - OPENAI_API_KEY="sk-xxxxxxxxxxxxxxxx" - ``` - -#### 🔹 Google - -* **`GOOGLE_API_KEY`** - Required if `LLM="google"` - *Example:* - - ```bash - GOOGLE_API_KEY="AIzaSyXXXXXXXXXXXX" - ``` - > ⚠️ Image generation is not supported in EU regions with Google. - -#### 🔹 Ollama - -* **`OLLAMA_URL`** - (Optional) URL of your custom Ollama server. Useful if you're self-hosting. - *Example:* - - ```bash - OLLAMA_URL="http://localhost:11434" - ``` - -* **`OLLAMA_MODEL`** - Required if `LLM="ollama"` - *Example:* - - ```bash - OLLAMA_MODEL="llama3.2:3b" - ``` - -#### 🔹 Custom (OpenAI-compatible LLMs) - -* **`CUSTOM_LLM_URL`** - Required if `LLM="custom"` - *Example:* - - ```bash - CUSTOM_LLM_URL="https://api.your-custom-llm.com/v1" - ``` - -* **`CUSTOM_LLM_API_KEY`** - Required if `LLM="custom"` - *Example:* - - ```bash - CUSTOM_LLM_API_KEY="your_custom_key" - ``` - -* **`CUSTOM_MODEL`** - Required if `LLM="custom"` - *Example:* - - ```bash - CUSTOM_MODEL="llama3.2:3b" - ``` - -### 🖼️ Image Enhancement - -* **`PEXELS_API_KEY`** - (Optional) Used to fetch high-quality stock images when using `ollama` or `custom` models. - *Example:* - - ```bash - PEXELS_API_KEY="vzXXXXXXXXXXXXXX" - ``` - -### 🐳 Docker Example - -```bash -docker run -it --name presenton -p 5000:80 \ - -e LLM="ollama" \ - -e OLLAMA_MODEL="llama3.2:3b" \ - -e OLLAMA_URL="http://localhost:11434" \ - -e CAN_CHANGE_KEYS="false" \ - -e PEXELS_API_KEY="your_pexels_key" \ - -v "./user_data:/app/user_data" \ - ghcr.io/presenton/presenton:latest -``` \ No newline at end of file diff --git a/docs/configurations/using-custom-llm.mdx b/docs/configurations/using-custom-llm.mdx deleted file mode 100644 index e4db8d8f..00000000 --- a/docs/configurations/using-custom-llm.mdx +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: 'Using OpenAI-Compatible APIs' -description: 'Presenton supports OpenAI-compatible APIs, allowing you to connect to any custom LLM backend that follows the OpenAI API format.' ---- - -### 🌐 Example: Run Presenton with a Custom LLM - -```bash -docker run -it --name presenton -p 5000:80 \ - -e LLM="custom" \ - -e CUSTOM_LLM_URL="http://XXXXXXXXXXX/v1" \ - -e CUSTOM_LLM_API_KEY="your_custom_api_key" \ - -e CUSTOM_MODEL="your-model-name" \ - -e CAN_CHANGE_KEYS="false" \ - -v "./user_data:/app/user_data" \ - ghcr.io/presenton/presenton:latest -``` - ---- - -### 🔧 Environment Variables for Custom LLM - -| Variable | Description | -| -------------------- | ----------------------------------------------------------------------- | -| `LLM="custom"` | Use the `custom` value to enable OpenAI-compatible API support | -| `CUSTOM_LLM_URL` | Base URL of your OpenAI-compatible API (e.g. `http://XXXXXXXXXXX/v1`) | -| `CUSTOM_LLM_API_KEY` | API key used for authorization (`Bearer` header) | -| `CUSTOM_MODEL` | ID of the model to use (as defined by your API provider) | -| `PEXELS_API_KEY` | *(Optional)* Used to fetch high-quality images to enhance presentations | -| `CAN_CHANGE_KEYS` | Set to `false` to hide API keys from the frontend | \ No newline at end of file diff --git a/docs/configurations/using-gpu.mdx b/docs/configurations/using-gpu.mdx deleted file mode 100644 index 8af32213..00000000 --- a/docs/configurations/using-gpu.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: "Using GPU" -description: "Runing Ollama models on GPU" ---- - -Presenton supports GPU acceleration when using Ollama models, significantly improving performance — especially for larger models. - -To enable GPU support, you need to install and configure the **NVIDIA Container Toolkit**. - -### 🛠️ Step 1: Install NVIDIA Container Toolkit - -Follow the official guide to install the toolkit:\ -👉 https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html - -### 🚀 Step 2: Run Presenton with GPU - -Once installed, use the `--gpus=all` flag when running the container: - -- **Running without environment variables** - -```bash -docker run -it --name presenton --gpus=all -p 5000:80 \ - -v "./user_data:/app/user_data" \ - ghcr.io/presenton/presenton:v0.3.0-beta -``` - -- **Running with environment variables** - -```bash -docker run -it --name presenton --gpus=all -p 5000:80 \ - -e LLM="ollama" \ - -e OLLAMA_MODEL="llama3.2:3b" \ - -e PEXELS_API_KEY="your_pexels_api_key" \ - -e CAN_CHANGE_KEYS="false" \ - -v "./user_data:/app/user_data" \ - ghcr.io/presenton/presenton:latest -``` \ No newline at end of file diff --git a/docs/configurations/using-ollama-models.mdx b/docs/configurations/using-ollama-models.mdx deleted file mode 100644 index ca84bcc6..00000000 --- a/docs/configurations/using-ollama-models.mdx +++ /dev/null @@ -1,114 +0,0 @@ ---- -title: "Using Ollama Models" -description: "Follow these steps to generate presentations using Ollama" ---- - -## 🔌 Run Presenton with an Ollama Model (Fully Offline) - -Presenton supports fully offline operation using open-source models via [Ollama](https://ollama.com/). This allows you to generate presentations without relying on cloud APIs — keeping your data private and costs low. - -### 🚀 Example: Run Presenton with Ollama - -```bash -docker run -it --name presenton -p 5000:80 \ - -e LLM="ollama" \ - -e OLLAMA_MODEL="llama3.2:3b" \ - -e PEXELS_API_KEY="your_pexels_api_key" \ - -e CAN_CHANGE_KEYS="false" \ - -v "./user_data:/app/user_data" \ - ghcr.io/presenton/presenton:latest -``` - -### 🚀 Example: Run Presenton with you own Ollama server - -```bash -docker run -it --name presenton -p 5000:80 \ - -e LLM="ollama" \ - -e OLLAMA_MODEL="llama3.2:3b" \ - -e OLLAMA_URL="http://XXXXXXXXXXXXX" \ - -e PEXELS_API_KEY="your_pexels_api_key" \ - -e CAN_CHANGE_KEYS="false" \ - -v "./user_data:/app/user_data" \ - ghcr.io/presenton/presenton:latest -``` - - -### 🧾 Ollama Environment Variables - -* **`LLM="ollama"`** - Select Ollama as the LLM backend. - -* **`OLLAMA_MODEL`** - Required. The Ollama model to use (e.g., `llama3.2:3b`, `mistral`, `phi3`, etc.). - *Example:* - - ```bash - OLLAMA_MODEL="llama3.2:3b" - ``` - -* **`OLLAMA_URL`** - Optional. Set this if you're running Ollama outside Docker or on a custom host. - *Example:* - - ```bash - OLLAMA_URL="http://XXXXXXXXXXXX" - ``` - -* **`PEXELS_API_KEY`** - Optional but recommended. Used to fetch stock images for enhanced visuals. - *Example:* - - ```bash - PEXELS_API_KEY="vzXXXXXXXXXXXXXX" - ``` - -> 💡 **Note:** Provide a valid **Pexels API key** for image generation when using Ollama models. -> You can get a free API key at https://www.pexels.com/api/ - -> ✅ Add `--gpus=all` to enable GPU acceleration (see [Using GPU](/docs/configurations/using-gpu)). - -### 🧠 Supported Ollama Models - -| Model | Size | Graph Support | -| ------------------- | ------ | ------------- | -| **Llama Models** | | | -| `llama3:8b` | 4.7 GB | ❌ No | -| `llama3:70b` | 40 GB | ✅ Yes | -| `llama3.1:8b` | 4.9 GB | ❌ No | -| `llama3.1:70b` | 43 GB | ✅ Yes | -| `llama3.1:405b` | 243 GB | ✅ Yes | -| `llama3.2:1b` | 1.3 GB | ❌ No | -| `llama3.2:3b` | 2 GB | ❌ No | -| `llama3.3:70b` | 43 GB | ✅ Yes | -| `llama4:16x17b` | 67 GB | ✅ Yes | -| `llama4:128x17b` | 245 GB | ✅ Yes | -| **Gemma Models** | | | -| `gemma3:1b` | 815 MB | ❌ No | -| `gemma3:4b` | 3.3 GB | ❌ No | -| `gemma3:12b` | 8.1 GB | ❌ No | -| `gemma3:27b` | 17 GB | ✅ Yes | -| **DeepSeek Models** | | | -| `deepseek-r1:1.5b` | 1.1 GB | ❌ No | -| `deepseek-r1:7b` | 4.7 GB | ❌ No | -| `deepseek-r1:8b` | 5.2 GB | ❌ No | -| `deepseek-r1:14b` | 9 GB | ❌ No | -| `deepseek-r1:32b` | 20 GB | ✅ Yes | -| `deepseek-r1:70b` | 43 GB | ✅ Yes | -| `deepseek-r1:671b` | 404 GB | ✅ Yes | -| **Qwen Models** | | | -| `qwen3:0.6b` | 523 MB | ❌ No | -| `qwen3:1.7b` | 1.4 GB | ❌ No | -| `qwen3:4b` | 2.6 GB | ❌ No | -| `qwen3:8b` | 5.2 GB | ❌ No | -| `qwen3:14b` | 9.3 GB | ❌ No | -| `qwen3:30b` | 19 GB | ✅ Yes | -| `qwen3:32b` | 20 GB | ✅ Yes | -| `qwen3:235b` | 142 GB | ✅ Yes | - -> ✅ **Graph Support** means the model can generate charts and diagrams in presentations. - -### 📌 Additional Notes - -- Use the `OLLAMA_MODEL` environment variable to select any supported model. -- Ensure your system has enough RAM or GPU memory to handle the model. -- Always include a `PEXELS_API_KEY` for full image generation functionality. \ No newline at end of file diff --git a/docs/development.mdx b/docs/development.mdx deleted file mode 100644 index ca7f7e9e..00000000 --- a/docs/development.mdx +++ /dev/null @@ -1,41 +0,0 @@ ---- -title: 'Development' -description: 'Run and test Presenton locally to develop features, make changes, and preview updates in a safe development environment' ---- - - - **Prerequisite**: Please install Docker on your machine before proceeding.
- You can get Docker from [https://www.docker.com/get-started](https://www.docker.com/get-started). -
- -### Clone the Repository - -```bash -git clone https://github.com/presenton/presenton.git -cd presenton -```` - -### Run with Docker Compose - -Build and start the development environment using Docker Compose: - -- Without GPU - -```bash -docker compose up development --build -``` -- With GPU -```bash -docker compose up development-gpu --build -``` - -This command will build the development container and start the app. Once running, you can access Presenton at: - -``` -http://localhost:5000 -``` - -### Notes - -* The `development` service includes live reload and debugging support for easier development. -* To stop the environment, press `Ctrl + C` and then run `docker compose down` to clean up. \ No newline at end of file diff --git a/docs/docs.json b/docs/docs.json deleted file mode 100644 index 31050975..00000000 --- a/docs/docs.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "$schema": "https://mintlify.com/docs.json", - "theme": "mint", - "name": "Presenton Documentation", - "colors": { - "primary": "#4a2ea6", - "light": "#5b39cb", - "dark": "#3a2481" - }, - "favicon": "/favicon.svg", - "navigation": { - "tabs": [ - { - "tab": "Guides", - "groups": [ - { - "group": "Get Started", - "pages": [ - "index", - "quickstart", - "development", - "using-presenton-api" - ] - }, - { - "group": "Configurations", - "pages": [ - "configurations/environment-variables", - "configurations/using-ollama-models", - "configurations/using-custom-llm", - "configurations/using-gpu" - ] - }, - { - "group": "Tutorials", - "pages": [ - "tutorial/generate-presentation-over-api", - "tutorial/generate-presentation-from-csv", - "tutorial/create-data-reports-using-ai" - ] - } - ] - } - ], - "global": { - "anchors": [ - { - "anchor": "Community", - "href": "https://discord.gg/xmJkX8G6", - "icon": "discord" - }, - { - "anchor": "Blog", - "href": "https://presenton.ai/blogs", - "icon": "newspaper" - } - ] - } - }, - "logo": { - "light": "/logo/light.svg", - "dark": "/logo/dark.svg" - }, - "navbar": { - "links": [ - { - "label": "Support", - "href": "mailto:suraj@presenton.ai" - } - ], - "primary": { - "type": "button", - "label": "Dashboard", - "href": "https://presenton.ai/dashboard" - } - }, - "footer": { - "socials": { - "github": "https://github.com/presenton/presenton" - } - } -} \ No newline at end of file diff --git a/docs/essentials/code.mdx b/docs/essentials/code.mdx deleted file mode 100644 index d2a462a7..00000000 --- a/docs/essentials/code.mdx +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: 'Code Blocks' -description: 'Display inline code and code blocks' -icon: 'code' ---- - -## Basic - -### Inline Code - -To denote a `word` or `phrase` as code, enclose it in backticks (`). - -``` -To denote a `word` or `phrase` as code, enclose it in backticks (`). -``` - -### Code Block - -Use [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks) by enclosing code in three backticks and follow the leading ticks with the programming language of your snippet to get syntax highlighting. Optionally, you can also write the name of your code after the programming language. - -```java HelloWorld.java -class HelloWorld { - public static void main(String[] args) { - System.out.println("Hello, World!"); - } -} -``` - -````md -```java HelloWorld.java -class HelloWorld { - public static void main(String[] args) { - System.out.println("Hello, World!"); - } -} -``` -```` diff --git a/docs/essentials/images.mdx b/docs/essentials/images.mdx deleted file mode 100644 index 60ad42d3..00000000 --- a/docs/essentials/images.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: 'Images and Embeds' -description: 'Add image, video, and other HTML elements' -icon: 'image' ---- - - - -## Image - -### Using Markdown - -The [markdown syntax](https://www.markdownguide.org/basic-syntax/#images) lets you add images using the following code - -```md -![title](/path/image.jpg) -``` - -Note that the image file size must be less than 5MB. Otherwise, we recommend hosting on a service like [Cloudinary](https://cloudinary.com/) or [S3](https://aws.amazon.com/s3/). You can then use that URL and embed. - -### Using Embeds - -To get more customizability with images, you can also use [embeds](/writing-content/embed) to add images - -```html - -``` - -## Embeds and HTML elements - - - -
- - - -Mintlify supports [HTML tags in Markdown](https://www.markdownguide.org/basic-syntax/#html). This is helpful if you prefer HTML tags to Markdown syntax, and lets you create documentation with infinite flexibility. - - - -### iFrames - -Loads another HTML page within the document. Most commonly used for embedding videos. - -```html - -``` diff --git a/docs/essentials/markdown.mdx b/docs/essentials/markdown.mdx deleted file mode 100644 index c8ad9c1f..00000000 --- a/docs/essentials/markdown.mdx +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: 'Markdown Syntax' -description: 'Text, title, and styling in standard markdown' -icon: 'text-size' ---- - -## Titles - -Best used for section headers. - -```md -## Titles -``` - -### Subtitles - -Best use to subsection headers. - -```md -### Subtitles -``` - - - -Each **title** and **subtitle** creates an anchor and also shows up on the table of contents on the right. - - - -## Text Formatting - -We support most markdown formatting. Simply add `**`, `_`, or `~` around text to format it. - -| Style | How to write it | Result | -| ------------- | ----------------- | --------------- | -| Bold | `**bold**` | **bold** | -| Italic | `_italic_` | _italic_ | -| Strikethrough | `~strikethrough~` | ~strikethrough~ | - -You can combine these. For example, write `**_bold and italic_**` to get **_bold and italic_** text. - -You need to use HTML to write superscript and subscript text. That is, add `` or `` around your text. - -| Text Size | How to write it | Result | -| ----------- | ------------------------ | ---------------------- | -| Superscript | `superscript` | superscript | -| Subscript | `subscript` | subscript | - -## Linking to Pages - -You can add a link by wrapping text in `[]()`. You would write `[link to google](https://google.com)` to [link to google](https://google.com). - -Links to pages in your docs need to be root-relative. Basically, you should include the entire folder path. For example, `[link to text](/writing-content/text)` links to the page "Text" in our components section. - -Relative links like `[link to text](../text)` will open slower because we cannot optimize them as easily. - -## Blockquotes - -### Singleline - -To create a blockquote, add a `>` in front of a paragraph. - -> Dorothy followed her through many of the beautiful rooms in her castle. - -```md -> Dorothy followed her through many of the beautiful rooms in her castle. -``` - -### Multiline - -> Dorothy followed her through many of the beautiful rooms in her castle. -> -> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood. - -```md -> Dorothy followed her through many of the beautiful rooms in her castle. -> -> The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood. -``` - -### LaTeX - -Mintlify supports [LaTeX](https://www.latex-project.org) through the Latex component. - -8 x (vk x H1 - H2) = (0,1) - -```md -8 x (vk x H1 - H2) = (0,1) -``` diff --git a/docs/essentials/navigation.mdx b/docs/essentials/navigation.mdx deleted file mode 100644 index f21213c0..00000000 --- a/docs/essentials/navigation.mdx +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: 'Navigation' -description: 'The navigation field in docs.json defines the pages that go in the navigation menu' -icon: 'map' ---- - -The navigation menu is the list of links on every website. - -You will likely update `docs.json` every time you add a new page. Pages do not show up automatically. - -## Navigation syntax - -Our navigation syntax is recursive which means you can make nested navigation groups. You don't need to include `.mdx` in page names. - - - -```json Regular Navigation -"navigation": { - "tabs": [ - { - "tab": "Docs", - "groups": [ - { - "group": "Getting Started", - "pages": ["quickstart"] - } - ] - } - ] -} -``` - -```json Nested Navigation -"navigation": { - "tabs": [ - { - "tab": "Docs", - "groups": [ - { - "group": "Getting Started", - "pages": [ - "quickstart", - { - "group": "Nested Reference Pages", - "pages": ["nested-reference-page"] - } - ] - } - ] - } - ] -} -``` - - - -## Folders - -Simply put your MDX files in folders and update the paths in `docs.json`. - -For example, to have a page at `https://yoursite.com/your-folder/your-page` you would make a folder called `your-folder` containing an MDX file called `your-page.mdx`. - - - -You cannot use `api` for the name of a folder unless you nest it inside another folder. Mintlify uses Next.js which reserves the top-level `api` folder for internal server calls. A folder name such as `api-reference` would be accepted. - - - -```json Navigation With Folder -"navigation": { - "tabs": [ - { - "tab": "Docs", - "groups": [ - { - "group": "Group Name", - "pages": ["your-folder/your-page"] - } - ] - } - ] -} -``` - -## Hidden Pages - -MDX files not included in `docs.json` will not show up in the sidebar but are accessible through the search bar and by linking directly to them. diff --git a/docs/essentials/reusable-snippets.mdx b/docs/essentials/reusable-snippets.mdx deleted file mode 100644 index a0a55297..00000000 --- a/docs/essentials/reusable-snippets.mdx +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: Reusable Snippets -description: Reusable, custom snippets to keep content in sync -icon: 'recycle' ---- - -import SnippetIntro from '/snippets/snippet-intro.mdx'; - - - -## Creating a custom snippet - -**Pre-condition**: You must create your snippet file in the `snippets` directory. - - - Any page in the `snippets` directory will be treated as a snippet and will not - be rendered into a standalone page. If you want to create a standalone page - from the snippet, import the snippet into another file and call it as a - component. - - -### Default export - -1. Add content to your snippet file that you want to re-use across multiple - locations. Optionally, you can add variables that can be filled in via props - when you import the snippet. - -```mdx snippets/my-snippet.mdx -Hello world! This is my content I want to reuse across pages. My keyword of the -day is {word}. -``` - - - The content that you want to reuse must be inside the `snippets` directory in - order for the import to work. - - -2. Import the snippet into your destination file. - -```mdx destination-file.mdx ---- -title: My title -description: My Description ---- - -import MySnippet from '/snippets/path/to/my-snippet.mdx'; - -## Header - -Lorem impsum dolor sit amet. - - -``` - -### Reusable variables - -1. Export a variable from your snippet file: - -```mdx snippets/path/to/custom-variables.mdx -export const myName = 'my name'; - -export const myObject = { fruit: 'strawberries' }; -``` - -2. Import the snippet from your destination file and use the variable: - -```mdx destination-file.mdx ---- -title: My title -description: My Description ---- - -import { myName, myObject } from '/snippets/path/to/custom-variables.mdx'; - -Hello, my name is {myName} and I like {myObject.fruit}. -``` - -### Reusable components - -1. Inside your snippet file, create a component that takes in props by exporting - your component in the form of an arrow function. - -```mdx snippets/custom-component.mdx -export const MyComponent = ({ title }) => ( -
-

{title}

-

... snippet content ...

-
-); -``` - - - MDX does not compile inside the body of an arrow function. Stick to HTML - syntax when you can or use a default export if you need to use MDX. - - -2. Import the snippet into your destination file and pass in the props - -```mdx destination-file.mdx ---- -title: My title -description: My Description ---- - -import { MyComponent } from '/snippets/custom-component.mdx'; - -Lorem ipsum dolor sit amet. - - -``` diff --git a/docs/essentials/settings.mdx b/docs/essentials/settings.mdx deleted file mode 100644 index 884de13a..00000000 --- a/docs/essentials/settings.mdx +++ /dev/null @@ -1,318 +0,0 @@ ---- -title: 'Global Settings' -description: 'Mintlify gives you complete control over the look and feel of your documentation using the docs.json file' -icon: 'gear' ---- - -Every Mintlify site needs a `docs.json` file with the core configuration settings. Learn more about the [properties](#properties) below. - -## Properties - - -Name of your project. Used for the global title. - -Example: `mintlify` - - - - - An array of groups with all the pages within that group - - - The name of the group. - - Example: `Settings` - - - - The relative paths to the markdown files that will serve as pages. - - Example: `["customization", "page"]` - - - - - - - - Path to logo image or object with path to "light" and "dark" mode logo images - - - Path to the logo in light mode - - - Path to the logo in dark mode - - - Where clicking on the logo links you to - - - - - - Path to the favicon image - - - - Hex color codes for your global theme - - - The primary color. Used for most often for highlighted content, section - headers, accents, in light mode - - - The primary color for dark mode. Used for most often for highlighted - content, section headers, accents, in dark mode - - - The primary color for important buttons - - - The color of the background in both light and dark mode - - - The hex color code of the background in light mode - - - The hex color code of the background in dark mode - - - - - - - - Array of `name`s and `url`s of links you want to include in the topbar - - - The name of the button. - - Example: `Contact us` - - - The url once you click on the button. Example: `https://mintlify.com/docs` - - - - - - - - - Link shows a button. GitHub shows the repo information at the url provided including the number of GitHub stars. - - - If `link`: What the button links to. - - If `github`: Link to the repository to load GitHub information from. - - - Text inside the button. Only required if `type` is a `link`. - - - - - - - Array of version names. Only use this if you want to show different versions - of docs with a dropdown in the navigation bar. - - - - An array of the anchors, includes the `icon`, `color`, and `url`. - - - The [Font Awesome](https://fontawesome.com/search?q=heart) icon used to feature the anchor. - - Example: `comments` - - - The name of the anchor label. - - Example: `Community` - - - The start of the URL that marks what pages go in the anchor. Generally, this is the name of the folder you put your pages in. - - - The hex color of the anchor icon background. Can also be a gradient if you pass an object with the properties `from` and `to` that are each a hex color. - - - Used if you want to hide an anchor until the correct docs version is selected. - - - Pass `true` if you want to hide the anchor until you directly link someone to docs inside it. - - - One of: "brands", "duotone", "light", "sharp-solid", "solid", or "thin" - - - - - - - Override the default configurations for the top-most anchor. - - - The name of the top-most anchor - - - Font Awesome icon. - - - One of: "brands", "duotone", "light", "sharp-solid", "solid", or "thin" - - - - - - An array of navigational tabs. - - - The name of the tab label. - - - The start of the URL that marks what pages go in the tab. Generally, this - is the name of the folder you put your pages in. - - - - - - Configuration for API settings. Learn more about API pages at [API Components](/api-playground/demo). - - - The base url for all API endpoints. If `baseUrl` is an array, it will enable for multiple base url - options that the user can toggle. - - - - - - The authentication strategy used for all API endpoints. - - - The name of the authentication parameter used in the API playground. - - If method is `basic`, the format should be `[usernameName]:[passwordName]` - - - The default value that's designed to be a prefix for the authentication input field. - - E.g. If an `inputPrefix` of `AuthKey` would inherit the default input result of the authentication field as `AuthKey`. - - - - - - Configurations for the API playground - - - - Whether the playground is showing, hidden, or only displaying the endpoint with no added user interactivity `simple` - - Learn more at the [playground guides](/api-playground/demo) - - - - - - Enabling this flag ensures that key ordering in OpenAPI pages matches the key ordering defined in the OpenAPI file. - - This behavior will soon be enabled by default, at which point this field will be deprecated. - - - - - - - A string or an array of strings of URL(s) or relative path(s) pointing to your - OpenAPI file. - - Examples: - - ```json Absolute - "openapi": "https://example.com/openapi.json" - ``` - ```json Relative - "openapi": "/openapi.json" - ``` - ```json Multiple - "openapi": ["https://example.com/openapi1.json", "/openapi2.json", "/openapi3.json"] - ``` - - - - - - An object of social media accounts where the key:property pair represents the social media platform and the account url. - - Example: - ```json - { - "x": "https://x.com/mintlify", - "website": "https://mintlify.com" - } - ``` - - - One of the following values `website`, `facebook`, `x`, `discord`, `slack`, `github`, `linkedin`, `instagram`, `hacker-news` - - Example: `x` - - - The URL to the social platform. - - Example: `https://x.com/mintlify` - - - - - - Configurations to enable feedback buttons - - - - Enables a button to allow users to suggest edits via pull requests - - - Enables a button to allow users to raise an issue about the documentation - - - - - - Customize the dark mode toggle. - - - Set if you always want to show light or dark mode for new users. When not - set, we default to the same mode as the user's operating system. - - - Set to true to hide the dark/light mode toggle. You can combine `isHidden` with `default` to force your docs to only use light or dark mode. For example: - - - ```json Only Dark Mode - "modeToggle": { - "default": "dark", - "isHidden": true - } - ``` - - ```json Only Light Mode - "modeToggle": { - "default": "light", - "isHidden": true - } - ``` - - - - - - - - - A background image to be displayed behind every page. See example with - [Infisical](https://infisical.com/docs) and [FRPC](https://frpc.io). - diff --git a/docs/favicon.svg b/docs/favicon.svg deleted file mode 100644 index 59cc3575..00000000 --- a/docs/favicon.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/docs/index.mdx b/docs/index.mdx deleted file mode 100644 index 15e86aef..00000000 --- a/docs/index.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: "Introduction" -description: "Welcome to Presenton, your AI presentation generator" ---- - -**Presenton** is an open-source AI presentation generator that runs entirely on your local machine. Built as a powerful alternative to cloud-based tools like Gamma, Presenton offers you complete ownership of your data and full control over how presentations are generated. - -With seamless support for multiple large language models (LLMs)—including **OpenAI**, **Google Gemini**, and **Ollama**—you can generate high-quality, customizable slide decks from simple prompts or uploaded documents. Export your output in **PPTX** or **PDF** format and, when using Ollama, enjoy GPU-accelerated, fully offline generation with open-source models. - -Presenton is designed around three core principles: - -- **Simplicity** – No complex setup or vendor-specific tooling. -- **Flexibility** – Choose your preferred LLM, define your own themes, and fine-tune the generation workflow. -- **Transparency** – No telemetry, no vendor lock-in, and no hidden costs. - -Whether you're building technical presentations, summarizing reports, or creating educational materials, Presenton empowers you to work **securely**, **efficiently**, and **on your own terms**—with complete freedom over your infrastructure, APIs, and data. - -Join the open-source movement and redefine how presentations are made—**your slides, your way.** \ No newline at end of file diff --git a/docs/logo/dark.svg b/docs/logo/dark.svg deleted file mode 100644 index 80da82f9..00000000 --- a/docs/logo/dark.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/docs/logo/light.svg b/docs/logo/light.svg deleted file mode 100644 index 80da82f9..00000000 --- a/docs/logo/light.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/docs/quickstart.mdx b/docs/quickstart.mdx deleted file mode 100644 index 95aba9b8..00000000 --- a/docs/quickstart.mdx +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: "Quickstart" -description: "Follow these steps to get Presenton up and running using Docker" ---- - -### 🚀 Run Presenton - -#### 🔧 On Linux or macOS (Bash/Zsh): - -```bash -docker run -it --name presenton -p 5000:80 -v "./user_data:/app/user_data" ghcr.io/presenton/presenton:latest -```` - -#### 🪟 On Windows (PowerShell): - -```bash -docker run -it --name presenton -p 5000:80 -v "${PWD}\user_data:/app/user_data" ghcr.io/presenton/presenton:latest -``` - -> ✅ You can replace `5000` with any other available port to avoid conflicts. - - -### 🌐 Open in Your Browser - -After running the container, open your browser and navigate to: - -``` -http://localhost:5000 -``` - -You’re now ready to start generating presentations! diff --git a/docs/snippets/snippet-intro.mdx b/docs/snippets/snippet-intro.mdx deleted file mode 100644 index c57e7c75..00000000 --- a/docs/snippets/snippet-intro.mdx +++ /dev/null @@ -1,4 +0,0 @@ -One of the core principles of software development is DRY (Don't Repeat -Yourself). This is a principle that apply to documentation as -well. If you find yourself repeating the same content in multiple places, you -should consider creating a custom snippet to keep your content in sync. diff --git a/docs/tutorial/create-data-reports-using-ai.mdx b/docs/tutorial/create-data-reports-using-ai.mdx deleted file mode 100644 index 5a216313..00000000 --- a/docs/tutorial/create-data-reports-using-ai.mdx +++ /dev/null @@ -1,225 +0,0 @@ ---- -title: "Create Data Reports Using AI" -description: "Step-by-step guide to generating company sales reports from a CSV file" ---- - -In this tutorial, we will generate detailed, multi-slide sales data reports for multiple companies using a self-hosted Presenton's API and a Python script. - -This tutorial extends [Generate a PPT via API in 5 Minutes](./generate-presentation-over-api) and shows you how to automate the creation of structured sales reports from a CSV file using Python. - -So, do check it before continuing with this and make sure you have Presenton running locally or on any server, and you are able to generate presentations with it. - ---- - -## 1. Prepare Your CSV File - -Save your sales data as `sales_data.csv`: - -```csv -Company,Month,Region,Total Sales,Product A Sales,Product B Sales,Product C Sales,Quarter Target Achieved,Top Sales Rep,New Clients,Client Churn Rate,Growth vs Last Quarter,Marketing Spend,Customer Satisfaction,Notable Events -AcmeCorp,2024-03,North,98000,45000,37000,16000,Yes,Sarah Dee,13,2%,5.5%,11500,8.9,"Launched B2B platform" -AcmeCorp,2024-03,South,76800,30000,39000,7800,Yes,John Lee,9,3%,4.5%,9200,8.3,"New partnership established" -BetaBiz,2024-03,West,82000,22000,47000,13000,No,Monica Tai,7,4%,-1.0%,10900,7.3,"Ad campaign underperformed" -BetaBiz,2024-03,East,94500,40000,41000,13500,Yes,Derek Shah,11,2.2%,7.2%,12400,8.6,"Exceeded upsell targets" -ZenithLtd,2024-03,Central,101300,38000,51200,12000,Yes,Rita Ganesh,14,1.1%,9.6%,13800,9.2,"Record-high client retention" -ZenithLtd,2024-03,East,85450,25000,47000,13450,No,Marcus Bell,8,3.8%,-2.8%,10100,7.9,"Sales dip in Product C" -GammaInc,2024-03,North,91200,39000,43000,9200,Yes,Emily Jones,10,1.5%,6.2%,11800,8.8,"Employee incentive program" -GammaInc,2024-03,Sales Ops,79000,31000,39000,9000,No,David Yu,6,5.5%,-3.2%,8700,7.1,"System migration delayed" -``` - ---- - -## 2. Install Python Requirements - -You’ll need the `requests` and `pandas` libraries: - -```bash -pip install requests pandas -``` - ---- - -## 3. Write the Python Script - -Let’s build the script step by step. - -### a. Import Libraries - -```python -import os -import pandas as pd -import requests -``` - -### b. Create reports directory - -```python -os.makedirs('reports', exist_ok=True) -``` - -### c. Load the CSV - -```python -df = pd.read_csv("sales_data.csv") -``` - -### d. Group Data by Company - -```python -company_groups = df.groupby("Company") -``` - -### e. Define a Function to Build the Prompt - -```python -def build_prompt(company, group): - """ - Build a markdown prompt with data summary, chart instructions, and slide structure. - """ - summary = [] - regions = group['Region'].unique() - total_sales = group['Total Sales'].sum() - total_clients = group['New Clients'].sum() - churn = group['Client Churn Rate'].mean() - satisfaction = group['Customer Satisfaction'].mean() - growth = group['Growth vs Last Quarter'].mean() - marketing = group['Marketing Spend'].sum() - notable = "; ".join(group['Notable Events'].unique()) - - # Markdown-structured prompt - prompt = f""" -## Sales Report for {company} - -### 1. Executive Summary -- Total sales: **${total_sales:,.0f}** -- Average client churn: **{churn:.2f}%** -- Customer satisfaction: **{satisfaction:.2f}/10** -- Notable events: _{notable}_ - -### 2. Regional Performance -**Bar Chart:** Regional Total Sales - -| Region | Sales | -|---|---| -""" - for region in regions: - reg_sales = group[group['Region'] == region]['Total Sales'].sum() - prompt += f"| {region} | ${reg_sales:,.0f} |\n" - - prompt += """ - -### 3. Product Performance -**Bar Chart:** Sales by Product per Region - -| Region | Product A | Product B | Product C | -|---|---|---|---| -""" - for region in regions: - gr = group[group['Region'] == region] - a = gr['Product A Sales'].sum() - b = gr['Product B Sales'].sum() - c = gr['Product C Sales'].sum() - prompt += f"| {region} | ${a:,.0f} | ${b:,.0f} | ${c:,.0f} |\n" - - prompt += f""" - -### 4. Key Metrics & Trends -- Aggregate new clients this month: **{total_clients}** -- Mean growth vs last quarter: **{growth:.2f}%** -- Total marketing spend: **${marketing:,.0f}** - -### 5. Top Performers -| Region | Top Sales Rep | New Clients | -|---|---|---| -""" - for region in regions: - gr = group[group['Region'] == region] - rep = gr['Top Sales Rep'].iloc[0] - clients = gr['New Clients'].iloc[0] - prompt += f"| {region} | {rep} | {clients} |\n" - - prompt += """ - ---- - -**Instructions:** -- Create 1 slide per section (5 total). -- Use clean, professional visuals. -- For charts, display the specified bar chart with given data. -- Use summary bullet points before every chart or table for clarity. -**Do exactly as in said here.** -""" - - return prompt -``` - -### f. Loop Over Each Company and Generate a Report - -```python -for company, group in company_groups: - print(f"Generating report for {company}") - prompt = build_prompt(company, group) - data = { - "prompt": prompt, - "n_slides": "5", - "language": "English", - "theme": "light_red", - "export_as": "pdf" - } - response = requests.post( - "http://localhost:5000/api/v1/ppt/generate/presentation", - data=data - ) - if response.ok: - result = response.json() - print("Downloading report...") - download_url = f"http://localhost:5000{result['path']}" - filename = f"reports/{company}_Sales_Report.pdf" - file_response = requests.get(download_url) - if file_response.ok: - with open(filename, 'wb') as f: - f.write(file_response.content) - print(f"Report for {company} saved as {filename}") - else: - print(f"Failed to download report for {company}: {file_response.status_code}") - else: - print(f"Failed to generate report for {company}: {response.text}") -``` - -Generated reports will be saved in the `reports` directory. - -You may change the URL `http://localhost:5000` to the URL of your Presenton instance. - ---- - -## 4. Run the Script - -Save your script as `generate_sales_reports.py` and run: - -```bash -python generate_sales_reports.py -``` - -Each company will get a detailed, multi-slide sales report, and you’ll see the download path for each file in your terminal. - ---- - -## 5. How It Works - -- The script reads and groups your CSV by company. -- It builds a well-structured markdown prompt for Presenton’s API (see [API Reference](./generate-presentation-over-api)). -- It sends a POST request to generate a report for each company. -- The API returns a download path for each generated PDF. -- The file is downloaded and saved in the `reports` folder. - ---- - -## 6. Next Steps - -- You can further customize the prompt or number of slides as needed. -- For more on API options, see [Generate a PPT via API in 5 Minutes](./generate-presentation-over-api). -- For advanced configuration (for example, using Ollama or GPU), see [Environment Variables](../configurations/environment-variables), [Using GPU](../configurations/using-gpu), and [Using Ollama Models](../configurations/using-ollama-models). - - - Need help? See the [full documentation](./index) or open an issue on GitHub. - \ No newline at end of file diff --git a/docs/tutorial/generate-presentation-from-csv.mdx b/docs/tutorial/generate-presentation-from-csv.mdx deleted file mode 100644 index 4c0dd300..00000000 --- a/docs/tutorial/generate-presentation-from-csv.mdx +++ /dev/null @@ -1,150 +0,0 @@ ---- -title: "Create Presentations from CSV using AI" -description: "Step-by-step guide to generating presentations from a CSV file" ---- - -In this tutorial, we will generate personalized student report presentations using self hosted Presenton's API and a Python script. - -This tutorial extends [Generate a PPT via API in 5 Minutes](./generate-presentation-over-api) and shows you how to automate the creation of personalized student report presentations from a CSV file using Python. - -So, do check it before continuing with this and make sure you have Presenton running locally or any server and you are able to generate presentations with it. - ---- - -## 1. Prepare Your CSV File - -Save your student data as `students.csv`: - -```csv -Name,Final Grade,ECA Participation,Sports Involvement,Quiz Scores,Class Behavior,Comment -Anaya Sharma,88,High,Moderate,92,Excellent,"Balanced performer with high curiosity" -Rohan Mehta,73,Low,None,75,Good,"Needs motivation beyond academics" -Meera Kapoor,94,Moderate,High,96,Excellent,"Academic excellence and team spirit" -Aarav Patel,62,None,None,58,Average,"Struggling across areas, needs focused help" -``` - ---- - -## 2. Install Python Requirements - -You’ll need the `requests` and `pandas` libraries: - -```bash -pip install requests pandas -``` - ---- - -## 3. Write the Python Script - -Let’s build the script step by step. - -### a. Import Libraries - -```python -import os -import pandas as pd -import requests -``` - -### b. Creat presentations directory - -```python -os.makedirs('presentations', exist_ok=True) -``` - -### c. Load the CSV - -```python -df = pd.read_csv("students.csv") -``` - -### d. Define a Function to Build the Prompt - -```python -def build_prompt(row): - return ( - f"Student Name: {row['Name']}\n" - f"Final Grade: {row['Final Grade']}\n" - f"ECA Participation: {row['ECA Participation']}\n" - f"Sports Involvement: {row['Sports Involvement']}\n" - f"Quiz Scores: {row['Quiz Scores']}\n" - f"Class Behavior: {row['Class Behavior']}\n" - f"Teacher's Comment: {row['Comment']}\n\n" - "Generate a parent-friendly presentation summarizing this student's academic and extracurricular performance, " - "highlighting strengths, areas for improvement, and any special notes from the teacher." - ) -``` - -### e. Loop Over Each Student and Generate a Presentation - -```python -for idx, row in df.iterrows(): - print(f"Generating presentation for {row['Name']}") - prompt = build_prompt(row) - data = { - "prompt": prompt, - "n_slides": "8", - "language": "English", - "theme": "light", - "export_as": "pdf" - } - response = requests.post( - "http://localhost:5000/api/v1/ppt/generate/presentation", - data=data - ) - if response.ok: - result = response.json() - print("Downloading presentation...") - # Prepend the host to the path - download_url = f"http://localhost:5000{result['path']}" - filename = f"presentations/{result['path'].split('/')[-1]}" - # Download and save the file - file_response = requests.get(download_url) - if file_response.ok: - with open(filename, 'wb') as f: - f.write(file_response.content) - print(f"Presentation for {row['Name']} saved as {filename}") - else: - print(f"Failed to download presentation for {row['Name']}: {file_response.status_code}") - else: - print(f"Failed to generate presentation for {row['Name']}: {response.text}") -``` - -Generated presentations will be saved in `presentations` directory. - -You may change the URL `http://localhost:5000` to the URL of your Presenton instance. - ---- - -## 4. Run the Script - -Save your script as `generate_reports.py` and run: - -```bash -python generate_reports.py -``` - -Each student will get a personalized presentation, and you’ll see the download path for each file in your terminal. - ---- - -## 5. How It Works - -- The script reads each row from your CSV. -- It builds a detailed prompt for Presenton’s API (see [API Reference](./generate-presentation-over-api)). -- It sends a POST request to generate a presentation for each student. -- The API returns a download path for each generated PPTX. -- The presentation file is downloaded and saved in `presentations` folder. - ---- - -## 6. Next Steps - -- You can customize the prompt or number of slides as needed. -- For more on API options, see [Generate a PPT via API in 5 Minutes](./generate-presentation-over-api). -- For advanced configuration (e.g., using Ollama or GPU), see [Environment Variables](../configurations/environment-variables), [Using GPU](../configurations/using-gpu), and [Using Ollama Models](../configurations/using-ollama-models). - - - Need help? See the [full documentation](./index) or open an issue on GitHub. - \ No newline at end of file diff --git a/docs/tutorial/generate-presentation-over-api.mdx b/docs/tutorial/generate-presentation-over-api.mdx deleted file mode 100644 index 8ed5e6ca..00000000 --- a/docs/tutorial/generate-presentation-over-api.mdx +++ /dev/null @@ -1,195 +0,0 @@ ---- -title: "Generate Presentations via API in 5 minutes" -description: "Steps to generate professional AI presentations via self hosted Presenton's API in just 5 minutes. " ---- - -In this guide, I'll walk you through a simple, straightforward way to host and use Presenton’s API for generating presentations. If you're a developer or someone building tools or automation around presentations, this approach will save you some valuable time. - -Before we start, I'm assuming you've already set up Presenton. If not, just quickly check out the [Quickstart](../quickstart) or [Development guide](../development). - ---- - -## Step 1: Ensure Docker is Installed - -Presenton runs in Docker, making it easy to set up across different environments. - -- Don't have Docker yet? Just grab it from [here](https://www.docker.com/get-started). - ---- - -## Step 2: Run Presenton Locally with Docker - -You're now ready to run Presenton's docker image to start generating presentations. First, you will have to decide upon the LLM provider you're going to use to generate presentations. You can go for either `OPENAI`, `GOOGLE`or `OLLAMA` . `GOOGLE` is free to start with but if you want complete control and privacy `OLLAMA` allows you to host your own model, but also requires `PEXELS`(free image library) API key. - -We will go with `GOOGLE` in this guide as it's relatively simpler to configure and free to start with. You will have to grab its API Key from [Google AI Studio](https://aistudio.google.com/apikey). - -You can find details to run with other providers in [Environment Variables](../configurations/environment-variables). - -Now, open your command line and execute the relevant command based on your OS: - -### Linux/macOS: - -```bash -docker run -it --name presenton -p 5000:80 -e LLM="google" -e GOOGLE_API_KEY="***" -e CAN_CHANGE_KEYS="false" -v "./user_data:/app/user_data" ghcr.io/presenton/presenton:v0.3.0-beta -``` - -### Windows (PowerShell): - -```powershell -docker run -it --name presenton -p 5000:80 -e LLM="google" -e GOOGLE_API_KEY="***" -e CAN_CHANGE_KEYS="false" -v "${PWD}\user_data:/app/user_data" ghcr.io/presenton/presenton:v0.3.0-beta -``` - -> If port `5000` is already occupied or you prefer a different port, feel free to change it. - -Once this step is done, you can access Presenton locally at http://localhost:5000. - ---- - -## Step 3: (Optional) Configure Environment Variables - -Presenton supports several environment variables for customization (such as using OpenAI or local models). - -Typical use-cases you might encounter: - -- **External APIs**: [Using OpenAI or Gemini](./configurations/environment-variables). -- **GPU Acceleration**: [Using GPUs with Presenton](./configurations/using-gpu). -- **Local Models**: [Using Ollama and local models](./configurations/using-ollama-models). - -If you don't need to change anything right now, it's safe to skip this step. Return to it when you need more customization. - ---- - -## Step 4: Understanding the API Endpoint - -Generating presentations via Presenton's API is straightforward. It has one primary endpoint: - -``` -POST /api/v1/ppt/generate/presentation -``` - -For a deeper dive later, check the full [API documentation](../index). - ---- - -## Step 5: Making your first API Call - -Here's how you'd quickly generate a presentation called "Introduction to Machine Learning": - - - -```bash bash -curl -X POST http://localhost:5000/api/v1/ppt/generate/presentation \ - -F "prompt=Introduction to Machine Learning" \ - -F "n_slides=5" \ - -F "language=English" \ - -F "theme=light" \ - -F "export_as=pptx" -``` - - -```python python -import requests - -response = requests.post( - "http://localhost:5000/api/v1/ppt/generate/presentation", - data={ - "prompt": "Introduction to Machine Learning", - "n_slides": "5", - "language": "English", - "theme": "light", - "export_as": "pptx" - } -) - -print(response.json()) -``` - - -```javascript javascript -const axios = require("axios"); -const FormData = require("form-data"); - -const form = new FormData(); -form.append("prompt", "Introduction to Machine Learning"); -form.append("n_slides", "5"); -form.append("language", "English"); -form.append("theme", "light"); -form.append("export_as", "pptx"); - -axios.post("http://localhost:5000/api/v1/ppt/generate/presentation", form, { - headers: form.getHeaders() -}) -.then(res => console.log(res.data)) -.catch(err => console.error("Error:", err.response?.data || err.message)); -``` - - - ---- - -## Step 6: API Request Parameters Explained - -Here's a quick reference for the key parameters you can set: - -| Parameter | Type | Required | Description | -| ----------- | ------ | -------- | ---------------------------------------------------------- | -| `prompt` | string | Yes | Topic/title of your presentation | -| `n_slides` | int | No | Number of slides (default: 8; min: 5, max: 15) | -| `language` | string | No | Language you'd like the presentation in (default: English) | -| `theme` | string | No | Optional styling (e.g.: "light", "dark", "royal_blue") | -| `documents` | file[] | No | Additional supporting documents (PDF/PPTX/DOCX/TXT) | -| `export_as` | string | No | "pptx" or "pdf" (default: pptx) | - -Yes, it can generate presentations directly from most popular file formats. Make sure you understand the context window of model you're using with respect to file size. - -For now, these should be enough to get you going. Later, you can reference the [API docs](../index) if needed. - ---- - -## Step 7: API Response in Practice - -Here's what a normal, successful response looks like: - -```json -{ - "presentation_id": "d3000f96-096c-4768-b67b-e99aed029b57", - "path": "/static/user_data/d3000f96-096c-4768-b67b-e99aed029b57/Introduction_to_Machine_Learning.pptx", - "edit_path": "/presentation?id=d3000f96-096c-4768-b67b-e99aed029b57" -} -``` - -- **`presentation_id`**: Keep this handy if you want to refer back later. -- **`path`**: This is your generated PPT file. Download from here. -- `edit_path`: A convenient URL that lets you edit your slides directly from Presenton’s built-in editor. - -> Note: Make sure to prepend your server's root URL to the path and edit_path fields in the response to construct valid links. - ---- - -## Step 8: Built-in Presentation Themes - -Presenton provides easy-to-use themes for quick styling: - -- `light` (default, clean/professional look) -- `dark` (ideal for coding tutorials or tech seminars) -- `cream` (suitable for detailed reviews, proposals) -- `royal_blue` (great for presenting to clients or external stakeholders) -- `faint_yellow` (easy on eyes, educational slides) -- `light_red` (highlight warnings or critical presentations) -- `dark_pink` (marketing, creative slide decks) - ---- - -## Step 9 (Optional): Advanced Customization - -Once you're comfortable and ready for more: - -- Integrate your preferred LLMS: [Environment Variables](../configurations/environment-variables). -- Leverage GPU performance: [GPU Guide](../configurations/using-gpu). -- Run local AI models with Ollama: [Local Models](../configurations/using-ollama-models). - ---- - -**That's it\!** You've successfully generated a professional-looking presentation through an easy-to-use API endpoint. - -If you have more questions or want to explore further, the [complete documentation](../index) is always here to help you. \ No newline at end of file diff --git a/docs/using-presenton-api.mdx b/docs/using-presenton-api.mdx deleted file mode 100644 index bec2bb2c..00000000 --- a/docs/using-presenton-api.mdx +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: "Using Presenton API" -description: "You can use Presenton’s API to generate presentations programmatically. This is great for integrating Presenton into your own apps or workflows." ---- - -### 🎯 Endpoint - -``` -POST /api/v1/ppt/generate/presentation -``` - -Use this endpoint to generate a presentation from a prompt, outline, or uploaded documents. - -### 🧾 Request Format - -**Content-Type:** `multipart/form-data` - -| Field | Type | Required | Description | -| ----------- | -------- | -------- | --------------------------------------------------------------------- | -| `prompt` | `string` | Yes | The main topic or subject for the presentation | -| `n_slides` | `int` | No | Number of slides (default: 8, min: 5, max: 15) | -| `language` | `string` | No | Language of the presentation (default: `English`) | -| `theme` | `string` | No | Theme of the presentation (e.g., `light`, `dark`, `royal_blue`, etc.) | -| `documents` | `file[]` | No | Optional files (PDF, PPTX, DOCX, TXT) to include | -| `export_as` | `string` | No | Export format: `pptx` or `pdf` (default: `pptx`) | - -### 📤 Example Request - - - -```bash bash -curl -X POST http://localhost:5000/api/v1/ppt/generate/presentation \ - -F "prompt=Introduction to Machine Learning" \ - -F "n_slides=5" \ - -F "language=English" \ - -F "theme=light" \ - -F "export_as=pptx" -``` - - -```python python -import requests - -url = "http://localhost:5000/api/v1/ppt/generate/presentation" -data = { - "prompt": "Introduction to Machine Learning", - "n_slides": "5", - "language": "English", - "theme": "light", - "export_as": "pptx" -} - -response = requests.post(url, data=data) -print(response.json()) -``` - - -```javascript javascript -const axios = require("axios"); -const FormData = require("form-data"); - -const form = new FormData(); -form.append("prompt", "Introduction to Machine Learning"); -form.append("n_slides", "5"); -form.append("language", "English"); -form.append("theme", "light"); -form.append("export_as", "pptx"); - -axios.post("http://localhost:5000/api/v1/ppt/generate/presentation", form, { - headers: form.getHeaders() -}) -.then(response => { - console.log(response.data); -}) -.catch(error => { - console.error("Error:", error.response?.data || error.message); -}); -``` - - - -### 📥 Example Response - -```json -{ - "presentation_id": "d3000f96-096c-4768-b67b-e99aed029b57", - "path": "/static/user_data/d3000f96-096c-4768-b67b-e99aed029b57/Introduction_to_Machine_Learning.pptx", - "edit_path": "/presentation?id=d3000f96-096c-4768-b67b-e99aed029b57" -} -``` - -- `presentation_id`: Unique ID of the presentation -- `path`: File path for downloading the presentation -- `edit_path`: Link to open the presentation in the editor - ---- - -### ✅ Supported Themes - -- `light` (default) -- `dark` -- `cream` -- `royal_blue` -- `faint_yellow` -- `light_red` -- `dark_pink` diff --git a/servers/nextjs/app/(presentation-generator)/components/slide_layouts/Type2Layout.tsx b/servers/nextjs/app/(presentation-generator)/components/slide_layouts/Type2Layout.tsx index 3a3b2dd3..aba6a0db 100644 --- a/servers/nextjs/app/(presentation-generator)/components/slide_layouts/Type2Layout.tsx +++ b/servers/nextjs/app/(presentation-generator)/components/slide_layouts/Type2Layout.tsx @@ -86,7 +86,7 @@ const Type2Layout = ({ ); - const isGridLayout = body.length === 4; + const isGridLayout = body.length >= 4; const renderContent = () => { if (design_index === 3) { diff --git a/servers/nextjs/app/(presentation-generator)/components/slide_layouts/Type7Layout.tsx b/servers/nextjs/app/(presentation-generator)/components/slide_layouts/Type7Layout.tsx index 4460af64..f1831be6 100644 --- a/servers/nextjs/app/(presentation-generator)/components/slide_layouts/Type7Layout.tsx +++ b/servers/nextjs/app/(presentation-generator)/components/slide_layouts/Type7Layout.tsx @@ -47,18 +47,21 @@ const Type7Layout = ({ case 2: return 'lg:grid-cols-2'; case 3: return 'lg:grid-cols-3'; case 4: return 'lg:grid-cols-4'; + case 5: return 'lg:grid-cols-5'; + case 6: return 'lg:grid-cols-6'; + case 7: return 'lg:grid-cols-7'; // Add more cases as needed default: return 'lg:grid-cols-1'; } } - const isGridLayout = body.length === 4; + const isGridLayout = body.length >= 4; const renderContent = () => { if (isGridLayout) { return (
4 ? 'md:grid-cols-3' : 'md:grid-cols-2'} gap-4 sm:gap-6 lg:gap-8 mt-4 lg:mt-12 w-full relative group`} >