# Zenpal --- <!--Terry--> Our project this week was to create a backend for our Zenpal app. This weeks focus was on databases and routes. We alsp wanted to gain experience rendering the info coming back from DBs into React props. --- ## Our Problem <!--Terry--> To rectifity remote working health issues. From user testing we discovered users wanted a way to track their working times. ![](https://media.giphy.com/media/9u514UZd57mRhnBCEk/giphy.gif) --- <!--Terry--> ## Team Aishah- UX/UI Terry- DevOps Ephie- Quality Jennifer- Facilitator --- <!--Jennifer--> ## Build Plan ![](https://i.imgur.com/F0grBI6.png =x500) --- ## Velocity! - Compared to last week: we were faster! - What took longer than estimated time: Routes, React components! - What took less time: Implementing unique usernames, debugging Heroku deployment ![](https://i.imgur.com/Fko1dEX.jpg =400x) --- <!--Ephie--> ## Demo --- <!--Aishah--> ## Interesting bits of code ![](https://media.giphy.com/media/YAlhwn67KT76E/source.gif) ---- ### SQL Experimentation ```javascript= function displayAllData() { return db .query('SELECT * FROM work where user_id = 3 UNION SELECT * FROM play where user_id = 3') } ``` ---- ### Unique Usernames ```javascript= sendSignup(usernameValue, passwordValue) .then((response) => { if (response === 409){ //TO-DO: render error to page console.error("username taken"); } else { //response must be 201- //errors caught above //log them in localStorage.setItem ("access_token",response.access_token); loggedInChecker(); history.push("/welcome"); } }); }; ``` --- <!--Terry--> ## If we had more time - Finish off the routes to send info back and render it on the page - Add more functionality (ZEN FLOAT!!) - Sleekify :haircut: --- <!--Ephie--> ## Tricky bits - Setting up Travis to work with a test database. - setting up codecov (I just gave up). - Figuring out how much we could do in the time we had - Styled components gives you a weird automated className that is tricky. --- <!--Ephie--> ## Interesting Things we learnt - `.json` rips out metadata - no status code - mystery no-cors mode... what will it do? Break or fix- spin the wheel to find out! --- ![](https://media.giphy.com/media/HvvpNczg8Dcw8/giphy.gif) --- ## What we're proud of - The fade style component! - Cypress testing - Making it responsive - Tenacity through the endless bugs :spider: - Focus on learning - Pie Chart plugin --- <!--Terry--> ## Tech Stack - ReactJS - styled-components - PostgreSQL - Express - CSS - Design Tools - Miro - Figma - Whimsical --- ![Minion dropping mic](https://media.giphy.com/media/DfbpTbQ9TvSX6/source.gif) ---
{"metaMigratedAt":"2023-06-15T13:57:29.977Z","metaMigratedFrom":"Content","title":"Zenpal","breaks":true,"contributors":"[{\"id\":\"d43bc487-5fdc-4c57-9e5e-f39eb374b2a0\",\"add\":946,\"del\":128},{\"id\":\"a92566bd-bde1-4917-8d3b-c43b71924ffd\",\"add\":1640,\"del\":542},{\"id\":\"62549a0e-e475-426e-8d74-873019794dd5\",\"add\":788,\"del\":6},{\"id\":\"d3c4a004-0006-4da0-9ba0-d08adcc37a9d\",\"add\":172,\"del\":42}]"}
    138 views
   Owned this note