An endorsements app that helps the Acme sales team members endorse each other on project successes. The app is built with HTML, CSS, and vanilla JavaScript. It stores data in a Firebase Realtime Database as well as the browser localStorage
.
- Live Application URL
- Demo and Code Walkthrough
- How to Use the Application
- Technologies Used
- Future Features
- Challenges and Learning Points
https://we-are-the-champions-shant.netlify.app/
- Sales team member browses to the app's welcome page.
- Sales team member writes an endorsement, with their name and the name of the endorsee.
- Sales team member clicks on Publish to have the endorsement published and placed at the top of endorsements.
- Sales team member can like any endorsement by clicking the heart icon on an endorsement.
- HTML, CSS, and JavaScript.
- Firebase Realtime Database
- Sales team member can create an account to personalize their experience and have their likes and endorsements saved.
- Figuring out how to store the endorsements map in
localStorage
. It turns out, it needed to be converted to an array first. The same is true to get it back. The array stored is converted back to a JavaScriptMap
.
localStorage.setItem('endorsements', JSON.stringify(Array.from(endorsements)))
new Map(JSON.parse(localStorage.getItem('endorsements')))
- Updating an endorsement in the database required a reference to the specific location and using the
update
function.
const endorsementLikesRef = ref(database,`endorsements/${key}`)
update(endorsementLikesRef, {likes: endorsement.likes})