Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
swk777 committed Oct 21, 2024
1 parent 0ed5016 commit c4fbdda
Show file tree
Hide file tree
Showing 142 changed files with 6,646 additions and 1,028 deletions.
42 changes: 18 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,41 @@
name: Build
name: Build and Release Electron App

on:
push:
branches: [main]
paths-ignore:
- "**.md"
- "**.spec.js"
- ".idea"
- ".vscode"
- ".dockerignore"
- "Dockerfile"
- ".gitignore"
- ".github/**"
- "!.github/workflows/build.yml"
tags:
- 'v*'

jobs:
build:
release:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
os: [macos-latest]

steps:
- name: Checkout Code
- name: Check out Git repository
uses: actions/checkout@v3

- name: Setup Node.js
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install Dependencies
run: npm install
run: npm i

- name: Build Release Files
- name: Build Electron App
run: npm run build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Artifact
uses: actions/upload-artifact@v3
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
name: release_on_${{ matrix. os }}
path: release/
retention-days: 5
files: |
release/0.0.8/VisionFlow_0.0.8.dmg
release/0.0.8/VisionFlow_0.0.8.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ yarn.lock
/test-results/
/playwright-report/
/playwright/.cache/
/examples
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"printWidth": 140,
"singleQuote": true,
"semi": true,
"useTabs": true,
"plugins": ["prettier-plugin-organize-imports"]
}
8 changes: 3 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
"typescript.tsc.autoDetect": "off",
"json.schemas": [
{
"fileMatch": [
"/*electron-builder.json5",
"/*electron-builder.json"
],
"fileMatch": ["/*electron-builder.json5", "/*electron-builder.json"],
"url": "https://json.schemastore.org/electron-builder"
}
]
],
"cSpell.words": ["Nodelets", "openai"]
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 草鞋没号
Copyright (c) 2024 larry

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
96 changes: 23 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,91 +1,41 @@
# electron-vite-react
# LlamaFlow

[![awesome-vite](https://awesome.re/mentioned-badge.svg)](https://github.com/vitejs/awesome-vite)
![GitHub stars](https://img.shields.io/github/stars/caoxiemeihao/vite-react-electron?color=fa6470)
![GitHub issues](https://img.shields.io/github/issues/caoxiemeihao/vite-react-electron?color=d8b22d)
![GitHub license](https://img.shields.io/github/license/caoxiemeihao/vite-react-electron)
[![Required Node.JS >= 14.18.0 || >=16.0.0](https://img.shields.io/static/v1?label=node&message=14.18.0%20||%20%3E=16.0.0&logo=node.js&color=3f893e)](https://nodejs.org/about/releases)
⚠️ **LlamaFlow is currently in Development**: Expect breaking changes and bugs!

English | [简体中文](README.zh-CN.md)
LlamaFlow is a local-first, extendable LLM (Large Language Model) orchestration app designed to streamline the running of LLM workflows locally.

## 👀 Overview
![demo.gif](/demo.gif)

📦 Ready out of the box
🎯 Based on the official [template-react-ts](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts), project structure will be familiar to you
🌱 Easily extendable and customizable
💪 Supports Node.js API in the renderer process
🔩 Supports C/C++ native addons
🐞 Debugger configuration included
🖥 Easy to implement multiple windows
## Philosophy

- **Local First**: Save all data locally if you prefer.
- **LLM Orchestration**: Utilize a pipeline approach for efficient LLM management.
- **Custom Extension**: Offers an open schema to load extensions easily.
- **Easy to Migrate**: Designed with migration simplicity in mind.

## 🛫 Quick Setup

```sh
# clone the project
git clone https://github.com/electron-vite/electron-vite-react.git
Follow these steps to get VisionFlow up and running on your local machine:

```bash
# Clone the project
git clone https://github.com/swk777/VisionFlow.git

# enter the project directory
cd electron-vite-react
# Enter the project directory
cd VisionFlow

# install dependency
# Install dependencies
npm install

# develop
# Start the development server
npm run dev
```

## 🐞 Debug

![electron-vite-react-debug.gif](/electron-vite-react-debug.gif)

## 📂 Directory structure

Familiar React application structure, just with `electron` folder on the top :wink:
*Files in this folder will be separated from your React application and built into `dist-electron`*

```tree
├── electron Electron-related code
│ ├── main Main-process source code
│ └── preload Preload-scripts source code
├── release Generated after production build, contains executables
│ └── {version}
│ ├── {os}-{os_arch} Contains unpacked application executable
│ └── {app_name}_{version}.{ext} Installer for the application
├── public Static assets
└── src Renderer source code, your React application
```

<!--
## 🚨 Be aware
This template integrates Node.js API to the renderer process by default. If you want to follow **Electron Security Concerns** you might want to disable this feature. You will have to expose needed API by yourself.
To get started, remove the option as shown below. This will [modify the Vite configuration and disable this feature](https://github.com/electron-vite/vite-plugin-electron-renderer#config-presets-opinionated).
```diff
# vite.config.ts

export default {
plugins: [
...
- // Use Node.js API in the Renderer-process
- renderer({
- nodeIntegration: true,
- }),
...
],
}
```
-->

## 🔧 Additional features
## Contributing

1. electron-updater 👉 [see docs](src/components/update/README.md)
1. playwright
Contributions are what make the open-source community such a powerful place to learn, inspire, and create. Any contributions you make are greatly appreciated.

## ❔ FAQ
## License

- [C/C++ addons, Node.js modules - Pre-Bundling](https://github.com/electron-vite/vite-plugin-electron-renderer#dependency-pre-bundling)
- [dependencies vs devDependencies](https://github.com/electron-vite/vite-plugin-electron-renderer#dependencies-vs-devdependencies)
Distributed under the MIT License. See LICENSE for more information.
91 changes: 0 additions & 91 deletions README.zh-CN.md

This file was deleted.

85 changes: 85 additions & 0 deletions app/globals.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
:root {
--background: 0 0% 100%;
--foreground: 240 10% 3.9%;

--card: 0 0% 100%;
--card-foreground: 240 10% 3.9%;

--popover: 0 0% 100%;
--popover-foreground: 240 10% 3.9%;

--primary: 208 80% 52%;
--primary-foreground: 0 0% 98%;

--secondary: 240 4.8% 95.9%;
--secondary-foreground: 240 5.9% 10%;

--muted: 240 4.8% 95.9%;
--muted-foreground: 240 3.8% 46.1%;

--accent: 240 4.8% 95.9%;
--accent-foreground: 240 5.9% 10%;

--destructive: 0 84.2% 60.2%;
--destructive-foreground: 0 0% 98%;

--border: 240 5.9% 90%;
--input: 240 5.9% 90%;
--ring: 240 10% 3.9%;

--radius: 0.5rem;
}

.dark {
--background: 240 10% 3.9%;
--foreground: 0 0% 98%;

--card: 240 10% 3.9%;
--card-foreground: 0 0% 98%;

--popover: 240 10% 3.9%;
--popover-foreground: 0 0% 98%;

--primary: 208 80% 52%;
--primary-foreground: 240 5.9% 10%;

--secondary: 240 3.7% 15.9%;
--secondary-foreground: 0 0% 98%;

--muted: 240 3.7% 15.9%;
--muted-foreground: 240 5% 64.9%;

--accent: 240 3.7% 15.9%;
--accent-foreground: 0 0% 98%;

--destructive: 0 62.8% 30.6%;
--destructive-foreground: 0 0% 98%;

--border: 240 3.7% 15.9%;
--input: 240 3.7% 15.9%;
--ring: 240 4.9% 83.9%;
}
}

@layer base {
* {
@apply border-border;
}
body {
@apply bg-background text-foreground;
}
}
.mantine-Modal-inner {
top: 0;
left: 0;
}
button:focus,
button:active {
outline: none !important;
border-color: transparent !important;
}
Loading

0 comments on commit c4fbdda

Please sign in to comment.