Commit Graph
45 Commits
Author SHA1 Message Date
Oleg Isonen 97c18cc937 fix: configure published asset origin 2026-09-20 11:44:00 +01:00
Oleg Isonen 8e7a8a21aa feat: Report anonymous MCP reliability issues (#6021)
Closes #6020

## Summary

Adds the first end-to-end slice for anonymous, LLM-authored reliability
reports from the CLI and MCP.

The shared report contract captures the generalized user story,
attempted workflow, expectation, actual result, recovery attempts, user
impact, technical context, acceptance criteria, and agent runtime
(client, provider, model, version, and reasoning effort). Guidance
requires removing any user- or project-identifying information before
submission.

## Architecture

- Adds a project-authenticated `api.reports.issue` tRPC mutation as the
reusable product boundary.
- Maps that mutation to the public `report-issue` operation for CLI and
MCP callers.
- Keeps the endpoint directly callable from a future Builder UI through
the existing tRPC client.
- Publishes through a server-side GitHub App installation, so end users
do not need GitHub accounts or tokens.
- Discovers the App installation for the fixed Webstudio reporting
repository instead of requiring deployment-specific installation or
repository configuration.
- Searches for a hidden anonymous technical marker before creation to
avoid obvious duplicates.

## Todo

1. [x] Define a shared anonymous LLM-authored report contract.
2. [x] Include the user story, attempted workflow, expected and actual
behavior, recovery attempts, impact, technical context, and acceptance
criteria.
3. [x] Include the LLM client, provider, model, client version when
known, and reasoning effort.
4. [x] Attach sanitized CLI, Node.js, operating-system, architecture,
execution-mode, and API-contract metadata automatically.
5. [x] Add the Builder-reusable project tRPC mutation.
6. [x] Expose the mutation to CLI and MCP as `report-issue`.
7. [x] Add GitHub App authentication and issue publication.
8. [x] Reduce deployment configuration to the App ID and private key.
9. [x] Add marker-based duplicate detection.
10. [x] Add guidance for explicit user-requested reports and qualifying
repeated-friction reports.
11. [x] Review and simplify repeated GitHub request handling and public
protocol exports.
12. [ ] Add server-side throttling and harden concurrent duplicate
creation.
13. [x] Configure and install the reporting GitHub App in deployed
environments.
14. [x] Exercise the deployed endpoint with a controlled test report.
15. [ ] Run the complete agent evaluation suite after explicit approval.
16. [x] Review documentation impact and update the generated MCP
documentation.

## Verification

- Protocol issue-report contract tests: passed (3)
- Builder GitHub reporting tests: passed (4)
- Builder API router tests: passed (30)
- CLI schema, command-doc, MCP, and project-session tests: passed
- Protocol, HTTP client, project-build, CLI, and Builder typechecks:
passed
- Root lint: passed
- Generated API and documentation checks: passed
- New and changed regression tests were demonstrated failing against the
previous behavior, then passing after implementation
- No fixture inputs or outputs are affected
- Agent evaluations were not run because they require explicit approval

## Deployment notes

The Builder only needs `GITHUB_ISSUE_REPORT_APP_ID` and
`GITHUB_ISSUE_REPORT_PRIVATE_KEY`. The server discovers the App
installation for `webstudio-is/webstudio` and creates a short-lived
installation token. The App needs repository metadata read access and
Issues write access.

## Known limitations

Duplicate detection currently uses GitHub issue search and can race when
identical reports arrive concurrently. The endpoint is
project-authenticated, but dedicated server-side throttling remains a
follow-up before production rollout. No Builder UI is included yet; the
tRPC boundary is intentionally ready for one.
2026-08-06 00:32:51 +02:00
Oleg Isonen 82c3d83fd1 fix: optimize CLI import for large data amount (#5831)
## Summary

- Add CLI project import support from synced `.webstudio/data.json` into
another project via a destination share link.
- Move project bundle import/export contract into
`@webstudio-is/protocol`, including bundle versioning, staged upload
constants, schema validation, and fixture coverage.
- Upload project bundle data through staged TUS upload before calling
the import RPC to avoid request body limits.
- Upload referenced assets as binary files through the existing asset
upload route before importing asset rows.
- Add `--skip-assets` and `--ignore-version-check` import options.
- Add retry handling for transient missing imported asset files by
re-uploading only the reported missing assets.
- Share missing-asset import error formatting/parsing through protocol
to avoid duplicated string contracts.
- Preserve browser asset upload behavior while adding API upload
support.
- Normalize schema naming across the branch to lower-case names without
`Schema` suffix.
2026-06-23 18:50:01 +02:00
Oleg Isonen 9ea5f70a73 chore: Pages.staging (#5736)
## Description

1. What is this PR about (link the issue and add a short description)

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
0000)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2026-04-28 19:43:21 +02:00
Oleg Isonen b006947a85 feat: WIP realtime collaboration to builder (#5726)
https://github.com/webstudio-is/webstudio/issues/46
2026-04-27 23:19:21 +02:00
Oleg Isonen c0d2ebf8e0 feat: Remove starter templates, add welcome screen with guide and social links (#5722) 2026-04-25 19:42:57 +02:00
Oleg Isonen ce3c82b582 chore: Decouple plans from the builder as much as possible (#5687) 2026-04-12 14:53:23 +02:00
Oleg Isonen b8a194c011 feat: Workspaces (#5641) 2026-04-08 21:58:20 +02:00
Oleg Isonen f28e99d85a chore: Payments (#5671) 2026-04-01 21:00:00 +02:00
Oleg Isonen a7329a6452 feat: Migrate billing portal from n8n to payment worker (#5653) 2026-03-31 13:55:31 +02:00
Oleg Isonen cb9619e7d1 feat: Staging password (#5526)
## Description

The password is fixed for everyone and readonly. Can't be defined by
each user in the cloud.

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
0000)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2025-12-18 20:15:25 +01:00
Bogdan Chadkin 6bc16940e0 chore: drop AI from UI (#5344)
Our first AI experiment is barely used. And we don't want our users to
confuse it with upcoming Inception. The next integrated with builder
solution will be based on Inception.
2025-08-03 02:04:26 +02:00
Bogdan Chadkin 302f5daa7f refactor: hardcode asset and upload path in builder (#4579)
We hardcoded asset base url in image loader.
Though locally different one is not resolved properly. So aligned local
and deployed image paths with /cgi/asset/ everywhere. Images are now
uploaded to public/cgi/asset locally.
2024-12-13 23:18:22 +07:00
Bogdan Chadkin f7f98b6f4b refactor: drop image base url from builder (#4556)
Builder rely on cloud based image resolution which does not require
additional configuration. Here I dropped IMAGE_BASE_URL env and replaced
bypassing it to loader with loader default.
2024-12-11 22:48:23 +07:00
Ivan Starkov f7487fd1bc chore: New Builder Auth (#4010)
## Description

### Full track


https://github.com/webstudio-is/webstudio-saas/issues/317#issuecomment-2289241819

So thoughts about session

https://github.com/webstudio-is/webstudio-saas/issues/317#issuecomment-2314515772

Some explanations what is fixed and how

https://github.com/webstudio-is/webstudio-saas/issues/317#issue-2465048823

Next PR:
- [x] - Old share links auto redirect
- [x] - Try make better error message having that current PR will logout
all users.

## Steps for reproduction

1. Login using `google login` or `dev login` try to open projects on
dahsboard, create new, clone delete etc.
2. Try to open projects on dahboard, see each is on it's own domain and
work
3. Try to open project link (without share token) with other user -
should fail.
4. Try publish/clone any links and operations.
5. Share project from `userA`:
 - try to open it with other `userB`
   - see `userB` is not logged in to that project
- try to get using fetch from console anything about `userB` or `userA`
i.e rest etc endpoints on apps.webstudio.is domain
 - try to open incognito, check it works.
6. Open few project, then logout from dashboard, reload project page
 - See login page
 - Try to login as same uer - see it works
 - Or try to login as another user - see auth error


## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-08-29 12:38:39 +03:00
Ivan Starkov 0b0707e61f chore: Project login (#3990)
## Description

New Project login without any automation or link changes.

corresponding PR
https://github.com/webstudio-is/webstudio-saas/pull/319


## Steps for reproduction

- Goto [Tmp/Login manul
page](https://oauth.staging.webstudio.is/tmp/login)
- Manually login/logout to project domains

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-08-24 08:58:54 +03:00
Ivan Starkov 50575df29b chore: Use secure cookies in local development and fix layout nesting (#3949)
## Description

- Use secure cookie at local development
- Fix layout nesting
https://remix.run/docs/en/main/file-conventions/routes#nested-urls-without-layout-nesting

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-08-17 00:53:29 +03:00
Ivan Starkov 6a930b1c0c feat: Compare server and client versions and prompt for reload. (#3833)
## Description

Reload if server and client versions do not match on patch

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-07-30 20:10:22 +03:00
Ivan Starkov 231c792ebf experimental: Enhance Performance by Using Postgrest to Fetch Data from Build Table (#3758)
## Description

[Big Project
Example](https://postgrest.development.webstudio.is/builder/be939bf2-9095-4e17-b175-69de2bbf9597)

Reduces time of big projects loading:

✓ { scenario:new_o }...........: avg=2.58s min=1.99s med=2.54s max=3.53s
p(90)=2.95s p(95)=3.15s p(99)=3.44s count=31
✓ { scenario:old_o }...........: avg=5.5s min=4.55s med=5.12s max=15.58s
p(90)=5.44s p(95)=6.02s p(99)=12.87s count=31

2 times faster. (but highly depends on test times, project size etc
sometimes it's 6x difference)

Reduces patch time too.

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env` file
2024-07-20 18:34:36 +03:00
Ivan Starkov 3105b5cec0 feat: Make it easy for a self-hosted version to set the plan features (#3475)
## Description

closes #3400 


`+` on dev login its now possible to add any email
like 
`{code}:hello@world.xx` to login as other user


## Steps for reproduction

Login on main with `{code}:ice@yandex.ru`
- See no plan
<img width="213" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/65f79295-63b3-4d4f-b5d2-ed854f8462e3">

---

Login on main as usual
- See user has plan
<img width="265" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/db9e1c3e-a8d7-4cde-bbd5-1f39ce7442b8">

---

Login locally
See user has plan

<img width="231" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/c1187bce-2c7e-49f3-a3ac-bfa15560ccce">




## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-06-02 14:54:19 +03:00
Ivan Starkov 393cc90612 build: Move build time env vars in env.static (#3183)
## Description

This variables are build time and not dependent on deploy. Moreover we
don't know them during production deploy.
But they are used as versioning at saas level 


## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2024-04-17 16:34:46 +03:00
Bogdan Chadkin ae79d9f133 refactor: drop env interop (#3109)
Here got rid from client-server env interop which will stop working
outside of node-like environment.
2024-04-07 00:55:42 +07:00
Bogdan Chadkin b704861a33 refactor: move image base url into loader (#3108)
Here moved IMAGE_BASE_URL and ASSET_BASE_URL env variables into loader.
Builder now can access image loader with atom.
2024-04-06 23:02:23 +07:00
Bogdan Chadkin 7c0db06c77 refactor: move publisher host into loader (#3102)
Here refactored ours envs.

- deleted BUILDER_HOST as unused
- moved PUBLISHER_HOST into loader and shared in UI with atom
2024-04-06 22:09:27 +07:00
Bogdan Chadkin 156ddf2dc4 refactor: simplify login buttons (#3105)
Here removed non-working tooltips for dev only environments and got rid
from one more client env.
2024-04-06 21:04:40 +07:00
Bogdan Chadkin eb5e9200d9 refactor: drop unused sentry (#3100)
We do not use sentry 1 year (since 5 april 2023).
Better get rid of for now to not block updates.
2024-04-05 23:21:45 +07:00
Bogdan Chadkin 6ea37250cf refactor: drop debug (#3099)
I think nobody used this utility for a while
and we do not really need to support it in our code.
2024-04-05 22:39:09 +07:00
Ivan Starkov b27a01355e feat: N8N support (#2614)
## Description

Link to `apps.webstudio.is/n8n/anything` solves 2 things.

1. Login user if it's not logged in
2. Executes schema in n8n passing userId and all query parameters
inside.

Example:

```
https://n8n.prs.webstudio.is/n8n/buy/stripe/com?link=test_dR67uJ0bu3fS2Zi4gh
```

Will execute [dev
schema](https://webstudio.app.n8n.cloud/workflow/mdNfsFIIwnoMsz6N) hook


`${N8N_WEBHOOK_URL}/buy/stripe/com?link=test_dR67uJ0bu3fS2Zi4gh`

```env
N8N_WEBHOOK_URL="https://webstudio.app.n8n.cloud/webhook-test/"
```

Schema after work will respond or with error or with redirect.



## Steps for reproduction

Open [n8n dev
schema](https://webstudio.app.n8n.cloud/workflow/mdNfsFIIwnoMsz6N)
Execute in Dev Mode (at bottom)
Open URL
[https://n8n.prs.webstudio.is/n8n/buy/stripe/com?link=test_dR67uJ0bu3fS2Zi4gh](https://n8n.prs.webstudio.is/n8n/buy/stripe/com?link=test_dR67uJ0bu3fS2Zi4gh)
See it works

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-11-15 18:33:16 +02:00
Ivan Starkov 1a5a58fd4b fix: Fix image loader paths (#2604)
## Description

Also add default asset path to remove env variables from setup

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-11-12 15:48:37 +02:00
Ivan Starkov 5b1cf6a11a fix: Make image path consistent with worker (#2593)
## Description

Make image path consistent with worker
Changed vercel env  for this branch `ASSET_BASE_URL = "/cgi/asset"`


## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-11-12 15:22:08 +02:00
Ivan Starkov 9c90a357cd feat: Report deployment url at *.prs.webstudio.is (#2590)
## Description

To have ability to test some cloudflare worker issues we are now have
*.prs.webstudio.is domains.
Builder app now can be accessed through such urls.

Here we add prs.webstudio app url at the end of status list

<img width="973" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/5e716b07-bee5-41bd-9db6-deae01df89cd">

Known issues:
will not work if branch names exceed 24 chars,

Gonna not fix for now.


## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-11-09 20:02:03 +02:00
Ivan Starkov 09fe7f2222 feat: Remove useless variables and logic (#2589)
## Description

Removed `process.env.BUILD_ORIGIN`,
`process.env.BUILD_REQUIRE_SUBDOMAIN`
And highly simplified corresponding logic

Next PR:
Removal of `DEPLOYMENT_URL`

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-11-09 18:20:00 +02:00
Ivan Starkov efb0425e9a fix: Page Setting URL Misformatted (#2567)
## Description

https://discord.com/channels/955905230107738152/1170434939318182020

## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-11-05 19:37:06 +02:00
Bogdan Chadkin 81e58fe1f5 feat: search images in pexels with ai (#2453)
Added basic support for generating images with ai. AI generates jsx with
`<img alt="">` and we use the alt to search images in pexels.
2023-10-12 11:57:06 +04:00
Giuseppe 61c7960d3c feat: AI Package (#2307)
This PR introduces the baseline `@webstudio-is/ai` package which
includes:

1. A LLM Abstraction (types) for messages format to make requests to a
model
2. An implementation of the above that uses the OpenAI chat completion
endpoint
3. A common interface for chains. Chains are regular async functions
that can execute an arbitrary number of steps, including calling a LLM
via a model client.

The idea is that a builder API route can use any of these chains to
perform a task that requires AI. For example generate text copy, images,
a theme etc.
2023-09-25 10:59:44 +02:00
Ivan Starkov f659565d96 Add project templates (#2138)
## Description

closes #2134

<img width="1400" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/c868898a-e3ae-4b81-bbac-8a7c3b55e98d">

On card click

<img width="631" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/897c9863-1a66-4bf5-93d0-bcff147823e6">





Also fixed resize

<img width="953" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/f890668c-c022-47ec-9745-fc5dc9433264">

Made it

<img width="1204" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/5d2bc6cf-9495-4657-a1d1-e0f8c15516e5">



## Steps for reproduction

1. click button
2. expect xyz

## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
2023-08-20 11:40:11 +03:00
Ivan StarkovandOleg Isonen c534eb6965 Entri (#1738)
## Description

Implements entri service support

## Steps for reproduction

Wait for SaaS release. Or locally add following env variables to the
`.env` file
```
ENTRI_APPLICATION_ID=webstudio
ENTRI_SECRET=$(bwget WS_ENTRI_SECRET)
```

<img width="361" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/eafcc7ec-1bc7-448f-be78-50ae89909d34">


<img width="724" alt="image"
src="https://github.com/webstudio-is/webstudio-builder/assets/5077042/6d97a08b-1763-4ca4-970f-96836b4d5cd2">



## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-builder/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory

---------

Co-authored-by: Oleg Isonen <oleg008@gmail.com>
2023-06-12 16:10:27 +04:00
Bogdan Chadkin 3fcf37e02b Add image proxy route (#1453)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1179

Here added image proxy - simple remix route to interop image requests
locally and in preview. We have now only single image loader which
accepts image base url.

Here support only local deployment. Preview and saas preview to
RESIZE_ORiGIN env.
2023-05-14 23:25:34 +07:00
Bogdan Chadkin 4375cd9ea0 Pass asset base url for fonts and style images (#1451)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1179

publicPath and cdnUrl are separate environment variables for different
deployments. Though they do exactly same thing we can unify them as
asset base url.
2023-04-14 14:49:58 +07:00
Bogdan Chadkin b71180b7ad Pass all asset uploader envs from builder (#1442)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1179

Here all envs which were accessed and parsed in asset uploader moved to
builder. Now we have better control over assets in different
environments.
2023-04-13 13:35:57 +07:00
Bogdan Chadkin 18afa9d92b Pass cdn url to remote image loader (#1414)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1179

Migrated away from env parsing in asset loader by moving cdn resolving
logic to image loader. Now ASSET_CDN_URL should be provided.

In builder there is fallback to s3 bucket.endpoint.
2023-04-13 09:37:19 +07:00
Bogdan Chadkin 34181a1a95 Add public path to local image loader (#1409)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1179

Added ASSET_PUBLIC_PATH env for local development
and publicPath option in local image loader.

Now fs asset client provides name as path without modification on server
side.
2023-04-11 22:02:44 +07:00
Bogdan Chadkin 304e82f979 Split s3 and fs logic from asset uploader into "clients" (#1386)
Ref https://github.com/webstudio-is/webstudio-builder/issues/1179

Currently asset-uploader package consume all configuration from
environment. Though it prevents using any other environment.
Configuration better be passed from builder.

Here all s3 and fs related logic is splitted into fs client and s3
client which is configured and passed from builder.

For now splitted only delete and upload utilities.
2023-04-07 15:27:25 +07:00
Oleg Isonen 245ff1f8ed less cocain for somebody 2023-03-17 23:36:07 +01:00
Andras Bacsai ac413cdd5f rename designer to builder 2023-02-14 11:15:24 +01:00