ueberpruefen

This commit is contained in:
2025-10-28 23:38:37 +01:00
parent c2c5dd1041
commit 8dab9bfd25
56 changed files with 13640 additions and 2002 deletions

207
docs/BUILD_INSTRUCTIONS.md Normal file
View File

@@ -0,0 +1,207 @@
# Build Instructions - Pottery Diary
## Quick Start (Development)
```bash
# Navigate to project
cd pottery-diary
# Install dependencies (if not already done)
npm install
# Start Expo development server
npm start
# In another terminal, run on platform:
npm run ios # iOS Simulator (Mac only)
npm run android # Android Emulator
```
## Testing
```bash
# Run all unit tests
npm test
# Watch mode for development
npm run test:watch
# Expected output: All tests passing for:
# - Temperature conversions
# - Cone converter
# - Duration formatting
```
## Production Builds
### Prerequisites
1. Install EAS CLI: `npm install -g eas-cli`
2. Create Expo account: https://expo.dev/signup
3. Login: `eas login`
### Configure Project
```bash
# First time only
eas build:configure
# This creates/updates eas.json and app.json
```
### Build Commands
#### iOS
```bash
# Build for iOS
eas build --platform ios --profile production
# Build for iOS Simulator (testing)
eas build --platform ios --profile preview
```
#### Android
```bash
# Build APK for Android
eas build --platform android --profile production
# Build for testing
eas build --platform android --profile preview
```
#### Both Platforms
```bash
eas build --platform all --profile production
```
### Build Profiles (eas.json)
- **development**: Development client with debugging
- **preview**: Internal testing builds (APK for Android, Simulator for iOS)
- **production**: Store-ready builds
## Troubleshooting
### Common Issues
#### 1. SQLite not found
```bash
# Reinstall expo-sqlite
npx expo install expo-sqlite
```
#### 2. Navigation errors
```bash
# Clear cache and restart
npx expo start --clear
```
#### 3. TypeScript errors
```bash
# Check TypeScript compilation
npx tsc --noEmit
```
#### 4. Test failures
```bash
# Clear Jest cache
npm test -- --clearCache
npm test
```
### Platform-Specific
#### iOS
- **Xcode required**: Mac with Xcode 14+ for local builds
- **Simulator**: Install via Xcode → Preferences → Components
- **Certificates**: EAS handles signing for cloud builds
#### Android
- **Android Studio**: Install for local emulator
- **SDK**: API Level 26+ (Android 8.0+)
- **Emulator**: Create AVD with Google Play Store
## Environment Setup
### Required
- Node.js 18+
- npm 9+
- Expo CLI (installed via npx)
### Optional (for local builds)
- Xcode 14+ (iOS, Mac only)
- Android Studio 2022+ (Android)
- EAS CLI (cloud builds)
## Database Management
### Reset Database (Development)
```bash
# Uninstall app to clear SQLite database
# Or delete app data via device settings
# Database auto-migrates on next launch
```
### View Database
```bash
# Use a SQLite browser to inspect:
# iOS: ~/Library/Developer/CoreSimulator/Devices/[DEVICE_ID]/data/Containers/Data/Application/[APP_ID]/Library/Application Support/SQLite/pottery_diary.db
# Android: Use adb or Device File Explorer in Android Studio
```
## Performance Optimization
### App Size
- Current: ~20-30 MB (target < 30 MB)
- Photos are compressed on import
- No large assets bundled
### Speed
- Cold start: <1s (target)
- List scrolling: 60 FPS
- Database queries: <50ms for most operations
## Release Checklist
- [ ] All tests passing (`npm test`)
- [ ] TypeScript compiles (`npx tsc --noEmit`)
- [ ] No console errors in dev mode
- [ ] Test on both iOS and Android
- [ ] Accessibility check (VoiceOver/TalkBack)
- [ ] Update version in app.json
- [ ] Update CHANGELOG.md
- [ ] Build with EAS
- [ ] Test build on physical devices
- [ ] Submit to App Store / Play Store
## Continuous Integration (Future)
Recommended setup:
- GitHub Actions for automated testing
- EAS Build on push to main
- Detox for E2E testing
Example `.github/workflows/test.yml`:
```yaml
name: Test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install
- run: npm test
```
## Support
- Issues: https://github.com/yourusername/pottery-diary/issues
- Expo Docs: https://docs.expo.dev/
- React Native Docs: https://reactnative.dev/
---
Last Updated: 2025-01-15

165
docs/PRD.md Normal file
View File

@@ -0,0 +1,165 @@
# Product Requirements Document - Pottery Diary (US)
## Executive Summary
**Product**: Mobile diary for ceramics/pottery projects (iOS & Android)
**Target Market**: US hobby potters, ceramic students, studio owners
**Launch Date**: Q1 2025
**Version**: 1.0 MVP
### Core Value Proposition
Help makers reproduce results and learn from past firings by tracking every project step (clay → bisque → glaze → firing) with photos, glaze layers, temperatures, cone numbers, and notes.
## Key Features (v1.0)
### 1. Projects (CRUD)
- Create/edit/delete projects
- Cover photo, title, tags, status (in progress/done/archived)
- Gallery view sorted by last updated
### 2. Process Steps
Six step types with contextual fields:
- **Forming**: Basic notes + photos
- **Drying**: Basic notes + photos
- **Bisque Firing**: Cone (e.g., 04), Temperature (°F/°C), Duration (h:mm), Kiln notes, Photos
- **Glazing**: Glaze selection (catalog/custom), Coats (int), Application (brush/dip/spray), Photos
- **Glaze Firing**: Cone (e.g., 6, 10), Temperature, Duration, Kiln notes, Photos
- **Misc**: Basic notes + photos
### 3. Glaze Catalog
- Read-only seed data (25+ US glazes: Amaco, Mayco, Spectrum, Coyote, etc.)
- Add custom glazes (brand, name, code, finish, notes)
- Search by brand/name/code
### 4. Cone-Temperature Converter
- Orton cone reference (022 → 14)
- Auto-fill temperature when cone selected
- User can override auto-filled values
### 5. Settings
- Unit system: Imperial (lb/in/°F) or Metric (kg/cm/°C)
- Temperature unit: °F or °C
- Analytics opt-in (disabled by default)
- Data export (JSON)
### 6. Onboarding
- 3-screen intro with skip option
- Explains key features
## Technical Architecture
### Stack
- **Framework**: React Native (Expo SDK 54)
- **Language**: TypeScript
- **Database**: SQLite (expo-sqlite) - offline-first
- **Navigation**: React Navigation v7
- **Photos**: expo-camera, expo-image-picker, expo-image-manipulator
- **Build**: EAS Build
### Database Schema
```sql
projects (id, title, status, tags, cover_image_uri, created_at, updated_at)
steps (id, project_id, type, notes_markdown, photo_uris, created_at, updated_at)
firing_fields (step_id, cone, temperature_value, temperature_unit, duration_minutes, kiln_notes)
glazing_fields (step_id, glaze_ids, coats, application)
glazes (id, brand, name, code, finish, notes, is_custom, created_at)
settings (id, unit_system, temp_unit, analytics_opt_in)
news_items (id, title, excerpt, url, content_html, published_at, cached_at)
```
### Key Components
- **Repositories**: CRUD operations for all entities
- **Utilities**: Cone converter, unit conversions, UUID, date formatting
- **Analytics**: Privacy-first abstraction (no-op if opt-out)
- **Theme**: Design tokens (colors, spacing, typography)
## US-Specific Design
### Units
- Default: Fahrenheit (°F), Imperial (lb/in)
- Toggle: Celsius (°C), Metric (kg/cm)
### Cone System
- Orton cone numbers standard in US ceramics
- Support common cones: 022, 021, 020...06, 05, 04...1, 2...6...10, 11, 12, 13, 14
- Auto-suggest temperatures per cone chart
### Copy
- US-English spelling and terminology
- Friendly maker vibe, instructive tone
- Example: "Cone", "Kiln Notes", "Coats", "Bisque Firing"
## Accessibility (ADA Compliance)
- **VoiceOver/TalkBack**: All controls labeled
- **Dynamic Type**: Text scales with system settings
- **Contrast**: WCAG AA compliant
- **Tap Targets**: Minimum 44×44 pt
- **Focus Order**: Logical navigation
## Privacy & Compliance
### CCPA
- No personal data collected by default
- Analytics opt-in (anonymous usage events only)
- Data export available
- No data selling or sharing
### COPPA
- Age rating: 4+ (content)
- Not directed at children under 13
- No PII collection
### App Tracking Transparency (iOS)
- Not required (no third-party tracking unless user opts in)
## Success Metrics (First 60-90 Days)
| Metric | Target |
|--------|--------|
| A1 Activation | ≥60% create ≥1 project with ≥1 photo in 24h |
| R7 Retention | ≥30% return in week 1 |
| Feature Adoption | ≥50% of projects have glaze + cone/temp |
| Crash-Free Sessions | ≥99.5% |
## Out of Scope (v1.0)
❌ Social features (likes, comments, sharing)
❌ Multi-device sync / accounts
❌ Recipe calculators
❌ Kiln controller integrations
❌ E-commerce / marketplace
## Roadmap
### v1.1 (Post-Launch)
- Project export (Markdown + ZIP)
- Search/filter by cone/glaze/tag
- Simple reminders
- iCloud/Google Drive backup
### v1.2 (Future)
- PDF one-pager export
- Duplicate project as template
- Expanded glaze catalog (crowdsourced)
## Store Metadata (US)
**Title**: "Pottery Diary Cone & Glaze Log"
**Subtitle**: "Track bisque & glaze firings with photos"
**Keywords**: pottery, ceramics, glaze, cone 6, kiln, bisque, studio, clay
**Category**: Lifestyle (alt: Productivity)
**Age Rating**: 4+
**Price**: Free
## References
- Full PRD: See original document with detailed user stories, flows, and acceptance criteria
- Orton Cone Chart: Based on self-supporting cone end-point temperatures
- Glaze Data: Manufacturer specifications
---
**Document Version**: 1.0
**Last Updated**: 2025-01-15
**Author**: Product Team