Skip to content

Knowledge #1

@artsiomivanets

Description

@artsiomivanets

Issues

  • there is no bearer header in user info request (local storage problem)
  • tailwind via cdn
  • create scopes for default users
  • frontend and backend have to be placed in different folders,
  • use 'shared' for types which frontend and backend import
  • authorization type password shouldn't be set manually
  • fix SDK readme (coercion, local storage bind)
  • SDK should probably throw an error when initialization errored and we will handle it on our side

Tips

  • don't use useEffect, useState - instead use Gate, Effector
  • don't trigger effects by hands (event -> effect from UI)
  • stores typing - create a types for each store
  • models - data, pages - ui, use domains (useful for tests)
  • effector-reflect - additional useful lib for abstracting data processing and ui rendering

References

Node sdk (v2)
Full App template (v2)
Effector App Example
Client sdk
Sansara Issue

Questions

  1. Model auth has a huge amount of code (guards, token fns). Can we use authorize method instead?
  2. How to correctly implement authorization guards (expectation: all routes go through guard middlewares to check for token, role based scopes etc)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions