mkp6075
Madison Phung
- URL for frontend: http://216.165.22.58:32057
- URL for backend: http://linserv1.cims.nyu.edu:12190
- Link to Add Round form: http://216.165.22.58:32057/addRound
- Link to backend data: http://linserv1.cims.nyu.edu:12190/api/rounds
You have to be signed in as a user in order to access this form.
Click on Add Round to fill out the form. Save the Round, and the home screen should show all rounds.
From milestone 3, I implemented user signup and login pages.
- Link to Sign up form: [http://216.165.22.58:32057/signup]
- Link to Login form: [http://216.165.22.58:32057/login]
Create a user profile and the home page should show the current user logged in. You can login with the same user credentials and it should show the same user.
- Link to Prediction form: [http://216.165.22.58:32057/prediction]
This feature allows users to keep track of their goals for their next round. Users fill out the form with the course's info, the score they want to shoot, and any comments explaining what they hope to accomplish in their next round.
Used map to find the player's handicap in lines 227-230: [https://github.com/nyu-csci-ua-0467-001-002-fall-2024/final-project-mkphung29/blob/master/src/app.mjs]
Used reduce to find the player's scoring average in line 268: [https://github.com/nyu-csci-ua-0467-001-002-fall-2024/final-project-mkphung29/blob/master/src/app.mjs]
First link:
- map is used to transform the rounds array into an array of differentials by calculating the player's adjusted score based on the course rating and slope rating for each round.
Second link:
- reduce is used to accumulate the total score from all rounds by summing the score from each round in the rounds array.
- (6 points) React
- React is used as the main frontend framework to build the golf stats management system. It manages the user interface and facilitates interactivity, creating a dynamic and responsive experience for users.
- (5 points) JSON Web Tokens, JWT
- JWT is implemented for user authentication. The tokens enable secure login, round saving, and user profile management, ensuring that only authenticated users can access and modify their data.
- (2 points) Tailwind CSS
- Tailwind CSS is used to style the application, providing a utility-first approach for creating responsive and modern designs. This speeds up development by applying styles directly in JSX without the need for custom CSS files.
- (2 points) Client-Side Javascript Library: React Hook Form
- React Hook Form is utilized to manage form state and validation. It simplifies handling forms for adding new rounds and updating stats, ensuring smooth user interaction and efficient input validation.
React, JWT Tokens, and Tailwind CSS is used throughout my entire application but I included one example for each.
- React code found in Home.jsx: [https://github.com/nyu-csci-ua-0467-001-002-fall-2024/final-project-mkphung29/blob/master/src/client/src/pages/Home.jsx]
- JWT Tokens is implemented in app.mjs. Link to middleware for JWT in lines 81-98: [https://github.com/nyu-csci-ua-0467-001-002-fall-2024/final-project-mkphung29/blob/master/src/app.mjs]
- Tailwind CSS in Home.jsx: [https://github.com/nyu-csci-ua-0467-001-002-fall-2024/final-project-mkphung29/blob/master/src/client/src/pages/Home.jsx]
- React Hook Form found in AddRound.jsx, Login.jsx, Signup.jsx, and Prediction.jsx:
- AddRound.jsx: [https://github.com/nyu-csci-ua-0467-001-002-fall-2024/final-project-mkphung29/blob/master/src/client/src/pages/AddRound.jsx]
- Login.jsx: [https://github.com/nyu-csci-ua-0467-001-002-fall-2024/final-project-mkphung29/blob/master/src/client/src/pages/Login.jsx]
- Signup.jsx: [https://github.com/nyu-csci-ua-0467-001-002-fall-2024/final-project-mkphung29/blob/master/src/client/src/pages/Signup.jsx]
- Prediction.jsx [https://github.com/nyu-csci-ua-0467-001-002-fall-2024/final-project-mkphung29/blob/master/src/client/src/pages/Prediction.jsx]
Use this sample username and login to see the handicap, scoring average, and pesonal best statistics. This user will already have rounds saved in order to calculate these stats, so the grader doesn't have to input info themselves.
username: golfer11 password: 123
-
- Official React documentation for learning the basics and advanced concepts of React.
-
- Tutorial on using React Router for navigation within a React app.
-
- Official Tailwind CSS documentation to understand utility classes and how to style applications.
-
- Documentation for React Hook Form, which helps with form validation and state management in React.
-
Youtube Tutorial for Building Fullstack MERN App
- YouTube tutorial for building a full-stack MERN app, providing guidance on backend and frontend integration.
-
Youtube Tutorial Playlist for Tailwind CSS
- YouTube playlist offering a series of videos on learning Tailwind CSS and applying it in projects.
-
- Interactive React course from Scrimba, covering fundamental and advanced React topics.
-
- Official JWT documentation explaining how JSON Web Tokens work and how to implement them.
-
Youtube JWT Authentication Tutorial
- YouTube tutorial on how to implement JWT-based authentication in a web app.
- YouTube tutorial on building a full-stack app with React, Node.js, and MongoDB, referenced for the project structure.
- YouTube tutorial for building a React-based Tinder clone app, useful for UI design and logic.
- YouTube tutorial on handling JWT authentication in React, covering token generation and validation.
- FreeCodeCamp article explaining the process of signing and validating JWTs, useful for secure authentication.
- FreeCodeCamp article with explanations and examples of higher-order functions in JavaScript, useful for functional programming.