π¦ The app serves as a comprehensive mental health tool combining evidence-based breathing techniques with grounding exercises, designed specifically for anxiety management and panic attack situations.
The idea is to provide users with a simple, intuitive interface to help them manage anxiety and panic attacks through guided breathing exercises and grounding techniques.
I came up with the idea after a dearest friend of mine suffered a panic attack and I wanted to help her.
Guided Breathing Exercises
- 4-7-8 breathing technique with visual circle animation
- Customizable timing for inhale (4s), hold (7s), and exhale (8s) phases
- Visual breathing circle that expands/contracts with breath phases
- Static circle during hold phases for proper guidance
- Audio-free, visual-only guidance suitable for any environment
5-4-3-2-1 Grounding Exercise
- Interactive grounding technique for anxiety management
- Step-by-step prompts: 5 things to see, 4 to touch, 3 to hear, 2 to smell, 1 to taste
- Contextual icons for each sense (Eye, Hand, Ear, Flower, Coffee)
- Progress tracking through each step with completion screen
Yume is built as a Progressive Web App (PWA) that can be deployed both as a web application and as a native Android APK. This hybrid approach ensures maximum accessibility across platforms while maintaining native app performance.
- Framework: Next.js 14 with App Router
- Styling: Tailwind CSS 4.1 with custom animations
- UI Components: Radix UI primitives with custom styling
- TypeScript: Full type safety throughout the application
- PWA: Service Workers with offline support via Workbox
- Mobile: Capacitor for native Android APK generation
- π± Installable: Add to home screen on mobile devices
- π Offline Support: Works without internet after first load
- β‘ Fast Loading: Service worker caching for instant startup
- π¨ Native Feel: Standalone app experience with custom splash screen
- π App Manifest: Proper PWA metadata and shortcuts
- Capacitor: Ionic's native runtime for web apps
- Gradle Build System: Android's official build tools
- Signed APKs: Debug keystore for installable applications
- Java 17: Modern development environment compatibility
# Required tools
- Node.js 18+
- pnpm (package manager)
- Java JDK 17
- Android SDK (for APK builds)# Clone the repository
git clone https://github.com/pedrol2b/yume.git
cd yume
# Install dependencies
pnpm install
# Start development server
pnpm dev# Build PWA + Android APK in one command
npm run deploy:androidThis will:
- Build the Next.js application with PWA features
- Generate service workers for offline support
- Build and sign the Android APK
- Output
yume-release.apkready for installation
# Set up Android platform and generate signing keystore
npm run apk:setup# Build Next.js app with PWA features
npm run pwa:build# Build release APK
npm run apk:build
# Or build debug APK
npm run apk:build-debug
# Or build both
npm run apk:full-build| Script | Description |
|---|---|
npm run deploy:android |
Complete build pipeline (PWA + APK) |
npm run pwa:build |
Build PWA with service workers |
npm run apk:build |
Build signed release APK |
npm run apk:build-debug |
Build debug APK for testing |
npm run android:clean |
Clean build cache |
npm run android:run |
Build and run on Android device |
- Precaching: All static assets cached on first visit
- Runtime Caching: Dynamic content caching strategies
- Offline Fallbacks: App works without internet connection
- Cache Strategies: Network-first for API, cache-first for assets
{
"name": "Yume - Dream",
"short_name": "Yume",
"start_url": "/",
"display": "standalone",
"background_color": "#f8fafc",
"theme_color": "#0ea5e9",
"icons": [
{ "src": "/icon-192.png", "sizes": "192x192" },
{ "src": "/icon-512.png", "sizes": "512x512" }
]
}// next.config.mjs
import withPWAInit from "@ducanh2912/next-pwa";
const withPWA = withPWAInit({
dest: "public",
disable: process.env.NODE_ENV === "development",
workboxOptions: {
disableDevLogs: true,
},
});// capacitor.config.ts
const config: CapacitorConfig = {
appId: 'com.pedrol2b.yume',
appName: 'Yume',
webDir: 'out',
server: {
androidScheme: 'https'
}
};- Visit the web app in any modern browser
- Look for "Add to Home Screen" prompt
- Install as PWA for native app experience
- Download
yume-release.apkfrom releases - Enable "Unknown Sources" in Android settings
- Install the APK file
- App appears in your app drawer as "Yume"
# Run on Android emulator
npm run android:run
# Build and copy APK to device
npm run apk:build
# Transfer yume-release.apk to device and install- Universal Compatibility: One codebase for web and mobile
- Offline-First: Essential for anxiety relief tool availability
- Fast Development: Leverage web technologies for mobile
- Easy Updates: Web-based updates without app store delays
- Static Export: Perfect for PWA deployment
- Performance: Built-in optimizations for mobile
- TypeScript: Type safety for reliable anxiety management tools
- Modern DX: Great developer experience for rapid iteration
