Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using LabelStudio frontend only #6957

Open
nikhilguptagl opened this issue Jan 24, 2025 · 3 comments
Open

Using LabelStudio frontend only #6957

nikhilguptagl opened this issue Jan 24, 2025 · 3 comments

Comments

@nikhilguptagl
Copy link

Hi, I was using LabelStudio frontend in my project as a npm library. I understand that it was deprecated last year. And I am seeing that now in this repo we have frontend and backend both. Is there any way, I can use LabelStudio frontend only without backend and I can aur custom backend for this ?

@heidi-humansignal
Copy link
Collaborator

Hello,

Thank you for contacting Label Studio,

I am afraid to inform you that as of Label Studio 1.11.0, the standalone LSF npm package was officially deprecated and is no longer maintained or supported as a separate distribution. Now, Label Studio is developed as an integrated monorepo where the backend and frontend are tightly coupled.

If you truly need to run LSF without the official backend, you have two main approaches:

  1. Build From Source (Monorepo):
    • You can clone the Label Studio repository and look under “web/libs/editor.”

• Manually build the frontend portion for your own environment.

• But please note, this requires a custom integration layer between the frontend and any backend you develop yourself. Label Studio no longer provides official documentation for this setup.
2. Use an Older Version of LSF:
• If you want to rely on the deprecated LSF npm package, you could pin an older version (e.g., versions before 1.11.0).

• However, these versions receive no further updates or fixes, and you’d still have to handle all backend logic and data handling yourself.
Because of deprecated support, we recommend using the fully integrated Label Studio platform if at all possible. Should you still want to proceed with a custom solution, you’d need to rely on manual building and maintain your own custom reconciliation between LSF and your backend.
Let me know if you have any follow-up questions!

Comment by Oussama Assili
Workflow Run

@nikhilguptagl
Copy link
Author

Thanks for the response,
However, I have installed the packages inside web/libs/editor but I see there is no way, I can run the files as there are no commands inside package.json.

I see we have to install the packages inside web/ folder and then run the server from there to run the frontend part of it? Is that true ?

I have to use the frontend package and deploy it on higher environments so that content engineers can use it. Can you provide any optimal solution for this ?

@heidi-humansignal
Copy link
Collaborator

Hello Nikhil,

Thanks for following up on this. With the shift starting in Label Studio 1.11.0, the standalone LSF npm package is deprecated and the project is now maintained as an integrated monorepo. That means the frontend and backend are now tightly coupled, and the dedicated commands you might expect in the web/libs/editor folder (like in a separate package.json for a standalone build) aren’t available.
If you need to deploy only the frontend (for content engineers or as part of your custom solution), here are your two main options:

  1. Build from Source (Monorepo Approach):
  • Clone the Repository:

Use the develop branch (or the branch where the build process is updated) because it contains the latest structure for the frontend. In recent setups, the frontend assets can be found in the integrated folder such as label-studio/label_studio/frontend.

  • Install and Build:

You won’t find dedicated run commands in web/libs/editor because it isn’t intended to run standalone. Instead, go to the root (or web/) of the repository and run the installation/build commands (e.g., using npm install or yarn install). This process builds both the backend and frontend together.

  • Extract the Frontend Assets:

After building, the resulting static assets (JS/CSS files) are typically placed under a path like label_studio/frontend/dist/lsf/. You can then extract these files and deploy them on your environment as a static site, which your content engineers can use.

  1. Using an Older Version of LSF:
  • You could consider pinning an older version of the LSF npm package (pre-1.11.0) that was still maintained as a standalone library.
  • Keep in mind, though, that these older versions no longer receive updates or bug fixes, and you’d need to implement all required backend integrations on your own.
    Our recommendation is to use the fully integrated Label Studio platform if possible. This ensures you have all the latest features, security updates, and full support out of the box. However, if your use case truly demands a standalone frontend deployment, the “build from source” approach with asset extraction is your optimal solution.
    Please let me know if you need more detailed instructions on the build process or assistance with any of these steps.

Thank you,
Abu

Comment by Abubakar Saad
Workflow Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants