Skip to content

Project Structure

Repositories

The project is split into two repos:

  • ai-softly (backend) — github.com/rajgurung/ai-softly
  • ai-softly-frontend (mobile) — github.com/rajgurung/ai-softly-frontend

Backend Structure

backend/
  app/
    controllers/api/v1/   # API endpoints
      auth_controller.rb
      tasks_controller.rb
      dashboard_controller.rb
      ai_controller.rb
      households_controller.rb
      subscriptions_controller.rb
      templates_controller.rb
      device_tokens_controller.rb
    models/
      user.rb             # Auth, subscriptions, leveling
      task.rb             # Core task model with recurrence
      household.rb        # Family sharing
      category.rb         # 8 predefined categories
      task_completion.rb  # Completion history for streaks
      device_token.rb     # Push notification tokens
      life_template.rb    # Pre-built task sets (not DB-backed)
    services/
      ai/
        task_parser.rb        # NL -> structured task (Haiku)
        task_editor.rb        # NL editing commands (Haiku)
        suggestion_generator.rb  # Proactive suggestions (Haiku)
      expo_push_service.rb    # Push notifications via Expo API
      deepgram_service.rb     # Voice transcription tokens
      jwt_service.rb          # JWT encode/decode
      revenuecat_service.rb   # Subscription sync
    jobs/
      weekly_digest_job.rb          # Sunday push notification
      send_push_notification_job.rb # Async push delivery
      sync_subscription_job.rb      # RevenueCat sync
    mailers/
      user_mailer.rb          # Password reset emails
  config/
    routes.rb
    recurring.yml             # Solid Queue scheduled jobs
    newrelic.yml              # New Relic APM config
    initializers/
      lograge.rb              # Structured JSON logging
  spec/                       # 674 specs, 99% coverage

Mobile Structure

mobile/
  app/                        # Expo Router (file-based routing)
    (auth)/                   # Auth screens (login, signup, onboarding)
    (tabs)/                   # Tab navigation (home, tasks, calendar, settings)
    tasks/                    # Task screens (new, detail, AI preview, pomodoro)
    settings/                 # Settings sub-screens (household)
    subscription/             # Paywall screen
    templates.tsx             # Life templates browser
    first-task.tsx            # Smart onboarding
    reset-password.tsx        # Deep link password reset
    _layout.tsx               # Root layout with auth redirect
  components/
    HomeV2.tsx                # Home screen
    SwipeableTaskRow.tsx      # Swipeable task with complete/delete
    CategoryFilter.tsx        # Category pill filter
    DatePickerModal.tsx       # Calendar date picker
    SuggestionsCard.tsx       # AI suggestions on home
    QuickEditBar.tsx          # NL editing (Pro only)
    RescheduleModal.tsx       # Smart rescheduling prompt
    ConfettiOverlay.tsx       # Completion celebration
    WeekCompleteCard.tsx      # Week cleared celebration
    LevelBadge.tsx / LevelJourneySheet.tsx  # Gamification
    VoiceInput.tsx            # Voice recording
  services/
    api.ts                    # Axios API client
    notifications.ts          # Local + push notification scheduling
    revenuecat.ts             # RevenueCat SDK wrapper
    deepgram.ts               # Streaming voice transcription
    logger.ts                 # Structured error logging
    storage.ts                # SecureStore wrapper
  contexts/
    AuthContext.tsx            # Auth state management
    TasksFilterContext.tsx     # Task filter state
  constants/
    theme.ts                  # Colors, spacing, typography
    levels.ts                 # Gamification levels
  __tests__/                  # 204 tests, 24 suites

Internal documentation — not for public distribution