Coder Social home page Coder Social logo

news-share's Introduction

REPO SIZE TOP_LANGUAGE FORKS

News Share

Welcome to Your Political News Center

Duration: 100hrs

We want to hold politicians accountable. The best way to ascertain whether one is holding up to their promises, is to make their activity in political spaces public. Lets make the activities of politicians that are at times witnessed by few, shown to everyone.

intro

Prerequisites

Development Setup Instructions

Create database entitled allyship. Popluate your database with tables by running the queries provided in your database.sql file. Start the server.

- Run `npm install`
- Create a `.env` file at the root of the project and paste this line into the file:

SERVER_SESSION_SECRET=superDuperSecret

While you're in your new .env file, take the time to replace superDuperSecret with some long random string like 25POUbVtx6RKVNWszd9ERB9Bb6 to keep your application secure. Here's a site that can help you: https://passwordsgenerator.net/. If you don't do this step, create a secret with less than eight characters, or leave it as superDuperSecret, you will get a warning.

- Start postgres if not running already by using `brew services start postgresql`
- Run `npm run server`
- Run `npm run client`
- Navigate to `localhost:3000`

You are a Reporter. You may do your Research.

Go to the Library to read about our Senators. Senators have a profile card which yields information about them as well as links to their social media and websites.

Share the News

  1. Head to the Typewriter. Compose your report by inserting information into the text fields.
  2. Your created story is represented by a newspaper which is displayed in the News Room. Click the headline of the newspaper to read your story.
  3. Click the edit button on the newspaper to open edit mode. Make updates to your selected story using the edit form that appears.
  4. To delete an story, Click the delete button on the newspaper in question.

How I feel about the experience of react-dev-challenge

When I read the email that I was invited as a Developer to the react-dev-challenge I was so excited I couldn't sit still for the entire day. It was not until the next day that I calmed down enough to sit still and code. After looking at the figma I thought about two things: The ultimate goal of this project, and what I could realistically complete in 7 days. I thought about how I could perhaps provide a small feature that could me implemented into a larger infrstructure. From there, Newshare was born, with the intent that it could be one day implemented into the larger scheme of Allyship's goal of spreading awareness of politicians in the black community. With this resolve I felt fueled to do my best. I have been trained to focus on the concept of MVP (minimum viable product). with that in mind, I was able to give my all into my personal goal, allbeit a small part of a larger goal. With this philosophy I had a bearing to go with and I felt good about what I was doing, and even now I feel great for trying my best at what I could do rather than what was beyond reason. I enjoyed this challenge because I was in my element for the reasons I have mentioned and it gave me a taste of what it would be like to work as a developer on PT chat; If it's anything like this, I know that I am ready.

Challenges I faced

I had a challenging time with conditional rendering. I was using trying to display values from redux state as placeholder values in my editStory form. The form is actually appended to the dom as a modal. and I was getting an error when opening the form modal that my placeholder variables were undefined. Through research and collaboration with a colleague, I was able to ascertain that I was trying to pull values from redux state before redux state could actually be set, so therefore my values were undefined, because they did not yet exist at the time that the modal was rendered. my solution was to use a ternary operator, so that the my table only renders if and when redux state has been set.

Another hurdle I overcame was manipulating the ProPublica API. I wanted to access the api through a GET request, so that I could put the data object in redux state and append the data to the dom by .mapping it into cards. However, learning to pass my API key in with my GET request promised to be an expenditure of time that I could perhaps ameliorate. I decided to learn how to do GET requests from the terminal, and echo the response into a .json file which, I could then map through as I wanted. The consequence of my path is that my app does not actively call the api. Instead I make API calls through the terminal manually when I need to update the information on politicians featured in my app. Beyond the scope of this challenge, I would like to access the API directly, from within the app.

Acknowledgement

Thank you for taking the time to experience my work. Thanks to Prime Digital Academy for training me as a Full Stack Software Engineer.

Support

If you have questions, comments, or issues, please email me at [email protected]

news-share's People

Watchers

Tracy Michelle avatar Joeleen Kado avatar

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.