Skip to content

Commit

Permalink
Merge pull request #6 from ashu565/main
Browse files Browse the repository at this point in the history
safe dev
  • Loading branch information
dresslife-shbh authored Aug 23, 2024
2 parents 5251e5c + 06dd7e5 commit 15924c8
Show file tree
Hide file tree
Showing 184 changed files with 16,772 additions and 546 deletions.
Binary file added .DS_Store
Binary file not shown.
9 changes: 9 additions & 0 deletions Golem/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "@antfu",
"rules": {
"vue/html-indent": ["error", 4],
"@typescript-eslint/indent": ["error", 4],
"no-console": "off",
"curly": ["error", "all"]
}
}
59 changes: 59 additions & 0 deletions Golem/.github/workflows/release-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Deploy preview environment

on:
pull_request:
types: [ opened, synchronize, reopened ]

jobs:
release:
name: Push application to Vercel
runs-on: ubuntu-latest
steps:
- id: script
uses: actions/github-script@f05a81df23035049204b043b50c3322045ce7eb3 # pin@v3
with:
script: |
const isPr = [ 'pull_request', 'pull_request_target' ].includes(context.eventName)
core.setOutput('ref', isPr ? context.payload.pull_request.head.ref : context.ref)
core.setOutput('repo', isPr ? context.payload.pull_request.head.repo.full_name : context.repo.full_name)
core.setOutput('pr-number', context.payload.pull_request.number)
core.setOutput('repo-name', context.payload.pull_request.head.repo.full_name.split('/')[1])
- name: Get Token
id: auth
uses: peter-murray/workflow-application-token-action@e8782d687a306fb13d733244d0f2a50e272d3752 # pin@v1
with:
application_id: ${{ secrets.APPLICATION_ID }}
application_private_key: ${{ secrets.APPLICATION_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3
with:
fetch-depth: 0
ref: ${{ steps.script.outputs.ref }}
repository: ${{ steps.script.outputs.repo }}

- name: Deploy to Vercel
id: deploy
uses: BetaHuhn/deploy-to-vercel-action@v1 # pin@ffcc89a6d79de43d964945ce053395c2958610b1
env:
DOMAIN: golem-${{ steps.script.outputs.pr-number }}.vercel.app
with:
GITHUB_TOKEN: ${{ steps.auth.outputs.token }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_SCOPE: ${{ secrets.VERCEL_ORG_ID }}
PR_PREVIEW_DOMAIN: ${{ env.DOMAIN }}
BUILD_ENV: |
REDIRECT_URL=${{ env.DOMAIN }}
GOLEM_PASSWORD=${{ secrets.GEPPETO_PASSWORD }}#${{ steps.script.outputs.pr-number }}
APP_VERSION=${{ steps.script.outputs.ref }}#${{ steps.script.outputs.pr-number }}
- name: Deta Space Deployment
uses: neobrains/[email protected]
with:
access_token: ${{ secrets.DETA_ACCESS_TOKEN }}
project_id: ${{ secrets.DETA_PROJECT_ID }}
space_push: true

125 changes: 125 additions & 0 deletions Golem/.github/workflows/release-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: Deploy production environment

on:
workflow_dispatch:

jobs:
create-release:
name: Create release
runs-on: ubuntu-latest
steps:
- name: Get Token
id: auth
uses: peter-murray/workflow-application-token-action@e8782d687a306fb13d733244d0f2a50e272d3752 # pin@v1
with:
application_id: ${{ secrets.APPLICATION_ID }}
application_private_key: ${{ secrets.APPLICATION_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3
with:
fetch-depth: 0
ref: ${{ steps.script.outputs.ref }}
repository: ${{ steps.script.outputs.repo }}

- uses: clicampo/action-publish-semver-release@v1
id: release
with:
github-token: ${{ steps.auth.outputs.token }}
git-committer-name: Release bot
git-committer-email: [email protected]
release-candidate: false
# slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
# project-url: ${{ github.server_url }}/${{ github.repository }}
# production-action-url: ${{ github.server_url }}/${{ github.repository }}/actions/workflows/release-production.yml

- name: Create release artifacts
# Create a artifact with the release version, the name is the commit hash
run: |
mkdir -p artifacts
echo "${{ steps.release.outputs.next-version }}" > artifacts/${{ github.sha }}.txt
- name: Upload release artifacts
uses: actions/upload-artifact@v2
with:
name: release-artifacts
path: artifacts

publish-to-vercel:
name: Push application to Vercel
runs-on: ubuntu-latest
needs: create-release
steps:
- name: Get Token
id: auth
uses: peter-murray/workflow-application-token-action@e8782d687a306fb13d733244d0f2a50e272d3752 # pin@v1
with:
application_id: ${{ secrets.APPLICATION_ID }}
application_private_key: ${{ secrets.APPLICATION_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3
with:
fetch-depth: 0

- name: Deploy to Vercel
id: deploy
uses: BetaHuhn/deploy-to-vercel-action@v1 # pin@ffcc89a6d79de43d964945ce053395c2958610b1
env:
DOMAIN: app.golem.chat
with:
GITHUB_TOKEN: ${{ steps.auth.outputs.token }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_SCOPE: ${{ secrets.VERCEL_ORG_ID }}
PR_PREVIEW_DOMAIN: ${{ env.DOMAIN }}
PRODUCTION: true
ALIAS_DOMAINS: |
${{ env.DOMAIN }}
BUILD_ENV: |
REDIRECT_URL=${{ env.DOMAIN }}
APP_VERSION=${{ steps.script.outputs.ref }}#${{ steps.script.outputs.pr-number }}
publish-to-deta-space:
name: Push application to Deta Space
runs-on: ubuntu-latest
needs: create-release
steps:
- name: Get Token
id: auth
uses: peter-murray/workflow-application-token-action@e8782d687a306fb13d733244d0f2a50e272d3752 # pin@v1
with:
application_id: ${{ secrets.APPLICATION_ID }}
application_private_key: ${{ secrets.APPLICATION_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3
with:
fetch-depth: 0

- name: Get release artifacts
uses: actions/download-artifact@v2
with:
name: release-artifacts
path: artifacts

- name: Read release version # and set as a output
id: release
run: |
echo "::set-output name=release-version::$(cat artifacts/${{ github.sha }}.txt)"
- name: Deta Space Deployment
uses: henrycunh/space-deployment-github-action@05e4e73d6801abed32a3580c8e794ea790fab827
with:
access_token: ${{ secrets.DETA_ACCESS_TOKEN }}
project_id: ${{ secrets.DETA_PROJECT_ID }}
release_version: ${{ steps.release.outputs.release-version }}
use_experimental_build_pipeline: true
space_push: true
list_on_discovery: true
space_release: true



117 changes: 117 additions & 0 deletions Golem/.github/workflows/release-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: Deploy staging environment

on:
push:
branches:
- main

jobs:
create-release:
name: Create release
runs-on: ubuntu-latest
steps:
- name: Get Token
id: auth
uses: peter-murray/workflow-application-token-action@e8782d687a306fb13d733244d0f2a50e272d3752 # pin@v1
with:
application_id: ${{ secrets.APPLICATION_ID }}
application_private_key: ${{ secrets.APPLICATION_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3
with:
fetch-depth: 0
ref: ${{ steps.script.outputs.ref }}
repository: ${{ steps.script.outputs.repo }}

- uses: clicampo/action-publish-semver-release@v1
id: release
with:
github-token: ${{ steps.auth.outputs.token }}
git-committer-name: Release bot
git-committer-email: [email protected]
# slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
# project-url: ${{ github.server_url }}/${{ github.repository }}
# production-action-url: ${{ github.server_url }}/${{ github.repository }}/actions/workflows/release-production.yml

- name: Create release artifacts
# Create a artifact with the release version, the name is the commit hash
run: |
mkdir -p artifacts
echo "${{ steps.release.outputs.next-version }}" > artifacts/${{ github.sha }}.txt
- name: Upload release artifacts
uses: actions/upload-artifact@v2
with:
name: release-artifacts
path: artifacts

publish-to-vercel:
name: Push application to Vercel
runs-on: ubuntu-latest
needs: create-release
steps:
- name: Get Token
id: auth
uses: peter-murray/workflow-application-token-action@e8782d687a306fb13d733244d0f2a50e272d3752 # pin@v1
with:
application_id: ${{ secrets.APPLICATION_ID }}
application_private_key: ${{ secrets.APPLICATION_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3
with:
fetch-depth: 0

- name: Deploy to Vercel
id: deploy
uses: BetaHuhn/deploy-to-vercel-action@v1 # pin@ffcc89a6d79de43d964945ce053395c2958610b1
env:
DOMAIN: golem-chat-staging.vercel.app
with:
GITHUB_TOKEN: ${{ steps.auth.outputs.token }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_SCOPE: ${{ secrets.VERCEL_ORG_ID }}
PR_PREVIEW_DOMAIN: ${{ env.DOMAIN }}
ALIAS_DOMAINS: |
${{ env.DOMAIN }}
publish-to-deta-space:
name: Push application to Deta Space
runs-on: ubuntu-latest
needs: create-release
steps:
- name: Get Token
id: auth
uses: peter-murray/workflow-application-token-action@e8782d687a306fb13d733244d0f2a50e272d3752 # pin@v1
with:
application_id: ${{ secrets.APPLICATION_ID }}
application_private_key: ${{ secrets.APPLICATION_PRIVATE_KEY }}

- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3
with:
fetch-depth: 0

- name: Get release artifacts
uses: actions/download-artifact@v2
with:
name: release-artifacts
path: artifacts

- name: Read release version # and set as a output
id: release
run: |
echo "::set-output name=release-version::$(cat artifacts/${{ github.sha }}.txt)"
- name: Deta Space Deployment
uses: henrycunh/space-deployment-github-action@05e4e73d6801abed32a3580c8e794ea790fab827
with:
access_token: ${{ secrets.DETA_ACCESS_TOKEN }}
project_id: ${{ secrets.DETA_PROJECT_ID }}
release_version: ${{ steps.release.outputs.release-version }}
use_experimental_build_pipeline: true
space_push: true
12 changes: 12 additions & 0 deletions Golem/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
node_modules
*.log*
.nuxt
.nitro
.cache
.output
.env
dist

.space
.vercel
.DS_Store
1 change: 1 addition & 0 deletions Golem/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shamefully-hoist=true
37 changes: 37 additions & 0 deletions Golem/Discovery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
app_name: Golem
tagline: An open-source ChatGPT UI alternative
theme_color: "#f7f7f7"
git: "https://github.com/henrycunh/golem"
---


<div align="center">

<img src="./public/image/logo-light-lettered.svg" width="300" />

</div>

![](./docs/screenshot.png)

## 🚀 Key Features:

- ✅ Access to GPT-3.5 / GPT-4 APIs
- 🎨 Customizable UI
- ⭐️ Favorite messages and conversations
- 🔎 Search messages
- 🗑️ Delete message

## ☁ Hosted on the Personal Cloud with Deta

- 🔑 Your data and conversations only belong to you
- 📦  Integrate easily with other apps, everything on the personal cloud is programmable
- 🍻 Share chat history

## 🗺️ Roadmap:

- 📄 External knowledge (documents, websites, etc.) support
- 🤖 Additional AI language models support
- ☁️ User accounts and cross device synchronisation
- 🌍 Multi-language support
- 🔌 Plugins support
Loading

0 comments on commit 15924c8

Please sign in to comment.