Guest User

Untitled

a guest
Apr 23rd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.53 KB | None | 0 0
  1. ## front end
  2.  
  3. ==================================================
  4. ```
  5. ### components and userstory
  6.  
  7. `/landing` landing site
  8. -> <Landing />
  9. ** users should be informed what does the app do ( about section )
  10.  
  11. `/landing/local`
  12. ** users should be able to sign up locally (signUp form)
  13. -> <LocalSignUpForm />:
  14. (front end validation) (back end validation)
  15. if fields were entered correctly -> send user info to server -> passport local -> passport jwt-> go to '/dashboard'
  16. if fileds were entered incorrectly -> show error -> auto focus error fields
  17.  
  18. `/landing/login`
  19. ** users should be able to log in (login form)
  20. -> <LoginForm />:
  21. (front end validation) (back end validation)
  22. if fields were entered corectly -> find user in database -> pass data to passport jwt strategy(token) -> go to '/dashboard'
  23. if fileds were entered incorrectly -> show error -> auto focus error fields
  24.  
  25. ================================================================================================
  26.  
  27. `/:id/dashboard` main page
  28. ** users should not be able to visit this page if not authorized( Redirect HOC)
  29. -> <Redirect /> HOC:
  30. if authorized: grant permission to stay on this page
  31. if unauthorized: redirect to '/login'
  32. ** (extension) users should see his/her activity chart over days , weeks. months
  33. ** users should see current training
  34. -> new user: no report -> init a new set training
  35. -> returned user: display question
  36. *** click the module to redirect to '/trainning/:id
  37. ** users should see favorate collections
  38. -> <FavorCollection />
  39. *** users should allow to add his/her own comment on each card
  40. *** users should allow to unfavor
  41.  
  42. ================================================================================================
  43.  
  44. `/:id/trainning `
  45. ** users should be able to start out new training programs as first time users
  46. ** users should be able to continue off where he left last time or opt to reset progress
  47. -> <InteractiveTraining />
  48. `/:id/training/report`
  49. ** upon completing training users were given report on words they feel easy, moderately challange, struggling with.
  50. ** users should be able to save the words so they can revisit whenever they want.
  51. -> <Report />
  52.  
  53. ============================================================================
  54.  
  55. ### component hierachy
  56. <Landing />
  57. <NavBar />
  58. <About>
  59. <Route
  60. path = '/:id/local'
  61. component = <LocalSignUp />
  62. />
  63. <Route
  64. path = '/:id/login'
  65. component = {Login}
  66. />
  67. <Redirect component = <Dashboard /> />
  68. <NavBar />
  69. <FavorateCollection />
  70. <Card mode="onShow" word = {} comment={} />
  71. ** (extension ) click speak button will hear pronounciation using api call to google translate api
  72. <HUD />
  73. ***(extension)<activity chart />
  74. <Trainning />
  75. <Card mode="onTrain"/>
  76.  
  77. ### redux state, action and reducer
  78. ** favorReducer
  79. loading: false,
  80. error:null
  81. collections:[],
  82. currentCard: {object},
  83. addComment:false
  84.  
  85. ** trainningReducer
  86. loading: false,
  87. error:null,
  88. currentQuestion: String,
  89. userInput: String,
  90. currentAnwser: String
  91. reports:[]
  92.  
  93. `
Add Comment
Please, Sign In to add comment