Skip to content

Repository files navigation

GoPaddi Mini

A simple Android CRUD application built to demonstrates trip planing process using a clean architecture pattern with a repository layer connected to a mock REST API hosted on Beeceptor.


In this app you'll find:

  • User Interface built entirely with Jetpack Compose
  • Single-Activity Architecture using Navigation Compose
  • Reactive UIs powered by Kotlin Coroutines and Flow
  • Repository and Data Source Layers connecting to a REST API
  • Network operations powered by Retrofit and OkHttp Logging Interceptor

🚀 Getting Started

Clone the Repository

git clone git@github.com:J-cart/GoPaddi-Min.git

OR

git clone https://github.com:J-cart/GoPaddi-Min.git

Open in Android Studio

  • Open Android Studio (latest stable version recommended)
  • Select "Open an Existing Project"
  • Navigate to the cloned repository and open it

Configure API URL

Find the Constants file, locate the TRIPS_BASE_URL file and add (or replace) the value with your Beeceptor endpoint:

const val TRIPS_BASE_URL=https://cadbc374110d29b6a253.free.beeceptor.com/

⚠️ Make sure the base URL ends with / to avoid Retrofit errors.


API Endpoints

All network operations are handled through Beeceptor’s mock REST API. Here are the available routes used in the project:

HTTP Method Endpoint Description Implemented
GET /api/trips Fetch all trips
GET /api/trips/:id Fetch a single trip by ID
POST /api/trips Create a new trip
PUT /api/trips/:id Update a full trip record
PATCH /api/trips/:id Update a specific trip field (flight, activity, hotel, etc.)
DELETE /api/trips/:id Delete a trip by ID

Example Base URL: https://cadbc374110d29b6a253.free.beeceptor.com


Project Structure

com.goPaddi.gopaddi_mini
│
├── data/
│   ├── remote/         # Retrofit API and data sources
│   └── repository/     # Repository implementation
│
├── domain/
│   ├── model/          # Data classes (TripDetails, etc.)
│
├── ui/
│   ├── navigation/     # Navigation graph setup
│   ├── screens/        # Jetpack Compose UI screens
│   └── components/     # Reusable UI components
│
│
│
└── MainActivity.kt      # Single activity hosting all composables

Technologies Used

Category Technology
UI Jetpack Compose
Navigation Navigation Compose
Asynchronous Kotlin Coroutines, Flow
Networking Retrofit, OkHttp, Gson
Architecture MVVM (Model-View-ViewModel) + MVI (Model-View-Intent)
Logging HttpLoggingInterceptor

How It Works

  1. View (Compose UI): Displays trip data and triggers user interactions.
  2. ViewModel: Handles UI logic and state using Kotlin Flows.
  3. Repository: Acts as a single source of truth for data, fetching from the Beeceptor API.
  4. Remote Data Source: Uses Retrofit to make network requests and map JSON responses into Kotlin data classes.

Notes

  • This project uses a mock API from Beeceptor, meaning data changes are temporary and exist only for testing purposes.
  • You can create your own Beeceptor endpoint to customize or inspect API requests.

Resources

About

A simple Android CRUD application built to demonstrates trip planing process using a clean architecture pattern with a repository layer connected to a mock REST API hosted on Beeceptor.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages