Skip to content

Allow calling usecases outside of Next.js environment #615

@MytsV

Description

@MytsV

Description

In the current implementation of SDK, presenters are coupled with NextApiResponse. As this is only a type and can't be instantiated, it leaves server-side fetching of data impossible, as well as easily replacing controllers with something like tRPC instead of direct Next.js endpoints.

As a follow up, usecases and usecase factories should be decoupled from IronSession, which would allow get-side-header to work server-side as well.

Motivation

Having components come pre-rendered with data from the server, instead of relying on JS and displaying loading indicators, is beneficial for UX.

This will also make all the usecases reusable for any other needs, including a CLI client.

Change

This should be addressed with as little breaking changes as possible. I propose creating an interface which matches the utilized functionality by presenters.

Additional Information

  • The Rucio API needs to be changed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions