Skip to content

samply/lens

Repository files navigation

samply.lens

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:


🏗 Architecture

The main goal of samply.lens is to standardize common aspects of building search and exploration applications. It is structured around four core pillars:

  1. Catalogue – Supplies search attributes in a standardized format.
  2. Query Language – Defines a query structure (internally called queryitems, externally known as AST) that can be generated by samply.lens components or external tools.
  3. Execution – AST queries can be processed by Samply components or custom implementations.
  4. 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:


🚀 Getting Started

To quickly try out samply.lens, clone the repository and run the tests. For building a new application, follow the New-App Guide.

Development Setup

To set up a development environment for samply.lens, ensure you have Node.js and npm installed.

  1. Clone the repository:
    git clone https://github.com/samply/lens.git
  2. Install dependencies:
    npm install
  3. Start the development server:
    npm run dev
    This will launch a server, typically available at http://localhost:5173. For more npm scripts, refer to package.json.

🔧 Building the Library Locally

If you want to modify samply.lens and integrate changes into your local application, follow these steps:

  1. Start a watcher to rebuild the library on changes:
    npx vite build --watch --emptyOutDir false
  2. Open a second terminal.
  3. In your application's repository, install the local version of the library:
    npm install --no-save path/to/lens/repo
  4. Verify the linking:
    npm ls | grep lens
    Ensure that it points to your local samply.lens repository.

📅 Roadmap

  • Short-term: Publish the library on npmjs as @samply/lens.
  • After npm release: Move AppCCP.svelte, AppBBMRI.svelte, and AppGBA.svelte to separate repositories using this library.
  • 🔲 Long-term: Stabilize the API and configuration options, then document them here.

🤝 How to Contribute

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

🛠 Built With


📜 License

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