Skip to content

PriyanUdayakumar/MobileApp

Repository files navigation

My PWA App

A Progressive Web Application (PWA) built with React, TypeScript, and Tailwind CSS, featuring offline capabilities, installability, and a mobile-first responsive design.

🚀 Features

  • ⚡ Progressive Web App (PWA) with offline support
  • 📱 Mobile-first responsive design
  • 🎨 Modern UI with Tailwind CSS
  • 🔄 Service Worker for offline functionality
  • 📦 Optimized production build
  • 🔍 SEO friendly
  • 📝 TypeScript for type safety
  • 🛠️ ESLint and Prettier for code quality
  • 🔄 Background sync support
  • 🔔 Push notifications (ready to implement)

🚀 Getting Started

Prerequisites

  • Node.js (v14 or later)
  • npm (v6 or later) or yarn

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/my-pwa-app.git
    cd my-pwa-app
  2. Install dependencies:

    npm install
    # or
    yarn
  3. Create a .env file based on the .env.example:

    cp .env.example .env

    Update the environment variables in the .env file as needed.

Available Scripts

  • npm start - Start the development server
  • npm run build - Build the app for production
  • npm test - Run tests
  • npm run lint - Run ESLint
  • npm run format - Format code with Prettier
  • npm run lint:fix - Fix ESLint issues automatically

🛠 Development

Project Structure

my-pwa-app/
├── public/                 # Static files
│   ├── index.html          # Main HTML file
│   ├── manifest.json       # PWA manifest
│   └── service-worker.js   # Service worker
├── src/
│   ├── components/         # Reusable components
│   ├── hooks/              # Custom React hooks
│   ├── pages/              # Page components
│   ├── services/           # API services
│   ├── styles/             # Global styles
│   ├── types/              # TypeScript type definitions
│   ├── App.tsx             # Main App component
│   ├── index.tsx           # Application entry point
│   └── serviceWorker.ts    # Service worker registration
├── .env.example            # Example environment variables
├── craco.config.js         # CRACO configuration
├── tailwind.config.js      # Tailwind CSS configuration
└── tsconfig.json           # TypeScript configuration

📱 PWA Features

Installation

You can install this PWA on your device:

  1. Chrome/Edge/Opera for Android:

    • Open the app in Chrome/Edge/Opera
    • Tap the menu (three dots) and select "Add to Home screen"
    • Confirm the installation
  2. Safari for iOS:

    • Open the app in Safari
    • Tap the share icon and select "Add to Home Screen"
    • Confirm the installation
  3. Desktop (Chrome/Edge/Opera):

    • Open the app in the browser
    • Look for the install icon in the address bar and click it
    • Confirm the installation

Offline Support

This app works offline thanks to the service worker that caches all the necessary assets. You can test this by:

  1. Opening the app in your browser
  2. Going offline in your browser's developer tools
  3. Refreshing the page - the app should still load and function

🚀 Deployment

Building for Production

To create a production build:

npm run build

This will create a build directory with the production-ready files.

Deploying to a Static Host

You can deploy the built files to any static hosting service like:

📝 License

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

🙏 Acknowledgments

📄 Documentation

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors