Skip to content

A modern Flutter application for browsing and discovering movies, built with clean architecture principles and state-of-the-art Flutter packages.

Notifications You must be signed in to change notification settings

JEstebanDev/MovieApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 Movies App

A modern Flutter application for browsing and discovering movies, built with clean architecture principles and state-of-the-art Flutter packages.

Flutter Version Dart Version

πŸ“‹ Table of Contents

✨ Features

  • πŸŽ₯ Browse popular movies
  • πŸ” Search for movies
  • πŸ“± Responsive UI design
  • 🎨 Modern Material Design
  • πŸ”„ State management with Riverpod
  • 🌐 API integration with The Movie Database (TMDB)
  • 🎭 Smooth animations
  • πŸ“Š Clean architecture implementation

πŸ—οΈ Architecture

This project follows Clean Architecture principles with a clear separation of concerns:

lib/
β”œβ”€β”€ config/          # App configuration (theme, routing, constants)
β”œβ”€β”€ domain/          # Business logic layer
β”‚   β”œβ”€β”€ entities/    # Business entities
β”‚   β”œβ”€β”€ repositories/# Repository interfaces
β”‚   └── datasources/ # Datasource interfaces
β”œβ”€β”€ infrastructure/  # Data layer
β”‚   β”œβ”€β”€ datasources/ # API implementations
β”‚   β”œβ”€β”€ models/      # Data models
β”‚   β”œβ”€β”€ mappers/     # Entity-Model mappers
β”‚   └── repositories/# Repository implementations
└── presentation/    # UI layer
    β”œβ”€β”€ screens/     # App screens
    β”œβ”€β”€ widgets/     # Reusable widgets
    └── providers/   # Riverpod providers

Architecture Layers

  • Domain Layer: Contains business logic, entities, and repository interfaces
  • Infrastructure Layer: Implements data sources, API calls, and repositories
  • Presentation Layer: UI components, screens, and state management

πŸ› οΈ Tech Stack

Core

  • Flutter SDK: ^3.9.2
  • Dart SDK: ^3.9.2

State Management

  • flutter_riverpod: ^3.0.1 - Reactive state management

Navigation

  • go_router: ^16.2.4 - Declarative routing

Networking

  • dio: ^5.9.0 - HTTP client for API calls

UI Components

  • card_swiper: ^3.0.1 - Card swiper widget
  • animate_do: ^4.2.0 - Animation library

Utilities

  • flutter_dotenv: ^6.0.0 - Environment configuration
  • intl: ^0.20.2 - Internationalization and formatting

Development

  • flutter_lints: ^5.0.0 - Linting rules
  • flutter_test: Testing framework

πŸ“¦ Prerequisites

Before you begin, ensure you have the following installed:

πŸš€ Installation

  1. Clone the repository

    git clone <repository-url>
    cd movies_app
  2. Install dependencies

    flutter pub get
  3. Verify Flutter installation

    flutter doctor

    Make sure all required dependencies are installed and configured.

βš™οΈ Configuration

Environment Variables Setup

  1. Copy the environment template

    cp .env.template .env
  2. Configure your API credentials

    Open the .env file and add your TMDB API credentials:

    THE_MOVIE_DB_KEY=your_api_key_here
    API_TOKEN=your_api_token_here
    URL_BASE_MOVIE=https://api.themoviedb.org/3
  3. Get TMDB API Credentials

    • Visit The Movie Database
    • Create a free account
    • Go to Settings β†’ API
    • Request an API key
    • Copy your API Key and API Read Access Token
    • Paste them into your .env file

⚠️ Important: Never commit your .env file to version control. It's already included in .gitignore.

πŸ“ Project Structure

movies_app/
β”œβ”€β”€ android/              # Android native code
β”œβ”€β”€ ios/                  # iOS native code
β”œβ”€β”€ linux/                # Linux native code
β”œβ”€β”€ macos/                # macOS native code
β”œβ”€β”€ lib/                  # Main application code
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   β”œβ”€β”€ constants/    # App constants
β”‚   β”‚   β”œβ”€β”€ helpers/      # Helper functions
β”‚   β”‚   β”œβ”€β”€ router/       # Navigation configuration
β”‚   β”‚   └── theme/        # App theme
β”‚   β”œβ”€β”€ domain/
β”‚   β”‚   β”œβ”€β”€ datasources/  # Data source interfaces
β”‚   β”‚   β”œβ”€β”€ entities/     # Business entities
β”‚   β”‚   └── repositories/ # Repository interfaces
β”‚   β”œβ”€β”€ infrastructure/
β”‚   β”‚   β”œβ”€β”€ datasources/  # API implementations
β”‚   β”‚   β”œβ”€β”€ mappers/      # Data mappers
β”‚   β”‚   β”œβ”€β”€ models/       # Data models
β”‚   β”‚   └── repositories/ # Repository implementations
β”‚   β”œβ”€β”€ presentation/
β”‚   β”‚   β”œβ”€β”€ providers/    # Riverpod providers
β”‚   β”‚   β”œβ”€β”€ screens/      # App screens
β”‚   β”‚   └── widgets/      # Reusable widgets
β”‚   └── main.dart         # App entry point
β”œβ”€β”€ .env.template         # Environment variables template
β”œβ”€β”€ .env                  # Environment variables (create this)
β”œβ”€β”€ pubspec.yaml          # Dependencies configuration
└── README.md             # This file

πŸƒ Running the App

Development Mode

Run the app in debug mode:

flutter run

Run on a specific device:

# List available devices
flutter devices

# Run on specific device
flutter run -d <device-id>

Hot Reload

While the app is running, you can use:

  • Press r to hot reload
  • Press R to hot restart
  • Press q to quit

πŸ“± Building for Production

Android

# Build APK
flutter build apk --release

# Build App Bundle (recommended for Play Store)
flutter build appbundle --release

iOS

# Build for iOS
flutter build ios --release

Linux

flutter build linux --release

macOS

flutter build macos --release

πŸ§ͺ Testing

Run all tests:

flutter test

Run tests with coverage:

flutter test --coverage

πŸ› Debugging

Enable Flutter DevTools:

flutter pub global activate devtools
flutter pub global run devtools

πŸ“ Code Style

This project follows the official Flutter style guide and uses flutter_lints for code analysis.

Run the linter:

flutter analyze

Format code:

flutter format .

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“ž Support

If you have any questions or need help, please:


Made with ❀️ using Flutter

About

A modern Flutter application for browsing and discovering movies, built with clean architecture principles and state-of-the-art Flutter packages.

Topics

Resources

Stars

Watchers

Forks