cboard-org / cboard-ai-builder

The Cboard AI Builder is an augmentative and alternative communication (AAC) board generator designed to streamline the creation process for speech therapists or caregivers. It aims to reduce the time required to create specific AAC boards and provide a preliminary draft quickly.
https://cboard.io
GNU General Public License v3.0
6 stars 1 forks source link

Avoid coupling UI with DB layer #114

Closed RodriSanchez1 closed 3 months ago

RodriSanchez1 commented 3 months ago

Needs to move types definition to a different more general location.

Types:

New types location options:

//Example of new types for Prompt

export type Prompt = {
  description: string;
  rows: number;
  columns: number;
  colorScheme: 'fitzgerald' | 'something-else' | 'foo';
  shouldUsePictonizer: boolean;
};

export type DBPrompt = Prompt & {
  userId: string;
  createdAt: Date;
};

export type UIPrompt = Prompt & {
  state: 'loading' | 'success' | 'error';
};

What do you think? @tomivm @maxicapodacqua