Expert guidance for DEMOCRACY Client, a React Native + Expo app for German Bundestag voting. Handles builds, GraphQL codegen, linting, E2E tests, and iOS/Android deployment with technical debt reduction.
Expert assistant for the DEMOCRACY Client mobile application - a React Native + Expo app that allows German citizens to browse and vote on Bundestag procedures.
DEMOCRACY Client is built with:
Before any development work:
1. **Check prerequisites**:
- Node.js v20+ installed
- pnpm v9+ installed
- For iOS: Xcode and CocoaPods
- For Android: Android Studio and Android SDK
2. **Bootstrap repository**:
```bash
pnpm install --frozen-lockfile
pnpm codegen
```
**Note**: `pnpm codegen` requires internet access to `https://internal.api.democracy-app.de`. If it fails, use existing generated files in `src/__generated__/`.
**Start development server**:
```bash
pnpm start # Metro bundler on http://localhost:8081
pnpm ios # iOS simulator (2-5 min initial build)
pnpm android # Android emulator (2-5 min initial build)
```
**IMPORTANT**: Never cancel Metro bundler during initial startup (takes 2+ minutes).
**Run platform prebuilds**:
```bash
npx expo prebuild --platform ios --no-install # iOS (2-4 sec)
npx expo prebuild --platform android --no-install # Android (requires google-services.json)
```
**ALWAYS run before committing**:
```bash
pnpm lint # ESLint (~6 seconds)
pnpm lint:ts # TypeScript type checking (~6 seconds)
```
CI pipeline will fail if these don't pass.
When making ANY changes, prioritize reducing technical debt:
**TypeScript Best Practices**:
**Component Architecture**:
**Migration Priorities**:
**Expo Router Migration** (ONGOING):
**State Management Consolidation**:
**End-to-End Testing with Maestro**:
Setup Maestro:
```bash
curl -Ls "https://get.maestro.mobile.dev" | bash
export PATH="$PATH":"$HOME/.maestro/bin"
```
Run tests:
```bash
pnpm test:e2e # All tests (15+ min)
pnpm test:e2e:smoke # Basic functionality (5+ min)
pnpm test:e2e:verification # Phone verification (5+ min)
```
Test files location: `.maestro/flows/`
**iOS Deployment**:
```bash
cd deploy/ios
fastlane ios deploy --env [internal|production] # 10-45 min
```
**Android Deployment**:
```bash
cd deploy/android
bundle install
bundle exec fastlane android internal --env [internal|production] # 10-30 min
```
Build variants: `internal` (dev/test), `production` (release)
**Core Application**:
**Configuration**:
**Build & Deploy**:
Before submitting changes:
**Essential (Always Required)**:
1. **Linting**:
```bash
pnpm lint && pnpm lint:ts # ~12 sec total
```
2. **Dev Server Test**:
```bash
timeout 15s pnpm start -- --localhost
```
3. **iOS Build Test**:
```bash
rm -rf ios && npx expo prebuild --platform ios --no-install
```
**Extended (When Possible)**:
4. **GraphQL Codegen** (requires API access):
```bash
pnpm codegen
```
5. **E2E Tests** (requires emulator):
```bash
pnpm test:e2e:smoke
```
**Network Connectivity**:
**Build Issues**:
**Environment**:
1. **GraphQL Integration**: Use typed hooks from generated files
2. **Error Handling**: Implement error boundaries and loading states
3. **Performance**: Use React.memo, useMemo, useCallback
4. **Accessibility**: Include accessibilityLabel and related props
5. **Testing**: Write E2E tests for new user flows
When modifying existing code:
1. **Upgrade patterns**: Convert class components to functional + hooks
2. **Improve types**: Replace `any` with proper TypeScript
3. **Extract logic**: Move business logic to custom hooks
4. **Update imports**: Use TypeScript path aliases
5. **Migrate routing**: Convert React Navigation to Expo Router
The app enables German citizens to browse Bundestag procedures and vote, with full authentication, offline support, and deployment to iOS App Store and Google Play Store.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/democracy-client-development-assistant/raw