Skip to content

Overview

Fundamentals

There are four fundamental aspects of Prevue:

  1. Model
  2. API
  3. Repository
  4. Controller

Model

Model is the base of all. It is a class that represents resource's structure returned by the server via HTTP response.

API

API is a composable that serves as a medium between the app and the API server. It performs HTTP requests and processes responses.

Repository

Repository is a composable that enables storing the resource in the app. Repositories can be global (using Pinia) or local (using simple Vue 3 ref).

Controller

Controller is a collective composable for the resource's flow management. It has access to both repository and API composables of given resource.

TIP

Though oftentimes very helpful, using repository and controller is fully optional. You may choose to declare a Model and manage it with API composable only.

Released under the MIT License.