samply.lens is a front-end library that provides essential functionalities for building search, exploration, and visualization web applications. It offers a set of flexible building blocks while remaining open to user-specific extensions.
This library can be included in various ways. Below are some examples of tools built with samply.lens:
For further documentation, please refer to:
The main goal of samply.lens is to standardize common aspects of building search and exploration applications. It is structured around four core pillars:
- Catalogue – Supplies search attributes in a standardized format.
- Query Language – Defines a query structure (internally called
queryitems
, externally known as AST) that can be generated by samply.lens components or external tools. - Execution – AST queries can be processed by Samply components or custom implementations.
- Standardized Result Definitions – Ensures compatibility with visualization tools such as charts and exploration interfaces.
We strive to keep the library lightweight. Therefore, samply.lens does not include any major CSS libraries. However, all components are fully customizable. We use Web Components, ensuring compatibility with major JavaScript frameworks:
To quickly try out samply.lens, clone the repository and run the tests. For building a new application, follow the New-App Guide.
To set up a development environment for samply.lens, ensure you have Node.js and npm installed.
- Clone the repository:
git clone https://github.com/samply/lens.git
- Install dependencies:
npm install
- Start the development server:
This will launch a server, typically available at http://localhost:5173. For more npm scripts, refer to package.json.
npm run dev
If you want to modify samply.lens and integrate changes into your local application, follow these steps:
- Start a watcher to rebuild the library on changes:
npx vite build --watch --emptyOutDir false
- Open a second terminal.
- In your application's repository, install the local version of the library:
npm install --no-save path/to/lens/repo
- Verify the linking:
Ensure that it points to your local samply.lens repository.
npm ls | grep lens
- ✅ Short-term: Publish the library on npmjs as
@samply/lens
. - ✅ After npm release: Move
AppCCP.svelte
,AppBBMRI.svelte
, andAppGBA.svelte
to separate repositories using this library. - 🔲 Long-term: Stabilize the API and configuration options, then document them here.
We welcome contributions! If you have questions or ideas:
- Start a discussion on GitHub Discussions
- Open an issue for specific problems
- Submit a pull request
samply.lens is licensed under the Apache License, Version 2.0.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
© 2019 - 2025 The Samply Community