/devlink

Social network for developers 👨‍💻

Primary LanguageJavaScript

DevLink - Social Network for Developers

[Add Description]

What I've Learned..

  • React state is separate from redux state
    • e.g In Edit Profile component, the fields are stored in React component state. Your current user profile is stored in Redux. To fill the empty fields upon component initiation, the profile has to be pulled from the Redux state, stored in a profile object, and setState with the profile object. The empty profile fields will then be updated with any current profile information.

TODO

  • Ability to like or unlike on comment page
  • Trim whitespace from skills string using regex

Back-end

  • Install dependencies
    • express
    • mongoose
    • passport
    • passport-jwt
    • jsonwebtoken
    • body-parser
    • bcryptjs
    • validator
    • gravatar
  • Install dev-dependencies
    • nodemon
  • Create server.js
  • Connect to MongoDB
  • Define schemas
    • User
    • Profile
    • Post
  • Set API routes
    • api/users/
      • Register user
        • Import Gravatar
        • Encrypt password
      • Login user
        • Decrypt password
        • Return signed JWT token
    • api/profiles/
      • Fetch current user profile
      • Fetch user profile by username
      • Fetch user profile by id
      • Fetch all profiles
      • Save new/edit profile
    • api/profiles/ [more tings..]
      • Add work experience
      • Delete work experience
      • Add education
      • Delete education
    • api/posts/
      • Create post
      • Delete post
      • Get all posts
      • Get single post by id
    • api/posts/ [more tings..]
      • Like post
      • Unlike post
      • Add comment
      • Remove comment
  • Input validation
    • Registration fields
    • Login fields
    • User profile fields
    • Post fields
    • Comment fields

Front-end

  • Install dependencies
    • react-router-dom
    • axios
    • classnames
    • redux
    • react-redux
    • redux-thunk
  • App.js
    • Redux provider & store
    • Check token & maintain user session throughout
  • Routes/Protected routes
  • Landing
    • Login
      • Display any errors
      • Save user token in browser
      • Decode token
      • Set state to user information
    • Register
      • Display any errors
  • Dashboard
    • Profile
    • No profile
  • Create/Edit profile
  • Developers
  • Posts
    • Comments
    • Like