Code Monkey home page Code Monkey logo

frontend's Introduction

Frontend

What does this project do?

This is the frontend repository for our student forum application. This means the codebase will contain only React components and API calls to the backend server repo. If you want to contribute to the backend of our student forum, please request access to the "Backend" repo in the organisation if you dont have read access already.

The frontend will be hooked to Netlify for continuous deployment on the main branch. This also means that all pull requests made will have a nice preview of the changes by viewing the Netlify link.

How do I get started?

Pre-requisites

Contribute

Refer to CONTRIBUTING.md.

Install

Inside the project, to install dependencies

npm install

Test

Inside the project, to run automated testing

npm test

Run

Inside the project, to run in development mode

npm start

View browser in development mode

http://localhost:3000/

Deployment

Frontend repo's main branch will be automatically deployed to Netlify.

https://uniforum.netlify.app/

Frontend Contributors:

  • Christopher Alba
  • Hyung
  • Trinh Vo
  • Xiaoqi
  • Yu Chen
  • Qunzhi Zhou

frontend's People

Contributors

chai-xiaoqi avatar christopher-alba avatar frasermcc9 avatar friedhelmws avatar hpar461 avatar qzho236 avatar r055a avatar sparye avatar tvo465 avatar wshe874 avatar xiaoqi510 avatar yuchendong13 avatar yzhe819 avatar

Stargazers

 avatar

Watchers

 avatar

frontend's Issues

Community

• contains a background picture (changeable only by the person who created it)
• contains a join button for non-members
• contains a leave button for members
• contains a post button for members
• contains a delete button for creator/admins of the community
• contains a member count and you can click and view all the different member's names
• contains a description of the community
• contains a list of all community's posts ordered by latest timestamp first

Fix pull_request_template.md Broken Link

The link to the Contributions Guideline at the bottom of the pull_request_template.md file is broken.

It will be replaced with:

For more information, refer to the Contributing Guidelines and Code of Conduct links at the bottom of this page.

Post preview component

  • reused in homepage, post page, communities page
  • contains the community name
  • contains timestamp of the post and who posted it
  • contains title of the post
  • contains description of the post that's cut off at specific character length by ellipsis
  • contains upvote/downvote buttons with a number in the middle that represents #upvotes - #downvotes
  • contains comment button with floating label for number of comments
  • may contain image/image slider (multiple images)

Replace <a href/> inside Login and Register pages to use the useNavigate() hook from react-router-dom

Replace <a href/> inside Login, password-reset and Register pages to use the useNavigate() hook from react-router-dom

Why?

Although this method works, it refreshes the page which may degrade the user experience. By using the useNavigate( ) hook it will use the SPA (single page application) routing features.

For example:
image
On line 74 in the image above the a tag needs to be removed and instead add an onclick on line 75 and inside an anonymous function use navigate("/register") from useNavigate( )'s return value.

Add Ability to view uploaded image and delete it in New Post Page

Add Ability to view uploaded images and delete them in New Post Page

  • requires storing the image in a temporary local state using React hooks as a base64 string
  • requires adding a new button to delete the image from the temporary local state that only shows when an image is uploaded
  • uploading a new image should add to the array of images in the local state
  • requires using the react-responsive-carousel library to view the images

Based on #6

New Post Page

As discussed in Wireframing / Feature Planning:

  • contains text box for title
  • contains dropdown to select forum the post is for
  • contains text area for post description
  • contains upload media button for pictures

Connect Homepage to backend api/v1/posts endpoint

Currently the backend and frontend are unconnected

It would be great to connect homepage to the posts endpoint to fetch all of the real posts then order them from highest net votes to lowest net votes for the popular posts section.

image
The full Heroku GET endpoint you need to be hitting is https://uni-forum.herokuapp.com/api/v1/posts

Pre-requisites:

  • completion of the posts endpoint in the backend (it currently returns a fixed string)
  • completion of seeding the mongoDB Atlas database automatically through a script which will create all of the posts you need to fetch

How to get started:

Wiki

According to the project description, a wiki describing "any additional project documentation needed including a list of contributors, a list of contributions made by each student, and minutes from any group meetings" is needed. In addition, we are expecting to provide the list of technology stack we are using and why we are using it.

Login & Register Page

Description:
Develop the Login and Register Page for the Uni Forum Website.
Functionality
1. Login
login using username/email and password
redirect button to register
2. Register
register using email/ username/password
redirect button to register

Add CODEOWNERS

A CODEOWNERS file is used by GitHub to define who is automatically requested to review pull requests with changes to code they are responsible for.

The CODEOWNERS file in the SE701-T5/Frontend repository will define the @SE701-T5/frontend team as responsible by default for all changes with exception to:

  • README.md
  • LICENSE
  • .github/*

which all the @SE701-T5/team5 is responsible for as these are documents and changes to these are team-related.

The CODEOWNERS file will be located in the .github/ directory.

Profile page for user details

Currently, we have a register/login function, but no profile page to put user details.

Make a profile page for user details that contains:

  • username
  • profile picture
  • UPI
  • email
  • posts
  • comments
  • communities

Other features that are appropriate to put on a profile are welcome too.

Settings page

Add a settings page under the profile menu where users can go to change settings.

Prerequisites:

  • discuss user settings with backend team
  • set up backend endpoints
  • set up database schemas for settings

NavBar Component

  • Has a dropdown for all the different communities of a user which shows only if a user is logged in
  • Can search for specific posts or communities based on a search filter users can select from a dropdown
    • If user clicks a search icon, it begins search with the current keyword in the search box.
  • Button to create a new post
    • If user is not logged in it will redirect them to the Login page
    • If user is logged in it will redirect them to New Post page
  • Button to create a new community
    • If user is not logged in it will redirect them to the Login page
    • If user is logged in it will redirect them to New Community page
  • If user is logged in button for dropdown menu with these options:
    • Profile
    • Logout
  • if user is not logged in display a login button and register button that redirects to specified pages

Communities Page Basic Layout

  • contains a list of all the communities (create a communityPreview component)
  • contains a searchbar to search all the communities
  • contains a new community button
    image

Connect Homepage to backend api/v1/communities popular communities

Currently the backend and frontend are unconnected

It would be great to connect homepage to the communities endpoint to fetch all of the real communities then order them from highest members to lowest members for the popular communities section. Would be good to just get the top 10 communities and have a horizontally scrolling component to scroll through the 10 communities.

image

The full Heroku GET endpoint you need to be hitting is https://uni-forum.herokuapp.com/api/v1/communities

Pre-requisites:

  • completion of the communities endpoint in the backend (it's currently completely unimplemented)
  • completion of seeding the mongoDB Atlas database automatically through a script which will create all of the communities you need to fetch

How to get started:

Add pull_request_template.md

Add a pull request (PR) template to the ./github directory so contributors can automatically see the expected contents for the project in a new PR body.

The PR template will be based on these linked examples provided by @axolo-co but modified to better suit this project.

Connect Posts Page to backend GET api/v1/posts

Currently the frontend and backend are unconnected
It would be great if you could connect the posts page to the backend to get all of the posts. There should already be a functioning frontend search so all you need to do is fetch the real data from the database.
image

The full Heroku GET endpoint you need to be hitting is https://uni-forum.herokuapp.com/api/v1/posts

Pre-requisites:

  • completion of the posts endpoint in the backend (it's currently unimplemented)
  • completion of seeding the MongoDB Atlas database automatically through a script which will create all of the posts you need to fetch

How to get started:

Post page

  • Contains the full post details
  • contains comments view
  • comments can have upvotes and downvotes and a number that shows the net value
  • comments are filtered by popularity (net value)
  • Reply button
  • Button to add comment
  • View to add new comment

Complete header functionality and link certain elements to according links.

Header component is currently missing a couple of functionalities (variable fields and displays for profile element) alongside an unconnected links to appropriate links. (communities page, new posts, profile, etc...) These functionalities should be completed for a properly functioning header component.

Add CONTRIBUTING.md

Add the contribution guideline as a markdown file named CONTRIBUTING.md in /.github directory for GitHub to link to (refer to the bottom right of Issues when creating them).

This issue and subsequent Pull Request are intended for the team to review and approve the contribution guidelines before @christopher-alba merges them, and also as an example on how to make and use an Issue and Pull Request using a GitHub Kanban project board.

New Community Page Basic Layout

  • contains text box for community name
  • contains text area for community description
  • able to upload image for community background
  • able to see the image that was uploaded and delete it if necessary
  • create a new community button in the communities dropdown in the navbar that links to this page
    image

Setup Create-React-App Project

Create a template codebase using create-react-app.

  • have template files within each new folder created
  • install needed dependencies: semantic-ui-react, axios, react-router-dom, Redux, React-Redux, Redux-Thunk
  • setup browser router
  • setup _redirects file for Netlify
  • setup Redux

Add CODE_OF_CONDUCT.md

Add the Code of Conduct as a markdown file named CODE_OF_CONDUCT.md in /.github directory for GitHub to link to (refer to the bottom right of Issues when creating them).

This Code of Conduct uses the Citizen Code of Conduct template.

This issue and subsequent Pull Request are intended for the team to review and approve the contribution guidelines before @christopher-alba merges them.

Protected routes

Currently, anyone can visit any page on the website. Add protected routes to restrict access to appropriate pages.

Suggestions:

  • New post and new community page for logged in/authorised users
  • Profile and settings page for logged in users only

Connect Communities page to backend GET api/v1/communities

Currently the frontend and backend are unconnected
It would be great if you could connect the communities page to the backend to get all of the communities. There should already be a functioning frontend search so all you need to do is fetch the real data from the database.

image

The full Heroku GET endpoint you need to be hitting is https://uni-forum.herokuapp.com/api/v1/communities

Pre-requisites:

  • completion of the GET communities endpoint in the backend (it's currently unimplemented)
  • completion of seeding the MongoDB Atlas database automatically through a script which will create all of the communities you need to fetch

How to get started:

Match nav bar styles to UI prototype.

The elevation style of the nav bar are inconsistent between pages and even the default theme isn't what's described in the UI prototype.

Match nav bar styles so that it would match the style from the ui prototype.

Connect New Post Page to Backend endpoint POST api/v1/posts

Currently the backend and frontend are unconnected

It would be great to connect the New Post Page to the backend so you could start creating some real posts from the client. Only authenticated users should be able to create a new post.
image

The full Heroku POST endpoint you need to be hitting is https://uni-forum.herokuapp.com/api/v1/posts

Pre-requisites:

  • completion of the posts endpoint in the backend
  • completion of user authentication in frontend and backend

How to get started:

Community page bugfixes and changes

Currently, there are 2 bugs that exist on the community page, circled in red in the screenshot below:

Community page bugs

Actionable:

  • Fix community title positioning
  • Fix join button clarity
  • Add the community id to the page route. Currently, we just have a community page that is not specific to any community - we want a unique route for each community. (e.g. current: .../community | want: .../community/:communityID). A suggestion is to use the abbreviation for the course as the ID, like SE701

Link to page: https://uniforum.netlify.app/community

Make General Fixes in App

  • add appropriate links to pages in post preview component
  • update readme to include netlify deploy link and Qunzhi Zhou in contributions
  • other general fixes that are deemed necessary

Switch to Material UI library

  • Due to this bug, we have decided to switch over to material UI.
  • npm install and set up material UI using: npm install @mui/material @emotion/react @emotion/styled

Connect New Community Page to backend POST api/v1/communities

Currently the frontend and backend are unconnected

It would be great if you could connect the new community page to the backend so you can start creating new communities from the client. Only authenticated users should be able to create new communities.

image

The full Heroku POST endpoint you need to be hitting is https://uni-forum.herokuapp.com/api/v1/communities

Pre-requisites:

  • completion of the POST communities endpoint in the backend (it's currently completely unimplemented)
  • completion of user authentication in the frontend and backend

How to get started:

Posts Page Basic Layout

  • contains a list of all the posts (use the existing post preview component)
  • contains a searchbar to search all the posts
  • contains new post button
    image

Nav bar search functionality

Currently, we have implemented the search bar in the navbar UI but have not associated any functionalities with it. Furthermore, the filter button is disassociated with the search bar.

Actionable:

  • Link nav bar search bar to the posts and communities page for search queries
  • Add posts/communities filtering as a dropdown to the filter button currently next to the search bar
  • Move filter button closer to the search bar for more intuitiveness
  • Add onChange searching and add a onClick event to the search icon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.