{"id":30841838,"url":"https://github.com/dartoos-dev/astronomy_picture_of_the_day","last_synced_at":"2025-09-06T20:10:02.251Z","repository":{"id":206739611,"uuid":"717577508","full_name":"dartoos-dev/astronomy_picture_of_the_day","owner":"dartoos-dev","description":"A Flutter app to display NASA's astronomy image of the day","archived":false,"fork":false,"pushed_at":"2023-12-11T03:41:20.000Z","size":389,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-12-11T22:27:11.208Z","etag":null,"topics":["android","astronomy","dart","flutter","ios","mobile","nasa","web"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dartoos-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-11T22:22:15.000Z","updated_at":"2023-12-11T22:27:11.209Z","dependencies_parsed_at":"2023-12-05T02:26:36.339Z","dependency_job_id":null,"html_url":"https://github.com/dartoos-dev/astronomy_picture_of_the_day","commit_stats":null,"previous_names":["dartoos-dev/astronomy_picture_of_the_day"],"tags_count":3,"template":null,"template_full_name":null,"purl":"pkg:github/dartoos-dev/astronomy_picture_of_the_day","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dartoos-dev%2Fastronomy_picture_of_the_day","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dartoos-dev%2Fastronomy_picture_of_the_day/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dartoos-dev%2Fastronomy_picture_of_the_day/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dartoos-dev%2Fastronomy_picture_of_the_day/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dartoos-dev","download_url":"https://codeload.github.com/dartoos-dev/astronomy_picture_of_the_day/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dartoos-dev%2Fastronomy_picture_of_the_day/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273956236,"owners_count":25197587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-06T02:00:13.247Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["android","astronomy","dart","flutter","ios","mobile","nasa","web"],"created_at":"2025-09-06T20:09:59.903Z","updated_at":"2025-09-06T20:10:02.245Z","avatar_url":"https://github.com/dartoos-dev.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# astronomy_picture_of_the_day\n\n\u003cp align=\"center\"\u003e \n  \u003ca href=\"https://www.nasa.gov/\" align=\"right\"\u003e\n    \u003cimg width=\"156\" alt=\"NASA icon\"\n    src=\"https://user-images.githubusercontent.com/24878574/282269386-1804fb09-3afe-4f05-9169-da18b36100a3.png\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n[![license](https://img.shields.io/badge/license-mit-green.svg)](https://github.com/dartoos-dev/astronomy_picture_of_the_day/blob/master/LICENSE)\n[![build](https://github.com/dartoos-dev/astronomy_picture_of_the_day/actions/workflows/build.yml/badge.svg)](https://github.com/dartoos-dev/astronomy_picture_of_the_day/actions/)\n[![codecov](https://codecov.io/gh/dartoos-dev/astronomy_picture_of_the_day/branch/master/graph/badge.svg?token=W6spF0S796)](https://codecov.io/gh/dartoos-dev/astronomy_picture_of_the_day)\n[![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/rafamizes/astronomy_picture_of_the_day)](https://www.codefactor.io/repository/github/rafamizes/astronomy_picture_of_the_day)\n[![style: lint](https://img.shields.io/badge/style-lint-4BC0F5.svg)](https://pub.dev/packages/lint)\n[![Hits-of-Code](https://hitsofcode.com/github/dartoos-dev/astronomy_picture_of_the_day?branch=master)](https://hitsofcode.com/github/dartoos-dev/astronomy_picture_of_the_day/view?branch=master)\n[![DevOps By\nRultor.com](https://www.rultor.com/b/dartoos-dev/astronomy_picture_of_the_day)](https://www.rultor.com/p/dartoos-dev/astronomy_picture_of_the_day)\n\n## Contents\n\n- [Overview](#overview)\n- [Getting Started](#getting-started)\n- [Running the App](#running-the-app)\n- [Main Application Features](#main-application-features)\n- [Project Structure Overview](#project-structure-overview)\n  - [Project Architecture](#project-architecture)\n  - [Directory Structure](#directory-structure)\n  - [Package by feature](#package-by-feature)\n- [Core Third-Party Packages](#core-third-party-packages)\n- [References](#references)\n\n## Overview\n\nThis is a Flutter app project to display NASA's astronomy picture of the day.\n\n## Getting Started\n\nThis project is a fully functional example, focussed on showing\nastronomy-related images by making http requests to NASA's public APIs.\n\nYou can take the code in this project and experiment with it.\n\n```shell\n  git clone https://github.com/dartoos-dev/astronomy_picture_of_the_day.git\n  cd astronomy_picrture_of_the_day\n```\n\n## Running the App\n\nAs it is a Flutter project, you can run it on different platforms — Android,\nIoS, Web, etc. But before running the application, you need to know which\ndevices are connected to your computer; you can achieve this by listing all\ndevices with the following terminal command:\n\n```shell\n  flutter devices\n```\n\nThe above command will display a list similar to:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"list of connected devices\"\n  src=\"https://user-images.githubusercontent.com/24878574/282270845-2ea519df-9136-4d23-96f9-15fde7c53e88.png\"\u003e\n\u003c/p\u003e\n\nFor example, to run the app on one of the listed devices in debug mode:\n\n#### Android\n\n```shell\n  flutter run -d RQCW70\n```\n\n#### IoS\n\n```shell\n  flutter run -d 257E76\n```\n\n#### Chrome\n\n```shell\n  flutter run -d chrome\n```\n\n## Main Application Features\n\n- List of astronomy pictures of the day retrieved from NASA's public API.\n- Detail page of selected picture.\n- Pull-to-refresh capability.\n- Pagination.\n- Automatically retries http requests when the device connection is intermittent\n  or the server is offline at the time of the request — it uses an exponential\n  backoff algorithm to retry the failed requests.\n- It still works when offline.\n\n## Project Structure Overview\n\n### Project Architecture\n\n- Clean Architecture\n\n### Directory Structure\n\n```shell\nlib  \n└───features  \n│   └───feature1  \n│   │  \t└───sub_feature  \n│   │   └───data  \n│   │   └───domain  \n│   │   └───external  \n│   │   └───presenter  \n│   └───feature2  \n│   │  \t└───sub_feature  \n│   │  \t└───data  \n│   │  \t└───domain  \n│   │  \t└───external  \n│   │  \t└───presenter  \n└───shared  \n│   app_module.dart  \n│   app_widget.dart \n│   main.dart \n```\n\n### Package by feature\n\nIn regard to packages or modules, this project uses the \"package-by-feature\"\napproach rather than the more usual \"package-by-layer\". The former uses\npackages to reflect the feature set; it places all items related to a single\nfeature into a single directory whose name corresponds to important, high-level\naspects of the problem domain.\n\nIt is important to note that package-by-feature style still honors the idea of\nseparating layers, but that separation is implemented using **separate\nclasses**.\n\n#### Advantages of package by feature\n\n- easy and logical code navigation — all items needed for a task are usually in\n  the same directory.\n- emphasis on core services rather than implementation details.\n- scope minimization (package-private as default, not public as in package-by-layer).\n- low coupling between modules.\n- scalability: the number of classes remains limited to the items related\n  to a specific feature.\n\n#### Drawbacks of package by layer\n\n- poor overview of all classes that belong to a feature.\n- complex, hard to understand, and easy to break code as impact of a change is\n  hard to grasp.\n- leads to central classes containing all methods for every use case. Over time,\n  those methods get bigger (with extra parameters) to fulfill more use cases.\n\n## Core Third-Party Packages\n\n- [dartz](https://pub.dev/packages/dartz): functional library.\n- [dio](https://pub.dev/packages/dio): http client library.\n- [flutter_modular](https://pub.dev/packages/flutter_modular): dependency injection and routing.\n- [lint](https://pub.dev/packages/lint): stricter static analysis rules.\n- [localization](https://pub.dev/packages/localization): simplifies in-app translation.\n- [mocktail](https://pub.dev/packages/mocktail): mock framework for unit testing purposes.\n\n## References\n\n- [API NASA](https://api.nasa.gov/)\n- [Clean Dart](https://github.com/Flutterando/Clean-Dart)\n- [package by feature](https://phauer.com/2020/package-by-feature/)\n- [package by feature, not layer](http://www.javapractices.com/topic/TopicAction.do?Id=205)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdartoos-dev%2Fastronomy_picture_of_the_day","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdartoos-dev%2Fastronomy_picture_of_the_day","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdartoos-dev%2Fastronomy_picture_of_the_day/lists"}