Search Twitter for keywords and retrieve a listing of the top 5 tweets, ordered by most popular, so that I can monitor trends and hashtags in my industry.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
As a Social Media Manager, I need an easy way to search Twitter for keywords and retrieve a listing of the top 5 tweets, ordered by most popular, so that I can monitor trends and hashtags in my industry. (Hint: use the Twitter API query param result_type=popular)
- App should display a title, search, list of tweets, and hashtag container (see mocks)
- User should be able to search for tweets by keyword a. Search should be debounced b. Search should only return (5) tweets c. Hashtags found should be added to the hashtag list
- Tweets should match the mocks, and include the following: a. Avatar of the author b. Username of the author c. Tweet content d. Clickable URL of the tweet e. Clickable hashtag
- User should be able to click a “Load More” button to load additional tweets a. It should append to the list of tweets b. It should only add (5) additional tweets each click c. It should continue to add tweets until the API does not return more i. Hint: use the Twitter API query param max_id d. If unique hashtags are found they should be appended to the hashtag list
- User should be able to filter tweets by clicking on a hashtag a. Filter should be able to be set and unset b. When set, the list of tweets should only include those with a matching hashtag c. When unset, the list of tweets should be reset to its state before filtering
- Use functional components with hooks over class components
- Use CSS/SASS/LESS or CSS-in-JS (e.g. Styled Components, Emotion, etc.). a. Do not use libraries like Material-UI or Bootstrap as they do not allow us to effectively measure styling competency
- Ensure the app is fully responsive (see mocks)
- Ensure the app matches the designs (see mocks)
- Ensure the app code is clean, readable, and maintainable
- [Extra Credit] Write tests for the application as you feel appropriate
- React (CRA)
- Jest
- React Testing Library
- Twitter API
- styled-components
- axios
To get a local copy up and running follow these simple steps.
- Clone the repo
git clone https://github.com/itsevalieu/cra-twitter.git
- Install NPM packages at the root folder
npm install
- Install NPM packages in the ./server folder
cd server npm install
- Created an .env file at the root folder structure. It should include:
REACT_APP_TWITTER_BEARER_TOKEN="YOUR BEARER TOKEN FOR TWITTER"
In the project directory, you can run:
-
Start the app in the development mode.
npm start
Open http://localhost:3000 to view it in the browser. The page will reload if you make edits. You will also see any lint errors in the console.
-
Start the proxy server for development.
npm run proxy
You need to start the proxy server in order to make requests to the Twitter API.
-
Test
npm test
Launches the test runner in the interactive watch mode. See the section about running tests for more information.
-
Builds the app for production to the
build
folder.npm run build
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes. Your app is ready to be deployed!
See the section about deployment for more information.
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Your Name - @itsevalieu - [email protected]
Project Link - https://github.com/itsevalieu/cra-twitter