Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
212 commits
Select commit Hold shift + click to select a range
7347299
feat(Import): allow importing code from images (OCR)
hatemhosny May 29, 2025
79fa71f
edit code-to-image share url color
hatemhosny May 29, 2025
a0030c5
edit share url pattern
hatemhosny May 29, 2025
694916f
search for share url in last 2 lines of image
hatemhosny May 29, 2025
bd8e549
remove line numbers after OCR
hatemhosny May 30, 2025
dfceed4
ci: add bundle size workflow
hatemhosny May 30, 2025
c4945ae
edit minimum-change-threshold
hatemhosny May 30, 2025
2dc9cf2
edit bundlewatch config
hatemhosny May 30, 2025
a7bba2e
update gh checkout action version
hatemhosny May 30, 2025
b793193
Merge pull request #839 from live-codes/bundle-size
hatemhosny May 30, 2025
db91a27
Merge branch 'develop' into import-image
hatemhosny May 30, 2025
f79b013
fix removing line numbers
hatemhosny May 30, 2025
58b2f26
feat(Code-to-Image): add share url to png meta data
hatemhosny May 31, 2025
cd056bb
feat(UI): show loading notification when importing from UI
hatemhosny May 31, 2025
b192195
handle svg as text
hatemhosny Jun 1, 2025
aef91c2
Merge pull request #837 from live-codes/import-image
hatemhosny Jun 5, 2025
60ae1cb
i18n: pull translation from Lokalise
livecodes-ci[bot] Jun 6, 2025
b7a8975
Merge pull request #844 from live-codes/i18n/live-codes/import-image
hatemhosny Jun 6, 2025
faac6e8
add playground force-destroy option
felixhuttmann Jun 6, 2025
c44fe3e
fix(SDK): force destroy playground even if stuck (e.g. in infinite loop)
hatemhosny Jun 8, 2025
59b2412
revert changes in types & docs
hatemhosny Jun 8, 2025
fe19282
Merge pull request #846 from felixhuttmann/add-playground-destroy-for…
hatemhosny Jun 8, 2025
3c1184f
fix(SDK): clean-up SDK event handlers
hatemhosny Jun 8, 2025
de8c7f0
increase CI bundle size threshold
hatemhosny Jun 8, 2025
0916784
Merge pull request #847 from live-codes/clean-sdk-handlers
hatemhosny Jun 8, 2025
8a28eb1
refactor(App): add `languages` and `processors` to `window.deps` and …
hatemhosny Jun 10, 2025
cfb465c
fix storybook
hatemhosny Jun 10, 2025
c9de444
fix jest
hatemhosny Jun 10, 2025
16010bc
Merge pull request #849 from live-codes/refactor-languages
hatemhosny Jun 10, 2025
4cea457
Docker & Compose File for easier selfhosting
Jun 2, 2025
24218d2
updated docker compose filename
Jun 10, 2025
7ff8b89
Merge pull request #843 from abight-devsanctuary/feature/docker
hatemhosny Jun 11, 2025
3c80238
chore: rename codeium to windsurf
hatemhosny Jun 11, 2025
8a152f0
edit bundlewatch threshold
hatemhosny Jun 11, 2025
e176939
chore: export i18n
hatemhosny Jun 11, 2025
a3ea579
fix radio button margin
hatemhosny Jun 11, 2025
b45a47d
Merge pull request #850 from live-codes/rename-to-windsurf
hatemhosny Jun 11, 2025
2e26d97
WIP
hatemhosny Jun 13, 2025
b68e79e
wip
hatemhosny Jun 14, 2025
940ba28
feat(i18n): add Persian language
hatemhosny Jun 14, 2025
9ad8437
Merge pull request #851 from live-codes/i18n-add-persian
hatemhosny Jun 14, 2025
06ef260
i18n: pull translation from Lokalise
livecodes-ci[bot] Jun 14, 2025
7863281
Merge pull request #852 from live-codes/i18n/live-codes/i18n-add-persian
hatemhosny Jun 14, 2025
9d1b9df
wip
hatemhosny Jun 21, 2025
5395c81
fix(docs): correct broken links due to .mdx/.md mismatch
seifsapagh Jun 24, 2025
13ab83c
Merge pull request #856 from seifsapagh/fix/broken-doc-links
hatemhosny Jun 25, 2025
5e4ea43
wip
hatemhosny Jun 25, 2025
1759b84
feat(self-hosting): self-host share service
hatemhosny Jun 27, 2025
865e1f3
feat(self-hosting): add broadcast server to self-host
hatemhosny Jun 28, 2025
31159ea
feat(self-hosting): custom log url
hatemhosny Jun 28, 2025
90c5c58
edit env vars defaults
hatemhosny Jun 30, 2025
bc458b0
fix
hatemhosny Jun 30, 2025
c3429f6
feat(self-hosting): docker continuous deployment
hatemhosny Jul 4, 2025
c44d311
fix docs link
hatemhosny Jul 4, 2025
5564f5f
edit vps env
hatemhosny Jul 4, 2025
b97b35b
use main branch
hatemhosny Jul 4, 2025
0117855
publish to docker hub
hatemhosny Jul 4, 2025
6b9811a
fix
hatemhosny Jul 4, 2025
9770750
fix
hatemhosny Jul 4, 2025
ed2592d
fix
hatemhosny Jul 4, 2025
a56d402
do not push to docker hub
hatemhosny Jul 4, 2025
4a0cc2e
edit docs to mention docker
hatemhosny Jul 5, 2025
5de7c1e
Merge branch 'develop' into docker
hatemhosny Jul 5, 2025
f0d540a
add docker user
hatemhosny Jul 5, 2025
1de1411
fix security issue (IO access for user-controlled path)
hatemhosny Jul 5, 2025
4af5d34
fix lint
hatemhosny Jul 5, 2025
44dc19e
fix docker user
hatemhosny Jul 6, 2025
fc7ec58
run valkey only when share is enabled
hatemhosny Jul 6, 2025
2529b5a
use env vars in app as strings
hatemhosny Jul 6, 2025
dcaa9b2
fix
hatemhosny Jul 6, 2025
a0430f8
remove redundant port
hatemhosny Jul 6, 2025
e6af819
exit docker deploy script on error
hatemhosny Jul 6, 2025
9d7d716
Skip caching of packages index if not needed
hatemhosny Jul 6, 2025
6579819
use named volumes
hatemhosny Jul 6, 2025
71dc271
organize docker volumes
hatemhosny Jul 7, 2025
fefc5ed
serve ip
hatemhosny Jul 8, 2025
bd67fc5
edit Caddyfile
hatemhosny Jul 8, 2025
d9a9cc8
clean up caddyfile
hatemhosny Jul 8, 2025
3b103c1
use ssh key docker deploy
hatemhosny Jul 8, 2025
dc51bd0
fix
hatemhosny Jul 8, 2025
cdd67d3
fix docker build timeout
hatemhosny Jul 8, 2025
948863a
fix lint
hatemhosny Jul 8, 2025
d118e3d
fix docker build timeout
hatemhosny Jul 8, 2025
7b9ac78
fix timeout
hatemhosny Jul 8, 2025
585a242
edit docs
hatemhosny Jul 8, 2025
c0cd993
increase memory for build
hatemhosny Jul 8, 2025
9c706e7
increase memory
hatemhosny Jul 8, 2025
e3e364f
revert
hatemhosny Jul 8, 2025
bd53691
fix docs
hatemhosny Jul 8, 2025
42467d2
add DO deploy template
hatemhosny Jul 8, 2025
71679ea
edit
hatemhosny Jul 8, 2025
d20ea3b
edit
hatemhosny Jul 9, 2025
6fe914c
edit
hatemhosny Jul 9, 2025
e9b3fde
edit
hatemhosny Jul 9, 2025
15c59e5
DO
hatemhosny Jul 9, 2025
4525010
clean up
hatemhosny Jul 9, 2025
1a278e7
use main branch for docker deploy
hatemhosny Jul 9, 2025
8f5bcfe
add credit to DO
hatemhosny Jul 9, 2025
4082e05
Merge pull request #857 from live-codes/docker
hatemhosny Jul 9, 2025
43339a8
fix(CommandMenu): fix selecting languages in command menu
hatemhosny Aug 23, 2025
58efd27
fix
hatemhosny Aug 23, 2025
708bf08
Merge pull request #862 from live-codes/fix-command-menu
hatemhosny Aug 23, 2025
2f857f8
fix command menu hotkey
hatemhosny Aug 23, 2025
0c25761
fix
hatemhosny Aug 23, 2025
7acda7f
Merge pull request #863 from live-codes/fix-command-menu
hatemhosny Aug 23, 2025
61d6fcd
Fixing, from `npm build` to `npm run build`.
Red007Master Aug 27, 2025
3586b5e
Merge pull request #864 from Red007Master/patch-1
hatemhosny Aug 27, 2025
3531576
init
Muhammad-Ayman Sep 1, 2025
0178064
lint:prettier
Muhammad-Ayman Sep 1, 2025
d4da641
restore templates.js
Muhammad-Ayman Sep 1, 2025
4cc3352
fix rating issues
Muhammad-Ayman Sep 2, 2025
419a690
fix test
Muhammad-Ayman Sep 2, 2025
b2bba60
give up on e2e XD
Muhammad-Ayman Sep 2, 2025
419cd4d
fix the “runs once only” behavior
Muhammad-Ayman Sep 3, 2025
eecb75f
fix Quality Gate
Muhammad-Ayman Sep 3, 2025
f865ca5
test:lint
Muhammad-Ayman Sep 3, 2025
0719401
edit go-wasm script
hatemhosny Sep 3, 2025
f05fe7f
fixes
hatemhosny Sep 3, 2025
533e221
fix(Config): fix loading user config
hatemhosny Sep 6, 2025
8d99d68
Merge pull request #867 from live-codes/fix-loading-user-config
hatemhosny Sep 6, 2025
2cd50ea
feat(Modules): import unpublished modules under development from pkg.…
hatemhosny Sep 7, 2025
eee9b67
fix regex pattern
hatemhosny Sep 7, 2025
e14dcce
Merge pull request #868 from live-codes/import-from-pkg.pr.new
hatemhosny Sep 8, 2025
d9443b7
Merge pull request #1 from live-codes/go-wasm
Muhammad-Ayman Sep 8, 2025
cd349bd
Merge branch 'develop' into Feature_Support_Go_wasm
hatemhosny Sep 8, 2025
3a78ade
Stdin Buffer Management
Muhammad-Ayman Sep 10, 2025
9208fb8
JavaScript gets current count from Ui
Muhammad-Ayman Sep 10, 2025
8e77243
fix Loading... issue
Muhammad-Ayman Sep 10, 2025
169f23c
finish the starter
Muhammad-Ayman Sep 10, 2025
b5e57a8
add info
Muhammad-Ayman Sep 11, 2025
3076b59
fix(App): fix persistent loading message in compiled code viewer
hatemhosny Sep 13, 2025
dd3514a
feat(Compilers): show compiler error messages in console
hatemhosny Sep 13, 2025
4a98852
gleam compiler - return error message
hatemhosny Sep 13, 2025
e258c52
svelte compiler - return error message
hatemhosny Sep 13, 2025
9135d4b
vue compiler - return error message
hatemhosny Sep 13, 2025
3f71897
fixes
hatemhosny Sep 13, 2025
17511a9
fix
hatemhosny Sep 13, 2025
2df2a7c
show language title in error message
hatemhosny Sep 13, 2025
f46a5c6
Merge pull request #869 from live-codes/show-compiler-errors
hatemhosny Sep 13, 2025
af05c0b
Merge branch 'develop' into Feature_Support_Go_wasm
hatemhosny Sep 13, 2025
2a17e3c
fix(i18n): optimize i18n types performance
zyf722 Sep 14, 2025
2fb2d3d
minor edits
hatemhosny Sep 14, 2025
f156468
add docs for go & go-wasm
hatemhosny Sep 14, 2025
b59fff5
add licenses
hatemhosny Sep 14, 2025
5bd4181
fix(i18n): no need for extra type checking workflow, revert #718
zyf722 Sep 15, 2025
a6f5a7a
fix(i18n): fix formatting / jsdoc & use unknown instead of any
zyf722 Sep 15, 2025
e49863f
Yaegi WebAssembly - Guide
Muhammad-Ayman Sep 15, 2025
c8acd7a
Merge pull request #870 from zyf722/i18next-integration-draft
hatemhosny Sep 15, 2025
2536438
Merge branch 'develop' into Feature_Support_Go_wasm
hatemhosny Sep 15, 2025
9482640
Revert "Yaegi WebAssembly - Guide"
Muhammad-Ayman Sep 17, 2025
a15492a
feat(Config): allow setting customSettings in query params
hatemhosny Sep 18, 2025
7b87bee
add link to `yaegi-wasm` repo and license
hatemhosny Sep 18, 2025
cadba67
run `i18n-export`
hatemhosny Sep 18, 2025
1294cb9
fix(SDK): allow return value of `getShareUrl()` to be used as `appUrl`
hatemhosny Sep 18, 2025
b3f4938
Merge pull request #871 from live-codes/build-config-improvements
hatemhosny Sep 18, 2025
4a5917e
feat(UI): show a mark when project info fields (`head` or `htmlAttrs`…
hatemhosny Sep 18, 2025
2900706
feat(Import): extract `htmlAttrs`
hatemhosny Sep 18, 2025
e4beb57
Merge pull request #872 from live-codes/project-info-enhancements
hatemhosny Sep 18, 2025
76a3e1c
fix(Result): allow importing stylesheets in markup editor
hatemhosny Sep 20, 2025
f920e62
fixes
hatemhosny Sep 20, 2025
647c964
Merge pull request #873 from live-codes/fix-importing-styles
hatemhosny Sep 20, 2025
b6d5d35
docs(Compilers): add docs for markdown support
hatemhosny Sep 21, 2025
ea0ae9d
docs(Compilers): add docs for mdx support
hatemhosny Sep 21, 2025
2d1dbc9
Merge pull request #874 from live-codes/add-language-docs
hatemhosny Sep 21, 2025
69c83da
Merge branch 'develop' into Feature_Support_Go_wasm
hatemhosny Sep 22, 2025
422c649
Merge pull request #866 from Muhammad-Ayman/Feature_Support_Go_wasm
hatemhosny Sep 22, 2025
2532f23
feat(Config): set config objects in query params
hatemhosny Sep 23, 2025
596462d
fix
hatemhosny Sep 23, 2025
5908cae
Merge pull request #876 from live-codes/config-objects-in-params
hatemhosny Sep 23, 2025
8a0bd4a
i18n: pull translation from Lokalise
livecodes-ci[bot] Sep 23, 2025
2ac1d64
i18n: pull translation from Lokalise
livecodes-ci[bot] Sep 23, 2025
7e3653f
Merge branch 'develop' into i18n/Muhammad-Ayman/Feature_Support_Go_wasm
hatemhosny Sep 23, 2025
341c5d5
Merge pull request #877 from live-codes/i18n/Muhammad-Ayman/Feature_S…
hatemhosny Sep 23, 2025
9719c9a
make `Config.Editor.language` optional
hatemhosny Sep 23, 2025
968e2a5
fix test
hatemhosny Sep 23, 2025
b46f8ca
Merge pull request #878 from live-codes/fix-validate-config
hatemhosny Sep 23, 2025
5eca80e
fix(Compilers): do not add Tailwind compiled CSS in code blocks
hatemhosny Sep 24, 2025
b206b43
Merge pull request #879 from live-codes/tailwind-blocks
hatemhosny Sep 24, 2025
1f0292c
fix(Config): fix updating editor config
hatemhosny Sep 24, 2025
1ac5860
Merge pull request #880 from live-codes/fix-updating-editor-config
hatemhosny Sep 24, 2025
79b4a70
fix(SDK): fix `height` in Vue SDK
hatemhosny Sep 24, 2025
98837f6
Merge pull request #881 from live-codes/fix-vue-sdk-height
hatemhosny Sep 24, 2025
b717efc
fix(Config): fix changing editor config from SDK
hatemhosny Sep 26, 2025
69cf99d
fix
hatemhosny Sep 26, 2025
f58ca11
fix content-only update from SDK
hatemhosny Sep 27, 2025
5b0ba07
fix
hatemhosny Sep 27, 2025
ba8ceff
Merge pull request #882 from live-codes/fix-changing-editor-config
hatemhosny Sep 27, 2025
f077639
fix(Editor): do not show lineNumbers in console editor
hatemhosny Sep 27, 2025
2d6fa4c
fix
hatemhosny Sep 27, 2025
6e0ee57
Merge pull request #883 from live-codes/fix-console-line-numbers
hatemhosny Sep 27, 2025
8662daa
remove links to vercel
hatemhosny Sep 29, 2025
397cfda
Merge pull request #884 from live-codes/remove-links-to-vercel
hatemhosny Sep 29, 2025
245cdc7
fix(Result): avoid rerenders on firefox (sandbox v9)
hatemhosny Oct 1, 2025
9c72074
avoid rerenders when setting config from SDK
hatemhosny Oct 1, 2025
db26765
fix typos
hatemhosny Oct 1, 2025
dae1e0f
Merge pull request #885 from live-codes/fix-rerender
hatemhosny Oct 1, 2025
4f99d6c
chore: update python-wasm to 0.28.3
sbelluzzo Oct 3, 2025
9295076
Merge pull request #888 from sbelluzzo/update-pyodide-0.28.3
hatemhosny Oct 3, 2025
4573b33
clean up python-wasm script
hatemhosny Oct 3, 2025
bdaed67
fix
hatemhosny Oct 3, 2025
c8dec77
add comment
hatemhosny Oct 3, 2025
b94bd82
Merge pull request #889 from live-codes/cleanup-python-wasm
hatemhosny Oct 3, 2025
b9fc42d
upgrade node version
hatemhosny Sep 28, 2025
c764946
upgrade to node v24.4.1
hatemhosny Sep 28, 2025
11a30c0
add in docker NODE_OPTIONS="--max-old-space-size=4096"
hatemhosny Sep 28, 2025
41497b0
avoid using node sync methods
hatemhosny Sep 28, 2025
e813862
fix color picker
hatemhosny Sep 28, 2025
d268aeb
fix
hatemhosny Sep 28, 2025
f9e6adf
fix server sandbox
hatemhosny Oct 4, 2025
7f93fb4
Merge pull request #890 from live-codes/fixes
hatemhosny Oct 4, 2025
0660fab
release: sdk-v0.12.0
hatemhosny Oct 4, 2025
0fcb40d
Merge pull request #891 from live-codes/releases/sdk-v0.12.0
hatemhosny Oct 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .bundlewatch.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ module.exports = {
path: './build/livecodes/*(app|embed|headless).*.js',
maxSize: '120kB',
},
// {
// path: './build/livecodes/lang-*.js',
// maxSize: '10kB',
// },
{
path: './build/livecodes/lang-*.js',
maxSize: '10kB',
},
{
path: './build/livecodes/*.css',
maxSize: '25kB',
},
// {
// path: './build/livecodes/i18n-*.json',
// maxSize: '10kB',
// },
{
path: './build/livecodes/i18n-*.json',
maxSize: '15kB',
},
],
defaultCompression: 'brotli',
normalizeFilenames: /^.+?((\.[^.]{8,}}?)|())\.\w+$/,
Expand Down
20 changes: 20 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
node_modules
*/node_modules
*/build
docs/.docusaurus
.vscode
.jest
build
dist
.cache
**/*.log
.env
docs/docs/api
docs/static/**/*.html.md
docs/static/llms.txt
docs/static/llms-full.txt
/test-results/
/playwright-report/
/playwright/.cache/
src/livecodes/i18n/locales/tmp/
lokalise_tmp
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sh text eol=lf
28 changes: 0 additions & 28 deletions .github/workflows/CI-type-checking.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/bundle-size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Bundle Size

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: preactjs/compressed-size-action@v2
with:
build-script: 'build:app'
pattern: './build/**/*.{js,css,html,json}'
strip-hash: "\\b\\w{32}\\."
minimum-change-threshold: 200
compression: 'brotli'
28 changes: 28 additions & 0 deletions .github/workflows/docker-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Docker Deploy

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: SSH to server
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USER }}
key: ${{ secrets.VPS_KEY }}
passphrase: ${{ secrets.VPS_PASSPHRASE }}
script: |
set -e
cd livecodes
git checkout main
git pull origin main
echo "${{ vars.VPS_ENV }}" > .env
docker compose build
docker compose up -d
docker container prune -f
docker image prune -a -f
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ jobs:
CF_ZONE: ${{ secrets.CF_ZONE }}
CF_TOKEN: ${{ secrets.CF_TOKEN }}

# - name: Build and Push to Docker Hub
# run: |
# echo ${{secrets.DOCKERHUB_TOKEN}} | docker login --username ${{ vars.DOCKERHUB_USERNAME }} --password-stdin
# docker build -t ${{ vars.DOCKERHUB_USERNAME }}/livecodes:latest -t ${{ vars.DOCKERHUB_USERNAME }}/livecodes:${{steps.vars.outputs.version}} .
# docker push ${{ vars.DOCKERHUB_USERNAME }}/livecodes:latest
# docker push ${{ vars.DOCKERHUB_USERNAME }}/livecodes:${{steps.vars.outputs.version}}

- name: Publish SDK to NPM
if: startsWith(github.head_ref, 'releases/sdk-v')
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ dist
.cache
**/*.log
.env
/ignore
*.ignore.*
docs/docs/api
docs/static/**/*.html.md
docs/static/llms.txt
Expand All @@ -13,3 +15,4 @@ docs/static/llms-full.txt
/playwright/.cache/
src/livecodes/i18n/locales/tmp/
lokalise_tmp
/server/data
1 change: 0 additions & 1 deletion .jest/setup.js

This file was deleted.

6 changes: 6 additions & 0 deletions .jest/setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import pkg from '../package.json';
import { languages } from '../src/livecodes/languages/languages';
import { processors } from '../src/livecodes/languages/processors';

process.env.VERSION = pkg.appVersion;
(window as any).deps = { languages, processors };
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.20.4
v24.4.1
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"Build",
"services",
"CommandMenu",
"Accessibility"
"Accessibility",
"self-hosting"
],
"html.customData": ["./.vscode/html.html-data.json"]
}
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ All notable changes to this project will be documented in this file. See [standa

---

## [sdk-v0.12.0](https://github.com/live-codes/livecodes/compare/sdk-v0.11.1...sdk-v0.12.0) (2025-10-04)

### Features

- **SDK:** allow return value of `getShareUrl()` to be used as `appUrl` ([1294cb9](https://github.com/live-codes/livecodes/commit/1294cb97a82c5c01ee6685e2c7acbdfc37f61e12))

### Bug Fixes

- **SDK:** clean-up SDK event handlers ([3c1184f](https://github.com/live-codes/livecodes/commit/3c1184f9555e609ab757ab66ba4162a2f33e4f7d))
- **SDK:** fix `height` in Vue SDK ([79b4a70](https://github.com/live-codes/livecodes/commit/79b4a70629c34497bc5cff78e0acacc90e0d5e00))
- **SDK:** force destroy playground even if stuck (e.g. in infinite loop) ([c44fe3e](https://github.com/live-codes/livecodes/commit/c44fe3ecaf069cccb7711028664bcd89a79ef824))

### Credits

- @felixhuttmann added force destroying playground even if stuck

Thank you ❤️

---

## [sdk-v0.11.1](https://github.com/live-codes/livecodes/compare/v46...sdk-v0.11.1) (2025-05-24)

### Bug Fixes
Expand Down
52 changes: 52 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
FROM node:24.4.1-alpine3.22 AS builder

RUN apk update --no-cache && apk add --no-cache git

WORKDIR /app

COPY package*.json ./
COPY docs/package*.json docs/
COPY storybook/package*.json storybook/
COPY server/package*.json server/

RUN npm ci

COPY . .

ARG SELF_HOSTED
ARG SELF_HOSTED_SHARE
ARG SELF_HOSTED_BROADCAST
ARG BROADCAST_PORT
ARG SANDBOX_HOST_NAME
ARG SANDBOX_PORT
ARG FIREBASE_CONFIG
ARG DOCS_BASE_URL
ARG NODE_OPTIONS

RUN if [ "$DOCS_BASE_URL" == "null" ]; \
then npm run build:app; \
else npm run build; \
fi

FROM node:24.4.1-alpine3.22 AS server

RUN addgroup -S appgroup
RUN adduser -S appuser -G appgroup

RUN mkdir -p /srv && chown -R appuser:appgroup /srv

USER appuser

WORKDIR /srv

COPY server/package*.json ./

RUN npm ci

COPY --from=builder /app/build/ build/

COPY functions/ functions/
COPY server/src/ server/src/
COPY src/livecodes/html/sandbox/ server/src/sandbox/

CMD ["node", "server/src/app.ts"]
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ A [feature-rich](https://livecodes.io/docs/features/), open-source, **client-sid
[![LiveCodes: npm version](https://img.shields.io/npm/v/livecodes)](https://www.npmjs.com/package/livecodes)
[![LiveCodes: npm downloads](https://img.shields.io/npm/dm/livecodes)](https://www.npmjs.com/package/livecodes)
[![LiveCodes: jsdelivr downloads](https://data.jsdelivr.com/v1/package/npm/livecodes/badge?style=rounded)](https://www.jsdelivr.com/package/npm/livecodes)
[![LiveCodes: languages](https://img.shields.io/badge/languages-96-blue)](https://livecodes.io/docs/languages/)
[![LiveCodes: languages](https://img.shields.io/badge/languages-97-blue)](https://livecodes.io/docs/languages/)
[![LiveCodes: docs](https://img.shields.io/badge/Documentation-575757?logo=gitbook&logoColor=white)](https://livecodes.io/docs/)
[![LiveCodes: llms.txt](https://img.shields.io/badge/llms.txt-575757?logo=googledocs&logoColor=white)](https://livecodes.io/docs/llms.txt)
[![LiveCodes: llms-full.txt](https://img.shields.io/badge/llms--full.txt-575757?logo=googledocs&logoColor=white)](https://livecodes.io/docs/llms-full.txt)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/3d39f15618e048db9d13c2a0e8002b33)](https://www.codacy.com/gh/live-codes/livecodes/dashboard?utm_source=github.com&utm_medium=referral&utm_content=live-codes/livecodes&utm_campaign=Badge_Grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/3d39f15618e048db9d13c2a0e8002b33)](https://app.codacy.com/gh/live-codes/livecodes/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![Lokalise: translated](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/live-codes/lokalise-badge/main/badges/translated.json)](https://app.lokalise.com/public/34958094667a72e9454592.95108106/)
[![Lokalise: UI languages](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/live-codes/lokalise-badge/main/badges/languages.json)](https://app.lokalise.com/public/34958094667a72e9454592.95108106/)
[![license - MIT](https://img.shields.io/github/license/live-codes/livecodes)](https://github.com/live-codes/livecodes/blob/develop/LICENSE)
Expand Down Expand Up @@ -85,7 +85,7 @@ Add this code to your page:
#### Self-hosted

1. Download a [release](https://github.com/live-codes/livecodes/releases)
2. Put it on a static file server (for free!) <sup><a href="https://pages.cloudflare.com/" target="_blank" rel="noopener">1</a>, <a href="https://vercel.com/" target="_blank" rel="noopener">2</a>, <a href="https://www.netlify.com/" target="_blank" rel="noopener">3</a>, <a href="https://firebase.google.com/" target="_blank" rel="noopener">4</a>, <a href="https://pages.github.com/" target="_blank" rel="noopener">5</a></sup>
2. Put it on a static file server (for free!) <sup><a href="https://pages.cloudflare.com/" target="_blank" rel="noopener">1</a>, <a href="https://www.netlify.com/" target="_blank" rel="noopener">2</a>, <a href="https://firebase.google.com/" target="_blank" rel="noopener">3</a>, <a href="https://pages.github.com/" target="_blank" rel="noopener">4</a></sup>

<sup>Check the guide for <a href="https://livecodes.io/docs/features/self-hosting" target="_blank" rel="noopener">self-hosting</a> (including the built-in setup to deploy to GitHub Pages).</sup>

Expand Down Expand Up @@ -270,8 +270,13 @@ LiveCodes uses services that are generously provided by:
</img></a><br /><br />
</p>
<p>
<a href="https://codeium.com/" target="_blank" title="Codeium">
<img alt="Codeium" width="200" src="https://dev.livecodes.io/docs/img/credits/codeium.svg">
<a href="https://windsurf.com/" target="_blank" title="Windsurf">
<img alt="Windsurf" width="200" src="https://dev.livecodes.io/docs/img/credits/windsurf.svg">
</img></a><br /><br />
</p>
<p>
<a href="https://m.do.co/c/fb8c00b45b91" target="_blank" title="DigitalOcean">
<img alt="DigitalOcean" width="200" src="https://dev.livecodes.io/docs/img/credits/digital-ocean.svg">
</img></a><br /><br />
</p>
<p>
Expand Down
83 changes: 83 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
- SELF_HOSTED=true
- SELF_HOSTED_SHARE=${SELF_HOSTED_SHARE:-true}
- SELF_HOSTED_BROADCAST=${SELF_HOSTED_BROADCAST:-true}
- BROADCAST_PORT=${BROADCAST_PORT:-3030}
- SANDBOX_HOST_NAME=${SANDBOX_HOST_NAME:-${HOST_NAME:-livecodes.localhost}}
- SANDBOX_PORT=${SANDBOX_PORT:-8090}
- FIREBASE_CONFIG=${FIREBASE_CONFIG:-}
- DOCS_BASE_URL=${DOCS_BASE_URL:-null}
- LOCAL_MODULES=${LOCAL_MODULES:-false}
- NODE_OPTIONS=--max-old-space-size=4096
restart: unless-stopped
environment:
- SELF_HOSTED=true
- HOST_NAME=${HOST_NAME:-livecodes.localhost}
- PORT=${PORT:-443}
- SELF_HOSTED_SHARE=${SELF_HOSTED_SHARE:-true}
- SELF_HOSTED_BROADCAST=${SELF_HOSTED_BROADCAST:-true}
- BROADCAST_PORT=${BROADCAST_PORT:-3030}
- BROADCAST_TOKENS=${BROADCAST_TOKENS:-}
- SANDBOX_HOST_NAME=${SANDBOX_HOST_NAME:-${HOST_NAME:-livecodes.localhost}}
- SANDBOX_PORT=${SANDBOX_PORT:-8090}
- LOG_URL=${LOG_URL:-null}
- VALKEY_HOST=valkey
- VALKEY_PORT=6379
- NODE_OPTIONS=--max-old-space-size=4096
volumes:
- ./assets:/srv/build/assets
depends_on:
- valkey

valkey:
image: valkey/valkey:8.1.2-alpine3.22
restart: on-failure
volumes:
- valkey-data:/data
command:
[
"sh",
"-c",
'if [ "$SELF_HOSTED_SHARE" != "false" ]; then valkey-server --save 60 1 --loglevel warning; fi',
]

server:
image: caddy:2.10.0-alpine
entrypoint: ["/bin/sh", "./entrypoint.sh"]
command:
[
"caddy",
"run",
"--config",
"/etc/caddy/Caddyfile",
"--adapter",
"caddyfile",
]
restart: unless-stopped
ports:
- "80:80"
- "${PORT:-443}:${PORT:-443}"
- "${SANDBOX_PORT:-8090}:${SANDBOX_PORT:-8090}"
- "${BROADCAST_PORT:-3030}:${BROADCAST_PORT:-3030}"
environment:
- HOST_NAME=${HOST_NAME:-livecodes.localhost}
- PORT=${PORT:-443}
- SANDBOX_HOST_NAME=${SANDBOX_HOST_NAME:-${HOST_NAME:-livecodes.localhost}}
- SANDBOX_PORT=${SANDBOX_PORT:-8090}
- BROADCAST_PORT=${BROADCAST_PORT:-3030}
volumes:
- ./server/caddy/entrypoint.sh:/srv/entrypoint.sh
- ./server/caddy/Caddyfile:/etc/caddy/Caddyfile
- ./server/data/caddy/data:/data
- ./server/data/caddy/config:/config
depends_on:
- app

volumes:
valkey-data:
name: livecodes-share-data
Loading