Skip to content

Latest commit

Β 

History

197 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš› Trash Detail β€” Smart Waste Management & Problem Reporting

React Native Expo TypeScript NativeWind Redux Toolkit Socket.io License: CC BY-NC 4.0

Trash Detail is a multi-role, real-time waste management and problem tracking mobile application built with React Native and Expo. It bridges communication gaps between field waste collection personnel, customers, and administrative management teams by enabling instant photo-documented issue reporting and live support tracking.


πŸ“² Download the App

Download on App Store Get it on Google Play


πŸ“± App Screenshots

πŸ” Login & Authentication πŸ“Έ Guided Problem Capture πŸ‘€ User Profile πŸŽ‰ Problem Submitted
Login Screen Camera Capture User Profile Submission Confirmation
Secure Authentication
Email/Password & Role routing
Step 1/4: Camera Capture
Instant photo evidence logging
User Profile Management
Role details & account info
Instant Confirmation
Unique ID generation (e.g. P2)

✨ Key Features

πŸš› 1. Guided Problem Reporting & Documentation

  • 4-Step Wizard: Streamlined reporting workflow (Capture Photo βž” Problem Details βž” Select Customer βž” Overview).
  • In-App Camera & Gallery: Native camera capture powered by expo-camera with built-in image compression and manipulation (expo-image-manipulator).
  • Cloudinary Integration: Automated image uploading to Cloudinary for reliable remote storage and URL distribution.
  • Categorization: Report issues such as blocked bins, parked cars blocking dumpsters, locked gates, overflowing waste, or road construction.

πŸ‘₯ 2. Multi-Role Operating System

  • πŸ‘· Employees: Document field collection obstacles, track report progress, and receive live notifications on problem resolution.
  • 🏘️ Customers: View logged issues affecting their premises, track progress, and communicate directly with support teams.
  • πŸ›‘οΈ Admins & Super Admins: Operational dashboard to view, review, forward, or cancel reported problems, manage user permissions, and invite new members.

πŸ’¬ 3. Real-Time Chat & Support System

  • Socket.io Integration: Low-latency, bidirectional WebSocket connection for live messaging.
  • Dedicated Chat Threads: Separate communication channels for problem resolution and customer support requests.
  • Rich Status Alerts: Real-time read receipts, unread message badges, and instant toast notifications via @baronha/ting.

πŸ” 4. Authentication & Security

  • JWT & Role-Based Navigation: Protected routes auto-filtered by user role using Expo Router layouts ((auth), (employee), (customer), (admin)).
  • Password Recovery & OTP: Password reset flow with verification code support.

πŸ› οΈ Tech Stack

Domain Technology / Library
Framework React Native 0.81.5 with Expo SDK 54
Routing Expo Router v6 (File-based routing & role groups)
Language TypeScript 5.9
Styling NativeWind v4 & TailwindCSS v3
State Management Redux Toolkit & RTK Query (@reduxjs/toolkit)
Persistence @react-native-async-storage/async-storage
Real-Time Communication Socket.io Client v4
Media & Native Hardware expo-camera, expo-image-picker, expo-image-manipulator, expo-location
Notifications & Toasts @baronha/ting & expo-haptics

πŸ“‚ Project Structure

trash-detail/
β”œβ”€β”€ app/                        # Expo Router file-based pages & route groups
β”‚   β”œβ”€β”€ (admin)/                # Admin portal routes & tab navigation
β”‚   β”œβ”€β”€ (auth)/                 # Authentication screens (login, register, forgot/reset password)
β”‚   β”œβ”€β”€ (customer)/             # Customer portal routes & tab navigation
β”‚   β”œβ”€β”€ (employee)/             # Employee portal routes (problem creation wizard & tabs)
β”‚   β”œβ”€β”€ shared/                 # Shared screen components (e.g. Notifications)
β”‚   β”œβ”€β”€ _layout.tsx             # Root layout & Redux / Navigation providers
β”‚   └── index.tsx               # App entry redirect handler
β”œβ”€β”€ assets/                     # Media & design assets
β”‚   β”œβ”€β”€ images/                 # App icons, splash screens, & vector graphics
β”‚   └── screenshots/            # Documentation & README screenshots
β”‚       β”œβ”€β”€ 1.webp              # Login screen
β”‚       β”œβ”€β”€ 2.webp              # Camera capture step
β”‚       β”œβ”€β”€ 3.webp              # User profile
β”‚       └── 4.webp              # Submission confirmation
β”œβ”€β”€ components/                 # Reusable React components split by domain
β”‚   β”œβ”€β”€ admin/                  # Admin-specific components
β”‚   β”œβ”€β”€ auth/                   # Authentication forms & inputs
β”‚   β”œβ”€β”€ customer/               # Customer views & cards
β”‚   β”œβ”€β”€ employee/               # Problem reporting steps & employee UI
β”‚   └── shared/                 # Shared UI elements (headers, buttons, modals)
β”œβ”€β”€ constants/                  # Color tokens, roles, step definitions, state constants
β”œβ”€β”€ hooks/                      # Custom React hooks (Redux typed hooks, socket listeners)
β”œβ”€β”€ scripts/                    # Build & automation scripts (e.g. Android AAB signer)
β”œβ”€β”€ store/                      # Redux store configuration & RTK Query API slices
β”‚   β”œβ”€β”€ slices/                 # API slices (auth, admin, employee, customer, chat, notification)
β”‚   └── store.ts                # Main store configuration
β”œβ”€β”€ types/                      # TypeScript declarations (API schemas, components, models)
└── utils/                      # Helper utilities (time formatting, Cloudinary uploader)

πŸš€ Getting Started

Prerequisites

Ensure you have the following installed on your machine:

  • Node.js: v18.x or higher
  • npm / yarn / pnpm / bun
  • Expo Go app on your mobile device (or Android Studio / Xcode for emulators)

Installation

  1. Clone the repository:

    git clone https://github.com/xyryc/trash-detail.git
    cd trash-detail
  2. Install dependencies:

    npm install
  3. Configure Environment Variables: Create a .env file in the root directory based on .env.example:

    EXPO_PUBLIC_API_URL=https://your-api-endpoint.com/api
    EXPO_PUBLIC_SOCKET_URL=https://your-api-endpoint.com
    EXPO_PUBLIC_CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
    EXPO_PUBLIC_CLOUDINARY_UPLOAD_PRESET=your_upload_preset
    
    # Android Signing Credentials (Optional for local development)
    ANDROID_KEYSTORE_FILE=upload-keystore.jks
    ANDROID_KEY_ALIAS=upload
    ANDROID_KEYSTORE_PASSWORD=your_keystore_password
    ANDROID_KEY_PASSWORD=your_key_password

πŸƒ Running the Application

Development Server

Start the Expo bundler:

npm start
# or
npx expo start

From the terminal menu, you can press:

  • a to open in Android Emulator
  • i to open in iOS Simulator
  • w to open in Web Browser
  • Scan the QR code with Expo Go on your physical device

Platform Specific Commands

Target Platform Command Description
Android npm run android Runs app on connected Android device/emulator
iOS npm run ios Runs app on iOS simulator
Web npm run web Launches local web development server
Linter npm run lint Runs Expo ESLint checks

πŸ“¦ Production Builds & Android AAB Release

This project includes an automated script (scripts/build-android-aab-signed.mjs) to generate signed Android App Bundles (.aab) ready for Google Play Store upload.

Building Signed Android AAB

  1. Ensure environment variables are configured:

    export ANDROID_KEYSTORE_FILE="upload-keystore.jks"
    export ANDROID_KEYSTORE_PASSWORD="your_keystore_password"
    export ANDROID_KEY_ALIAS="upload"
    export ANDROID_KEY_PASSWORD="your_key_password"
  2. Execute the build script:

    npm run android:aab

    The generated signed bundle will be available at: android/app/build/outputs/bundle/release/app-release.aab

  3. Verification Utilities:

    • Check keystore details:
      keytool -list -v -keystore upload-keystore.jks -alias "$ANDROID_KEY_ALIAS"
    • Verify AAB Signature:
      jarsigner -verify -verbose -certs android/app/build/outputs/bundle/release/app-release.aab
    • Generate Gradle Signing Report:
      npm run android:signingReport

πŸ“œ Available Scripts

Command Action
npm start Starts the Expo Metro bundler
npm run android Compiles & launches native Android dev build
npm run ios Compiles & launches native iOS dev build
npm run web Launches Expo web dev server
npm run lint Runs ESLint analysis
npm run android:aab Builds a signed Android App Bundle (.aab)
npm run android:signingReport Outputs Gradle signing certificate details
npm run reset-project Resets project to a blank starter template

🀝 Contributing

Contributions are welcome! Please follow these steps:

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

πŸ“„ License

This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) license. See the LICENSE file for details.

About

Trash Detail is a comprehensive waste management application designed to streamline communication between waste collection employees, customers, and administrators. Report collection issues instantly with photo evidence and track their resolution in real-time.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages