NewsApp

A modern Android application built with Kotlin and Jetpack Compose, providing live news articles from NewsAPI.org

Platform Language UI

📱 Screenshots

HomeScreenLight
HomeScreen Light
DetailsScreenLight
DetailsScreen Light
HomeScreenDark
HomeScreen Dark
DetailsScreenDark
DetailsScreen Dark

🗂️ Table of Contents

✨ Features


📦 First Stable Release: v1.0

🛠 Installation

To set up the project locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/chrysophilist/NewsApp.git
    
  2. Open in Android Studio:
    • Launch Android Studio.
    • Select Open an existing project and navigate to the cloned repository folder.
  3. Install dependencies:
    • Ensure you have the Android SDK configured.
    • Sync the project with Gradle (via File → Sync Project with Gradle Files).
  4. Add your NewsAPI key:
    • Create a file local.properties in the project root (if not present).
    • Add:
    NEWS_API_KEY=your_api_key_here
    
  5. Run the app:
    • Connect an Android device or use an emulator.
    • Click Run in Android Studio to build and deploy the app.

📁 Project Structure

NewsApp/
├── app/
│   ├── manifests/
│   │   └── AndroidManifest.xml         # App manifest
│   ├── java/com/prince/newsapp/
│   │   ├── NewsApp.kt                  # Application class (Hilt Base app)
│   │   ├── MainActivity.kt             # Launch activity
│   │   ├── di/                         # Dependency Injection (Hilt modules)
│   │   │   └── Modules.kt
│   │   ├── models/                     # Data classes for API responses
│   │   │   ├── Article.kt
│   │   │   ├── NewsResponse.kt
│   │   │   └── Source.kt
│   │   ├── navigation/                 # Compose navigation components
│   │   │   ├── NewsAppRoute.kt
│   │   │   └── NewsNavApp.kt
│   │   ├── network/                    # API service interfaces
│   │   │   └── NewsApiService.kt
│   │   ├── repo/                       # Repository layer
│   │   │   └── NewsRepository.kt
│   │   ├── ui/
│   │   │   ├── components/            # Reusable UI components
│   │   │   ├── views/                 # App screens (Home, Details)
│   │   │   └── theme/                 # Theme, colors, typography
│   │   │       ├── Color.kt
│   │   │       ├── Theme.kt
│   │   │       └── Type.kt
│   │   └── viewModels/                 # ViewModels & UiStates
│   │       ├── NewsViewModel.kt
│   │       ├── NewsUiState.kt
│   │       ├── NewsDetailsViewModel.kt
│   │       └── NewsDetailsUiState.kt
├── res/                                 # Resources
├── build.gradle.kts                     # Module-level Gradle build script
└── settings.gradle.kts                  # Project settings

🏗 Tech Stack

🧠 Core

🎨 UI

⚙️ Data & Networking

🧩 Tooling

📄 License

This project is licensed under the MIT License. See LICENSE for details.

📝 Notes

👤 Contact

For questions or feedback, reach out to: