Markdown Converter
Agent skill for markdown-converter
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
[byterover-mcp]
always use byterover-retrieve-knowledge tool to get the related context before any tasks always use byterover-store-knowledge to store all the critical informations after sucessful tasks
FourmiMobile is a React Native financial education app built with Ignite boilerplate, implementing Domain Driven Design (DDD) and Test Driven Development (TDD). The app uses a quest-based educational system where users learn financial management through guided interactions.
pnpm install # Install dependencies pnpm start # Start development server with Expo pnpm run android # Run on Android device/emulator pnpm run ios # Run on iOS device/simulator pnpm run web # Run web version
pnpm test # Run Jest test suite pnpm run test:watch # Run tests in watch mode pnpm run lint # Run ESLint with auto-fix pnpm run lint:check # Check linting without fixing pnpm run compile # TypeScript type checking
pnpm run build:ios:sim # Build for iOS simulator pnpm run build:ios:dev # Build for iOS device (development) pnpm run build:android:sim # Build for Android simulator
pnpm run test:maestro # Run Maestro end-to-end tests
The application follows DDD with 3 bounded contexts:
USER PROGRESSION - Quest orchestration and gamification
FINANCIAL DATA - User financial information management
PROJECT MANAGEMENT - Complex financial projects (real estate, debt consolidation)
app/ ├── components/ # Reusable UI components (Ignite standard) ├── screens/ # Screen components ├── navigators/ # Navigation configuration ├── services/ # Application layer services ├── context/ # React context providers ├── domain/ # DDD domain layer (to be implemented) │ ├── aggregates/ # Domain aggregates │ ├── value-objects/ # Domain value objects │ ├── events/ # Domain events │ └── services/ # Domain services ├── infrastructure/ # Infrastructure adapters (to be implemented) └── application/ # Use cases and application services (to be implemented)
@/ for app imports, @assets/ for assets.test.ts/.test.tsx)Key value objects to implement:
MoneyAmount: Financial calculations with cents precisionCurrency: Multi-currency supportQuestId, UserId, ProjectId: Type-safe identifiersValidationStatus: AI-generated content approval statesFollow test pyramid:
Based on domain analysis, implement these missing entities:
Review and decide on Event Bus implementation:
MANDATORY: All user-facing text must use i18n system
tx prop for all Text components: <Text tx="welcomeScreen.title" />text prop with hardcoded strings for user-facing textapp/i18n/ with TypeScript type safety via TxKeyPathapp/i18n/fr.ts (primary) and app/i18n/en.tsMANDATORY: Use theming system for all styles
useAppTheme() hook to access theme context and colorsapp/theme/colors.ts and app/theme/colorsDark.tsthemed() function for conditional styling: style={themed($buttonStyle)}Screen Component:
<Screen> wrapper with preset: "fixed" | "scroll" | "auto"<Screen preset="scroll" safeAreaEdges={["top"]}>Text Component:
tx prop for translated text: <Text tx="common.ok" /><Text preset="heading" weight="bold" size="xl" />AppNavigator.tsxDemoNavigator.tsx as example)Use CLI for consistent code generation:
npx ignite-cli generate screen QuestScreen # Creates typed screen npx ignite-cli generate component QuestStep # Creates component with theming npx ignite-cli generate model User # Creates data model
ignite/templates/ can be customized for project needsSetup: PostHog must be configured for all user interactions
Event Naming Convention:
// Quest events analytics.track("quest_started", { quest_id: "budget_setup", user_level: "beginner" }) analytics.track("step_completed", { quest_id, step_id, completion_time_ms, method: "form" | "voice" }) analytics.track("quest_completed", { quest_id, total_time_ms, experience_gained }) // Financial events analytics.track("profile_updated", { field_changed: "income", validation_method: "ai" | "manual" }) analytics.track("calculation_performed", { calculation_type: "budget_balance", result_value }) // AI interaction events analytics.track("ai_suggestion_accepted", { suggestion_type, context_screen }) analytics.track("ai_validation_corrected", { field_type, confidence_score })
MANDATORY: Every feature must have documentation in
docs/features/[FEATURE_NAME]/
requirements.md: PRD with user stories, acceptance criteria, business rulesroadmap.md: Linear task breakdown (bullet points, no time estimates)technical-design.md: Architecture decisions, API contracts, data modelsdocs/features/quest-system/ ├── requirements.md # What and why ├── roadmap.md # How (step by step) ├── technical-design.md # Implementation details └── testing-strategy.md # Test approaches
# [Feature Name] - Requirements ## User Stories - As a [user type], I want to [action] so that [benefit] - As a [user type], I want to [action] so that [benefit] ## Acceptance Criteria - [ ] Given [context] when [action] then [expected result] - [ ] Given [context] when [action] then [expected result] ## Business Rules 1. [Rule description with rationale] 2. [Rule description with rationale] ## PostHog Analytics Events - Event: `feature_started` - Properties: [list] - Event: `feature_completed` - Properties: [list] - Event: `feature_error` - Properties: [list] ## Dependencies - Domain aggregates: [list of required aggregates] - External services: [list of external dependencies] - UI components: [list of new components needed]
# [Feature Name] - Roadmap ## Linear Implementation Steps - Step 1: [Description of atomic task] - Step 2: [Description of atomic task] - Step 3: [Description of atomic task] - Step 4: [Description of atomic task] ## TDD Approach per Step Each step follows Red-Green-Refactor: 1. Write failing test 2. Minimal implementation to pass 3. Refactor for clean code 4. Commit with descriptive message ## Definition of Done - [ ] All unit tests pass (>90% coverage) - [ ] Integration tests pass - [ ] PostHog events implemented - [ ] i18n translations added (fr + en) - [ ] Dark mode support verified - [ ] Mobile responsive design verified - [ ] Code review completed
CRITICAL: It's mandatory to have the docs before implementing any code related to a feature
Follow the Use Cases pattern for Application Layer orchestration:
// Singleton dependency injection (like Dependencies.ts example) export class Dependencies { // Repositories (Infrastructure Layer) private static _questRepository: QuestRepository | null = null; private static _userProgressionRepository: UserProgressionRepository | null = null; // Services (Application Layer) private static _rewardService: RewardService | null = null; private static _educationalContentService: EducationalContentService | null = null; private static _analyticsService: AnalyticsService | null = null; // Use Cases (Application Layer) private static _completeQuestUseCase: CompleteQuestUseCase | null = null; private static _startQuestUseCase: StartQuestUseCase | null = null; static initialize(): void { // Initialize infrastructure adapters this._questRepository = new ConvexQuestRepository(); this._userProgressionRepository = new ConvexUserProgressionRepository(); // Initialize application services this._rewardService = new RewardService(); this._educationalContentService = new EducationalContentService(); this._analyticsService = new PostHogAnalyticsService(); // Initialize use cases with dependencies this._completeQuestUseCase = new CompleteQuestUseCase( this._questRepository, this._userProgressionRepository, this._rewardService, this._analyticsService ); } // Getters for use cases static completeQuestUseCase(): CompleteQuestUseCase { if (!this._completeQuestUseCase) throw new Error("Dependencies not initialized"); return this._completeQuestUseCase; } }
NO EventBus - Use direct service calls in Use Cases:
RewardService (Application Layer) - not a domain aggregate: