{"id":24489840,"url":"https://github.com/bluntbrain/swipeable-news-app","last_synced_at":"2026-05-02T20:37:15.533Z","repository":{"id":223613507,"uuid":"760458920","full_name":"bluntbrain/swipeable-news-app","owner":"bluntbrain","description":"A React Native and TypeScript app that dynamically fetches, displays, and manages top news headlines with offline access and interactive features.","archived":false,"fork":false,"pushed_at":"2024-02-21T05:50:27.000Z","size":6144,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-29T23:12:57.506Z","etag":null,"topics":["javascript","react-native","typescript"],"latest_commit_sha":null,"homepage":"https://bluntbrain.vercel.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bluntbrain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-20T13:11:33.000Z","updated_at":"2025-08-05T03:24:46.000Z","dependencies_parsed_at":"2024-02-21T06:47:10.362Z","dependency_job_id":null,"html_url":"https://github.com/bluntbrain/swipeable-news-app","commit_stats":null,"previous_names":["bluntbrain/swipeable-news-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bluntbrain/swipeable-news-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluntbrain%2Fswipeable-news-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluntbrain%2Fswipeable-news-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluntbrain%2Fswipeable-news-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluntbrain%2Fswipeable-news-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bluntbrain","download_url":"https://codeload.github.com/bluntbrain/swipeable-news-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bluntbrain%2Fswipeable-news-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32549384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T19:18:06.202Z","status":"ssl_error","status_checked_at":"2026-05-02T19:16:21.335Z","response_time":132,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","react-native","typescript"],"created_at":"2025-01-21T17:16:14.549Z","updated_at":"2026-05-02T20:37:15.514Z","avatar_url":"https://github.com/bluntbrain.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# News Headlines App\n\nThis React Native app fetches and displays the top news headlines, allowing users to refresh the list, pin their favorite headlines, and delete the ones they're not interested in. It uses local storage to cache headlines for offline access and introduces new headlines at specified intervals.\n\n![Example GIF](screen_recording/demo.gif)\n\n## Features\n\n- Fetch top 100 news headlines from a news API.\n- Display the first 10 headlines with the ability to refresh for more.\n- Pin/unpin headlines to prioritize viewing.\n- Delete headlines from the view.\n- Cache headlines for offline viewing.\n- Dynamically add up to 5 random headlines every 10 seconds.\n- Swipe to refresh functionality to update the headlines list.\n\n## Packages Used\n\n- `react-native`: The framework for building the mobile app.\n- `axios`: For making HTTP requests to fetch headlines from the news API.\n- `@react-native-async-storage/async-storage`: To store and retrieve headlines for offline access.\n- Initially used `uuid` for generating unique identifiers for each headline (later replaced with a custom `Math.random` based ID generator).\n\n## Approach\n\n### Fetching and Storing Headlines\n\nUpon the initial load, the app checks for cached headlines in local storage. If not found, it fetches the top headlines from the news API and caches them. Each headline is assigned a unique identifier using a custom function based on `Math.random` and the current timestamp to ensure uniqueness without relying on external libraries.\n\n### Display and Interaction\n\nThe app displays the headlines in a `FlatList`, which supports dynamic loading, refresh control, and efficient rendering of the list. Users can swipe to refresh to fetch new headlines, which are then added to the top of the list without duplicating existing items. Headlines can be pinned/unpinned or deleted, with pinned headlines always appearing at the top of the list.\n\n### Offline Access and Dynamic Updates\n\nCached headlines ensure that users have access to news even without an internet connection. The app introduces new random headlines at regular intervals to keep the content fresh, with a countdown timer indicating when the next update will occur.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluntbrain%2Fswipeable-news-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbluntbrain%2Fswipeable-news-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbluntbrain%2Fswipeable-news-app/lists"}