A clean, mobile-first Shopping List built with React. Designed to be easily wrapped as a native iPhone app using Capacitor.
shopping-list/
├── public/
│ └── index.html # HTML entry point (meta viewport, fonts)
├── src/
│ ├── components/
│ │ ├── ShoppingItem.js # Single list item (checkbox, label, delete)
│ │ └── ShoppingItem.module.css
│ ├── App.js # Root component (state, logic)
│ ├── App.module.css # App-level styles
│ ├── index.js # React entry point
│ └── index.css # CSS variables, reset
├── capacitor.config.json # Capacitor configuration
├── package.json
└── README.md
- Node.js v16+ and npm installed
- Download Node.js
# 1. Navigate to the project folder
cd shopping-list
# 2. Install dependencies
npm install
# 3. Start the development server
npm startThe app will open at http://localhost:3000 in your browser.
Capacitor wraps your React web app in a native iOS shell. You'll need a Mac with Xcode installed.
| Tool | Install |
|---|---|
| Node.js v16+ | https://nodejs.org |
| Xcode 14+ | Mac App Store |
| Xcode Command Line Tools | xcode-select --install |
| CocoaPods | sudo gem install cocoapods |
npm run buildThis creates an optimized build/ folder. Capacitor uses this as the web content.
npm install @capacitor/core @capacitor/cli
npm install @capacitor/iosnpx cap initWhen prompted:
- App name:
Shopping List - App ID:
com.yourname.shoppinglist← use your own reverse-domain ID - Web asset dir:
build
Or simply leave capacitor.config.json as-is (it's already configured in this project).
npx cap add iosThis creates an ios/ folder with a native Xcode project inside.
After any change to your React app, run:
npm run build
npx cap sync ios
cap synccopies yourbuild/output into the Xcode project and updates native dependencies.
npx cap open iosThis opens the project in Xcode.
In Xcode:
- Select a simulator from the top device dropdown (e.g. iPhone 15 Pro)
- Click the ▶ Run button (or press
Cmd + R) - The app will build and launch in the iOS Simulator
- Connect your iPhone via USB
- In Xcode → Signing & Capabilities → select your Apple Developer account
- Select your iPhone from the device list
- Click ▶ Run
You need a free or paid Apple Developer account to run on a real device.
Whenever you make changes to the React code:
npm run build # Rebuild the web app
npx cap sync ios # Push changes into the native project
npx cap open ios # Re-open Xcode (if not already open)Then run again from Xcode.
- ✅ Add items with input + button (or press Enter)
- ✅ Check/uncheck items (strikethrough when done)
- ✅ Delete individual items
- ✅ Clear all completed items at once
- ✅ Data persists via
localStorage(survives refresh/reopen) - ✅ Touch-friendly UI (large tap targets, safe-area aware)
- ✅ Smooth animations on item add
- Dark theme with CSS custom properties — easy to retheme
- Safe area insets respected for iPhone notch / Dynamic Island
- No external UI frameworks — pure CSS Modules
- Fonts: Syne (display) + DM Sans (body)
| Command | What it does |
|---|---|
npx cap add ios |
Add iOS platform (once) |
npx cap sync |
Sync web build + update plugins |
npx cap copy ios |
Copy web assets only (faster, no plugin update) |
npx cap open ios |
Open project in Xcode |
npx cap run ios |
Run on simulator (without opening Xcode) |
Capacitor plugins give you access to native device features:
# Example: Haptic feedback
npm install @capacitor/haptics
npx cap sync
# Example: Status bar control
npm install @capacitor/status-bar
npx cap syncMake sure your .gitignore includes:
node_modules/
build/
ios/
android/