commit 3eb459a307d3075a19c738970d99530d4e8b9c3d Author: reaper Date: Fri Aug 28 10:56:14 2026 -0500 Initialize FishIQ development foundation diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..e56ad9c --- /dev/null +++ b/.env.example @@ -0,0 +1,9 @@ +POSTGRES_DB=fishiq +POSTGRES_USER=fishiq +POSTGRES_PASSWORD=fishiq_dev +DATABASE_URL=postgresql://fishiq:fishiq_dev@db:5432/fishiq +REDIS_URL=redis://redis:6379/0 +DJANGO_SECRET_KEY=change-me-in-real-environments +DJANGO_DEBUG=true +VITE_API_URL=http://localhost:8000/api + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..da5193c --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +.env +.venv/ +__pycache__/ +*.py[cod] +node_modules/ +dist/ +.dart_tool/ +build/ +.idea/ +.vscode/ + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..33931c9 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +.PHONY: up down logs migrate seed test +up: + docker compose up --build +down: + docker compose down +logs: + docker compose logs -f +migrate: + docker compose exec api python manage.py migrate +test: + docker compose exec api python manage.py test + diff --git a/README.md b/README.md new file mode 100644 index 0000000..2b1f8e1 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# FishIQ + +FishIQ is an intelligent fishing companion: trip planning, condition-aware recommendations, personal tackle, catch history, and the Professor Finn conversational guide. + +## First vertical slice + +Lake Eufaula → largemouth bass → Saturday morning → conditions → recommended setup → ask Professor Finn. + +## Start locally + +1. Copy `.env.example` to `.env`. +2. Run `docker compose up --build`. +3. Open the web app at http://localhost:5173 and the API at http://localhost:8000/api/health/. + +The initial API exposes health, water-body, species, trip, and recommendation endpoints. Seed data is created with: + +```bash +docker compose exec api python manage.py seed_demo +``` + +See `docs/ROADMAP.md` for milestones and `docs/ARCHITECTURE.md` for boundaries. + diff --git a/apps/api/Dockerfile b/apps/api/Dockerfile new file mode 100644 index 0000000..6fcd2e9 --- /dev/null +++ b/apps/api/Dockerfile @@ -0,0 +1,8 @@ +FROM python:3.13-slim +ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 +WORKDIR /app +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt +COPY . . +EXPOSE 8000 + diff --git a/apps/api/config/__init__.py b/apps/api/config/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/apps/api/config/__init__.py @@ -0,0 +1 @@ + diff --git a/apps/api/config/settings.py b/apps/api/config/settings.py new file mode 100644 index 0000000..13eaf52 --- /dev/null +++ b/apps/api/config/settings.py @@ -0,0 +1,33 @@ +import os +from pathlib import Path +import dj_database_url + +BASE_DIR = Path(__file__).resolve().parent.parent +SECRET_KEY = os.getenv("DJANGO_SECRET_KEY", "unsafe-development-key") +DEBUG = os.getenv("DJANGO_DEBUG", "false").lower() == "true" +ALLOWED_HOSTS = ["localhost", "127.0.0.1", "api"] +INSTALLED_APPS = [ + "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", + "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", + "corsheaders", "rest_framework", "fishing", +] +MIDDLEWARE = [ + "django.middleware.security.SecurityMiddleware", "django.contrib.sessions.middleware.SessionMiddleware", + "corsheaders.middleware.CorsMiddleware", "django.middleware.common.CommonMiddleware", + "django.middleware.csrf.CsrfViewMiddleware", "django.contrib.auth.middleware.AuthenticationMiddleware", + "django.contrib.messages.middleware.MessageMiddleware", "django.middleware.clickjacking.XFrameOptionsMiddleware", +] +ROOT_URLCONF = "config.urls" +TEMPLATES = [{"BACKEND": "django.template.backends.django.DjangoTemplates", "DIRS": [], "APP_DIRS": True, + "OPTIONS": {"context_processors": ["django.template.context_processors.request", "django.contrib.auth.context_processors.auth", "django.contrib.messages.context_processors.messages"]}}] +WSGI_APPLICATION = "config.wsgi.application" +DATABASES = {"default": dj_database_url.config(default=f"sqlite:///{BASE_DIR / 'db.sqlite3'}")} +AUTH_PASSWORD_VALIDATORS = [] +LANGUAGE_CODE = "en-us" +TIME_ZONE = "UTC" +USE_I18N = True +USE_TZ = True +STATIC_URL = "static/" +DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" +CORS_ALLOWED_ORIGINS = ["http://localhost:5173"] + diff --git a/apps/api/config/urls.py b/apps/api/config/urls.py new file mode 100644 index 0000000..72ca2d4 --- /dev/null +++ b/apps/api/config/urls.py @@ -0,0 +1,5 @@ +from django.contrib import admin +from django.urls import include, path + +urlpatterns = [path("admin/", admin.site.urls), path("api/", include("fishing.urls"))] + diff --git a/apps/api/config/wsgi.py b/apps/api/config/wsgi.py new file mode 100644 index 0000000..6b07e55 --- /dev/null +++ b/apps/api/config/wsgi.py @@ -0,0 +1,5 @@ +import os +from django.core.wsgi import get_wsgi_application +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings") +application = get_wsgi_application() + diff --git a/apps/api/fishing/__init__.py b/apps/api/fishing/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/apps/api/fishing/__init__.py @@ -0,0 +1 @@ + diff --git a/apps/api/fishing/apps.py b/apps/api/fishing/apps.py new file mode 100644 index 0000000..453fa65 --- /dev/null +++ b/apps/api/fishing/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + +class FishingConfig(AppConfig): + default_auto_field = "django.db.models.BigAutoField" + name = "fishing" + diff --git a/apps/api/fishing/migrations/0001_initial.py b/apps/api/fishing/migrations/0001_initial.py new file mode 100644 index 0000000..62dc3a6 --- /dev/null +++ b/apps/api/fishing/migrations/0001_initial.py @@ -0,0 +1,14 @@ +import django.db.models.deletion +from django.conf import settings +from django.db import migrations, models + +class Migration(migrations.Migration): + initial = True + dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)] + operations = [ + migrations.CreateModel(name="Species", fields=[("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), ("common_name", models.CharField(max_length=120, unique=True)), ("scientific_name", models.CharField(blank=True, max_length=160))]), + migrations.CreateModel(name="WaterBody", fields=[("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), ("name", models.CharField(max_length=180)), ("region", models.CharField(max_length=120)), ("latitude", models.DecimalField(decimal_places=6, max_digits=9)), ("longitude", models.DecimalField(decimal_places=6, max_digits=9)), ("species", models.ManyToManyField(blank=True, related_name="water_bodies", to="fishing.species"))], options={"constraints": [models.UniqueConstraint(fields=("name", "region"), name="unique_water_body_region")]}), + migrations.CreateModel(name="Trip", fields=[("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), ("starts_at", models.DateTimeField()), ("ends_at", models.DateTimeField()), ("status", models.CharField(choices=[("planned", "Planned"), ("active", "Active"), ("complete", "Complete")], default="planned", max_length=12)), ("notes", models.TextField(blank=True)), ("created_at", models.DateTimeField(auto_now_add=True)), ("owner", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name="trips", to=settings.AUTH_USER_MODEL)), ("target_species", models.ManyToManyField(related_name="trips", to="fishing.species")), ("water_body", models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name="trips", to="fishing.waterbody"))]), + migrations.CreateModel(name="Recommendation", fields=[("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), ("title", models.CharField(max_length=180)), ("rationale", models.TextField()), ("tackle_setup", models.JSONField(default=dict)), ("confidence", models.DecimalField(decimal_places=3, max_digits=4)), ("generated_at", models.DateTimeField(auto_now_add=True)), ("trip", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name="recommendations", to="fishing.trip"))]), + ] + diff --git a/apps/api/fishing/migrations/__init__.py b/apps/api/fishing/migrations/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/apps/api/fishing/migrations/__init__.py @@ -0,0 +1 @@ + diff --git a/apps/api/fishing/models.py b/apps/api/fishing/models.py new file mode 100644 index 0000000..2299fda --- /dev/null +++ b/apps/api/fishing/models.py @@ -0,0 +1,40 @@ +from django.conf import settings +from django.db import models + +class Species(models.Model): + common_name = models.CharField(max_length=120, unique=True) + scientific_name = models.CharField(max_length=160, blank=True) + + def __str__(self): return self.common_name + +class WaterBody(models.Model): + name = models.CharField(max_length=180) + region = models.CharField(max_length=120) + latitude = models.DecimalField(max_digits=9, decimal_places=6) + longitude = models.DecimalField(max_digits=9, decimal_places=6) + species = models.ManyToManyField(Species, related_name="water_bodies", blank=True) + + class Meta: + constraints = [models.UniqueConstraint(fields=["name", "region"], name="unique_water_body_region")] + + def __str__(self): return f"{self.name}, {self.region}" + +class Trip(models.Model): + STATUS_CHOICES = [("planned", "Planned"), ("active", "Active"), ("complete", "Complete")] + owner = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, related_name="trips") + water_body = models.ForeignKey(WaterBody, on_delete=models.PROTECT, related_name="trips") + target_species = models.ManyToManyField(Species, related_name="trips") + starts_at = models.DateTimeField() + ends_at = models.DateTimeField() + status = models.CharField(max_length=12, choices=STATUS_CHOICES, default="planned") + notes = models.TextField(blank=True) + created_at = models.DateTimeField(auto_now_add=True) + +class Recommendation(models.Model): + trip = models.ForeignKey(Trip, on_delete=models.CASCADE, related_name="recommendations") + title = models.CharField(max_length=180) + rationale = models.TextField() + tackle_setup = models.JSONField(default=dict) + confidence = models.DecimalField(max_digits=4, decimal_places=3) + generated_at = models.DateTimeField(auto_now_add=True) + diff --git a/apps/api/fishing/serializers.py b/apps/api/fishing/serializers.py new file mode 100644 index 0000000..f48d828 --- /dev/null +++ b/apps/api/fishing/serializers.py @@ -0,0 +1,16 @@ +from rest_framework import serializers +from .models import Recommendation, Species, Trip, WaterBody + +class SpeciesSerializer(serializers.ModelSerializer): + class Meta: model = Species; fields = "__all__" + +class WaterBodySerializer(serializers.ModelSerializer): + species = SpeciesSerializer(many=True, read_only=True) + class Meta: model = WaterBody; fields = "__all__" + +class TripSerializer(serializers.ModelSerializer): + class Meta: model = Trip; fields = "__all__"; read_only_fields = ("owner",) + +class RecommendationSerializer(serializers.ModelSerializer): + class Meta: model = Recommendation; fields = "__all__" + diff --git a/apps/api/fishing/urls.py b/apps/api/fishing/urls.py new file mode 100644 index 0000000..c3f891f --- /dev/null +++ b/apps/api/fishing/urls.py @@ -0,0 +1,11 @@ +from django.urls import include, path +from rest_framework.routers import DefaultRouter +from .views import RecommendationViewSet, SpeciesViewSet, TripViewSet, WaterBodyViewSet, health + +router = DefaultRouter() +router.register("species", SpeciesViewSet) +router.register("water-bodies", WaterBodyViewSet) +router.register("trips", TripViewSet, basename="trip") +router.register("recommendations", RecommendationViewSet, basename="recommendation") +urlpatterns = [path("health/", health), path("", include(router.urls))] + diff --git a/apps/api/fishing/views.py b/apps/api/fishing/views.py new file mode 100644 index 0000000..43097b0 --- /dev/null +++ b/apps/api/fishing/views.py @@ -0,0 +1,30 @@ +from django.http import JsonResponse +from rest_framework import permissions, viewsets +from .models import Recommendation, Species, Trip, WaterBody +from .serializers import RecommendationSerializer, SpeciesSerializer, TripSerializer, WaterBodySerializer + +def health(_request): + return JsonResponse({"status": "ok", "service": "fishiq-api"}) + +class ReadOnlyCatalogViewSet(viewsets.ReadOnlyModelViewSet): + permission_classes = [permissions.AllowAny] + +class SpeciesViewSet(ReadOnlyCatalogViewSet): + queryset = Species.objects.all().order_by("common_name") + serializer_class = SpeciesSerializer + +class WaterBodyViewSet(ReadOnlyCatalogViewSet): + queryset = WaterBody.objects.prefetch_related("species").all().order_by("name") + serializer_class = WaterBodySerializer + +class TripViewSet(viewsets.ModelViewSet): + serializer_class = TripSerializer + permission_classes = [permissions.IsAuthenticated] + def get_queryset(self): return Trip.objects.filter(owner=self.request.user).select_related("water_body") + def perform_create(self, serializer): serializer.save(owner=self.request.user) + +class RecommendationViewSet(viewsets.ReadOnlyModelViewSet): + serializer_class = RecommendationSerializer + permission_classes = [permissions.IsAuthenticated] + def get_queryset(self): return Recommendation.objects.filter(trip__owner=self.request.user) + diff --git a/apps/api/manage.py b/apps/api/manage.py new file mode 100644 index 0000000..6bfa6c8 --- /dev/null +++ b/apps/api/manage.py @@ -0,0 +1,9 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings") + from django.core.management import execute_from_command_line + execute_from_command_line(sys.argv) + diff --git a/apps/api/requirements.txt b/apps/api/requirements.txt new file mode 100644 index 0000000..9ac934b --- /dev/null +++ b/apps/api/requirements.txt @@ -0,0 +1,7 @@ +Django>=5.2,<5.3 +djangorestframework>=3.16,<3.17 +django-cors-headers>=4.7,<5 +dj-database-url>=2.3,<3 +psycopg[binary]>=3.2,<4 +redis>=6,<7 + diff --git a/apps/mobile/.gitignore b/apps/mobile/.gitignore new file mode 100644 index 0000000..79f7eca --- /dev/null +++ b/apps/mobile/.gitignore @@ -0,0 +1,48 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.build/ +.buildlog/ +.history +.svn/ +.swiftpm/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ +/coverage/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release + +# Widget Preview related +.widget_preview/ diff --git a/apps/mobile/.metadata b/apps/mobile/.metadata new file mode 100644 index 0000000..725e95f --- /dev/null +++ b/apps/mobile/.metadata @@ -0,0 +1,36 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "d3b14c876900e553bc736ca19295fc09e3853e8e" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: d3b14c876900e553bc736ca19295fc09e3853e8e + base_revision: d3b14c876900e553bc736ca19295fc09e3853e8e + - platform: android + create_revision: d3b14c876900e553bc736ca19295fc09e3853e8e + base_revision: d3b14c876900e553bc736ca19295fc09e3853e8e + - platform: linux + create_revision: d3b14c876900e553bc736ca19295fc09e3853e8e + base_revision: d3b14c876900e553bc736ca19295fc09e3853e8e + - platform: web + create_revision: d3b14c876900e553bc736ca19295fc09e3853e8e + base_revision: d3b14c876900e553bc736ca19295fc09e3853e8e + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/apps/mobile/README.md b/apps/mobile/README.md new file mode 100644 index 0000000..fa73726 --- /dev/null +++ b/apps/mobile/README.md @@ -0,0 +1,17 @@ +# fishiq_mobile + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Learn Flutter](https://docs.flutter.dev/get-started/learn-flutter) +- [Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Flutter learning resources](https://docs.flutter.dev/reference/learning-resources) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/apps/mobile/analysis_options.yaml b/apps/mobile/analysis_options.yaml new file mode 100644 index 0000000..676c0c3 --- /dev/null +++ b/apps/mobile/analysis_options.yaml @@ -0,0 +1,35 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +analyzer: + exclude: + - build/** + - android/** + - web/** + - linux/** + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/apps/mobile/android/.gitignore b/apps/mobile/android/.gitignore new file mode 100644 index 0000000..be3943c --- /dev/null +++ b/apps/mobile/android/.gitignore @@ -0,0 +1,14 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java +.cxx/ + +# Remember to never publicly share your keystore. +# See https://flutter.dev/to/reference-keystore +key.properties +**/*.keystore +**/*.jks diff --git a/apps/mobile/android/app/build.gradle.kts b/apps/mobile/android/app/build.gradle.kts new file mode 100644 index 0000000..3c44fce --- /dev/null +++ b/apps/mobile/android/app/build.gradle.kts @@ -0,0 +1,49 @@ +plugins { + id("com.android.application") + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id("dev.flutter.flutter-gradle-plugin") +} + +android { + namespace = "com.example.fishiq_mobile" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.example.fishiq_mobile" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + // Uses the version code from pubspec.yaml. When using split APKs, 1000 * ABI_VERSION + // is added automatically by Flutter. (https://developer.android.com/studio/build/configure-apk-splits#configure-APK-versions) + // You can force using the value of versionCode by specifying the `-P force-version-code-ignoring-abi=true` + // flag during build. + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.getByName("debug") + } + } +} + +kotlin { + compilerOptions { + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17 + } +} + +flutter { + source = "../.." +} diff --git a/apps/mobile/android/app/src/debug/AndroidManifest.xml b/apps/mobile/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/apps/mobile/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/apps/mobile/android/app/src/main/AndroidManifest.xml b/apps/mobile/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..4df532c --- /dev/null +++ b/apps/mobile/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/apps/mobile/android/app/src/main/kotlin/com/example/fishiq_mobile/MainActivity.kt b/apps/mobile/android/app/src/main/kotlin/com/example/fishiq_mobile/MainActivity.kt new file mode 100644 index 0000000..b72b4f7 --- /dev/null +++ b/apps/mobile/android/app/src/main/kotlin/com/example/fishiq_mobile/MainActivity.kt @@ -0,0 +1,5 @@ +package com.example.fishiq_mobile + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity : FlutterActivity() diff --git a/apps/mobile/android/app/src/main/res/drawable-v21/launch_background.xml b/apps/mobile/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/apps/mobile/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/apps/mobile/android/app/src/main/res/drawable/launch_background.xml b/apps/mobile/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/apps/mobile/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..db77bb4 Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..17987b7 Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..09d4391 Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..d5f1c8d Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..4d6372e Binary files /dev/null and b/apps/mobile/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/apps/mobile/android/app/src/main/res/values-night/styles.xml b/apps/mobile/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/apps/mobile/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/apps/mobile/android/app/src/main/res/values/styles.xml b/apps/mobile/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..cb1ef88 --- /dev/null +++ b/apps/mobile/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/apps/mobile/android/app/src/profile/AndroidManifest.xml b/apps/mobile/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/apps/mobile/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/apps/mobile/android/build.gradle.kts b/apps/mobile/android/build.gradle.kts new file mode 100644 index 0000000..dbee657 --- /dev/null +++ b/apps/mobile/android/build.gradle.kts @@ -0,0 +1,24 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +val newBuildDir: Directory = + rootProject.layout.buildDirectory + .dir("../../build") + .get() +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean") { + delete(rootProject.layout.buildDirectory) +} diff --git a/apps/mobile/android/gradle.properties b/apps/mobile/android/gradle.properties new file mode 100644 index 0000000..e96108c --- /dev/null +++ b/apps/mobile/android/gradle.properties @@ -0,0 +1,6 @@ +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +# This newDsl flag was added by the Flutter template +android.newDsl=false +# This builtInKotlin flag was added by the Flutter template +android.builtInKotlin=false diff --git a/apps/mobile/android/gradle/wrapper/gradle-wrapper.properties b/apps/mobile/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..a20f2c4 --- /dev/null +++ b/apps/mobile/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-all.zip diff --git a/apps/mobile/android/settings.gradle.kts b/apps/mobile/android/settings.gradle.kts new file mode 100644 index 0000000..b28021a --- /dev/null +++ b/apps/mobile/android/settings.gradle.kts @@ -0,0 +1,26 @@ +pluginManagement { + val flutterSdkPath = + run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + flutterSdkPath + } + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id("dev.flutter.flutter-plugin-loader") version "1.0.0" + id("com.android.application") version "9.1.0" apply false + id("org.jetbrains.kotlin.android") version "2.4.0" apply false +} + +include(":app") diff --git a/apps/mobile/lib/main.dart b/apps/mobile/lib/main.dart new file mode 100644 index 0000000..15c8599 --- /dev/null +++ b/apps/mobile/lib/main.dart @@ -0,0 +1,14 @@ +import 'package:flutter/material.dart'; + +void main() => runApp(const FishIQApp()); + +class FishIQApp extends StatelessWidget { + const FishIQApp({super.key}); + @override + Widget build(BuildContext context) => MaterialApp( + title: 'FishIQ', + theme: ThemeData(colorScheme: ColorScheme.fromSeed(seedColor: const Color(0xFF197457), brightness: Brightness.dark)), + home: Scaffold(appBar: AppBar(title: const Text('FishIQ')), body: const Center(child: Text('Plan smarter. Fish better.'))), + ); +} + diff --git a/apps/mobile/linux/.gitignore b/apps/mobile/linux/.gitignore new file mode 100644 index 0000000..d3896c9 --- /dev/null +++ b/apps/mobile/linux/.gitignore @@ -0,0 +1 @@ +flutter/ephemeral diff --git a/apps/mobile/linux/CMakeLists.txt b/apps/mobile/linux/CMakeLists.txt new file mode 100644 index 0000000..2b8f42a --- /dev/null +++ b/apps/mobile/linux/CMakeLists.txt @@ -0,0 +1,128 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.13) +project(runner LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "fishiq_mobile") +# The unique GTK application identifier for this application. See: +# https://wiki.gnome.org/HowDoI/ChooseApplicationID +set(APPLICATION_ID "com.example.fishiq_mobile") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(SET CMP0063 NEW) + +# Load bundled libraries from the lib/ directory relative to the binary. +set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") + +# Root filesystem for cross-building. +if(FLUTTER_TARGET_PLATFORM_SYSROOT) + set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +endif() + +# Define build configuration options. +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") +endif() + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_14) + target_compile_options(${TARGET} PRIVATE -Wall -Werror) + target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") + target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) + +# Application build; see runner/CMakeLists.txt. +add_subdirectory("runner") + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) + +# Only the install-generated bundle's copy of the executable will launch +# correctly, since the resources must in the right relative locations. To avoid +# people trying to run the unbundled copy, put it in a subdirectory instead of +# the default top-level location. +set_target_properties(${BINARY_NAME} + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" +) + + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# By default, "installing" just makes a relocatable bundle in the build +# directory. +set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +# Start with a clean build bundle directory every time. +install(CODE " + file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") + " COMPONENT Runtime) + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) + install(FILES "${bundled_library}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endforeach(bundled_library) + +# Copy the native assets provided by the build.dart from all packages. +set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/") +install(DIRECTORY "${NATIVE_ASSETS_DIR}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") + install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() diff --git a/apps/mobile/linux/flutter/CMakeLists.txt b/apps/mobile/linux/flutter/CMakeLists.txt new file mode 100644 index 0000000..d5bd016 --- /dev/null +++ b/apps/mobile/linux/flutter/CMakeLists.txt @@ -0,0 +1,88 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.10) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. + +# Serves the same purpose as list(TRANSFORM ... PREPEND ...), +# which isn't available in 3.10. +function(list_prepend LIST_NAME PREFIX) + set(NEW_LIST "") + foreach(element ${${LIST_NAME}}) + list(APPEND NEW_LIST "${PREFIX}${element}") + endforeach(element) + set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) +endfunction() + +# === Flutter Library === +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) +pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) +pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) + +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "fl_basic_message_channel.h" + "fl_binary_codec.h" + "fl_binary_messenger.h" + "fl_dart_project.h" + "fl_engine.h" + "fl_json_message_codec.h" + "fl_json_method_codec.h" + "fl_message_codec.h" + "fl_method_call.h" + "fl_method_channel.h" + "fl_method_codec.h" + "fl_method_response.h" + "fl_plugin_registrar.h" + "fl_plugin_registry.h" + "fl_standard_message_codec.h" + "fl_standard_method_codec.h" + "fl_string_codec.h" + "fl_value.h" + "fl_view.h" + "flutter_linux.h" +) +list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") +target_link_libraries(flutter INTERFACE + PkgConfig::GTK + PkgConfig::GLIB + PkgConfig::GIO +) +add_dependencies(flutter flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CMAKE_CURRENT_BINARY_DIR}/_phony_ + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" + ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} +) diff --git a/apps/mobile/linux/flutter/generated_plugin_registrant.cc b/apps/mobile/linux/flutter/generated_plugin_registrant.cc new file mode 100644 index 0000000..e71a16d --- /dev/null +++ b/apps/mobile/linux/flutter/generated_plugin_registrant.cc @@ -0,0 +1,11 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + + +void fl_register_plugins(FlPluginRegistry* registry) { +} diff --git a/apps/mobile/linux/flutter/generated_plugin_registrant.h b/apps/mobile/linux/flutter/generated_plugin_registrant.h new file mode 100644 index 0000000..e0f0a47 --- /dev/null +++ b/apps/mobile/linux/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void fl_register_plugins(FlPluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/apps/mobile/linux/flutter/generated_plugins.cmake b/apps/mobile/linux/flutter/generated_plugins.cmake new file mode 100644 index 0000000..2e1de87 --- /dev/null +++ b/apps/mobile/linux/flutter/generated_plugins.cmake @@ -0,0 +1,23 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/apps/mobile/linux/runner/CMakeLists.txt b/apps/mobile/linux/runner/CMakeLists.txt new file mode 100644 index 0000000..e97dabc --- /dev/null +++ b/apps/mobile/linux/runner/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.13) +project(runner LANGUAGES CXX) + +# Define the application target. To change its name, change BINARY_NAME in the +# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer +# work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} + "main.cc" + "my_application.cc" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add preprocessor definitions for the application ID. +add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") + +# Add dependency libraries. Add any application-specific dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter) +target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) + +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") diff --git a/apps/mobile/linux/runner/main.cc b/apps/mobile/linux/runner/main.cc new file mode 100644 index 0000000..e7c5c54 --- /dev/null +++ b/apps/mobile/linux/runner/main.cc @@ -0,0 +1,6 @@ +#include "my_application.h" + +int main(int argc, char** argv) { + g_autoptr(MyApplication) app = my_application_new(); + return g_application_run(G_APPLICATION(app), argc, argv); +} diff --git a/apps/mobile/linux/runner/my_application.cc b/apps/mobile/linux/runner/my_application.cc new file mode 100644 index 0000000..a6832b6 --- /dev/null +++ b/apps/mobile/linux/runner/my_application.cc @@ -0,0 +1,148 @@ +#include "my_application.h" + +#include +#ifdef GDK_WINDOWING_X11 +#include +#endif + +#include "flutter/generated_plugin_registrant.h" + +struct _MyApplication { + GtkApplication parent_instance; + char** dart_entrypoint_arguments; +}; + +G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) + +// Called when first Flutter frame received. +static void first_frame_cb(MyApplication* self, FlView* view) { + gtk_widget_show(gtk_widget_get_toplevel(GTK_WIDGET(view))); +} + +// Implements GApplication::activate. +static void my_application_activate(GApplication* application) { + MyApplication* self = MY_APPLICATION(application); + GtkWindow* window = + GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); + + // Use a header bar when running in GNOME as this is the common style used + // by applications and is the setup most users will be using (e.g. Ubuntu + // desktop). + // If running on X and not using GNOME then just use a traditional title bar + // in case the window manager does more exotic layout, e.g. tiling. + // If running on Wayland assume the header bar will work (may need changing + // if future cases occur). + gboolean use_header_bar = TRUE; +#ifdef GDK_WINDOWING_X11 + GdkScreen* screen = gtk_window_get_screen(window); + if (GDK_IS_X11_SCREEN(screen)) { + const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); + if (g_strcmp0(wm_name, "GNOME Shell") != 0) { + use_header_bar = FALSE; + } + } +#endif + if (use_header_bar) { + GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); + gtk_widget_show(GTK_WIDGET(header_bar)); + gtk_header_bar_set_title(header_bar, "fishiq_mobile"); + gtk_header_bar_set_show_close_button(header_bar, TRUE); + gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); + } else { + gtk_window_set_title(window, "fishiq_mobile"); + } + + gtk_window_set_default_size(window, 1280, 720); + + g_autoptr(FlDartProject) project = fl_dart_project_new(); + fl_dart_project_set_dart_entrypoint_arguments( + project, self->dart_entrypoint_arguments); + + FlView* view = fl_view_new(project); + GdkRGBA background_color; + // Background defaults to black, override it here if necessary, e.g. #00000000 + // for transparent. + gdk_rgba_parse(&background_color, "#000000"); + fl_view_set_background_color(view, &background_color); + gtk_widget_show(GTK_WIDGET(view)); + gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); + + // Show the window when Flutter renders. + // Requires the view to be realized so we can start rendering. + g_signal_connect_swapped(view, "first-frame", G_CALLBACK(first_frame_cb), + self); + gtk_widget_realize(GTK_WIDGET(view)); + + fl_register_plugins(FL_PLUGIN_REGISTRY(view)); + + gtk_widget_grab_focus(GTK_WIDGET(view)); +} + +// Implements GApplication::local_command_line. +static gboolean my_application_local_command_line(GApplication* application, + gchar*** arguments, + int* exit_status) { + MyApplication* self = MY_APPLICATION(application); + // Strip out the first argument as it is the binary name. + self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); + + g_autoptr(GError) error = nullptr; + if (!g_application_register(application, nullptr, &error)) { + g_warning("Failed to register: %s", error->message); + *exit_status = 1; + return TRUE; + } + + g_application_activate(application); + *exit_status = 0; + + return TRUE; +} + +// Implements GApplication::startup. +static void my_application_startup(GApplication* application) { + // MyApplication* self = MY_APPLICATION(object); + + // Perform any actions required at application startup. + + G_APPLICATION_CLASS(my_application_parent_class)->startup(application); +} + +// Implements GApplication::shutdown. +static void my_application_shutdown(GApplication* application) { + // MyApplication* self = MY_APPLICATION(object); + + // Perform any actions required at application shutdown. + + G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); +} + +// Implements GObject::dispose. +static void my_application_dispose(GObject* object) { + MyApplication* self = MY_APPLICATION(object); + g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); + G_OBJECT_CLASS(my_application_parent_class)->dispose(object); +} + +static void my_application_class_init(MyApplicationClass* klass) { + G_APPLICATION_CLASS(klass)->activate = my_application_activate; + G_APPLICATION_CLASS(klass)->local_command_line = + my_application_local_command_line; + G_APPLICATION_CLASS(klass)->startup = my_application_startup; + G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; + G_OBJECT_CLASS(klass)->dispose = my_application_dispose; +} + +static void my_application_init(MyApplication* self) {} + +MyApplication* my_application_new() { + // Set the program name to the application ID, which helps various systems + // like GTK and desktop environments map this running application to its + // corresponding .desktop file. This ensures better integration by allowing + // the application to be recognized beyond its binary name. + g_set_prgname(APPLICATION_ID); + + return MY_APPLICATION(g_object_new(my_application_get_type(), + "application-id", APPLICATION_ID, "flags", + G_APPLICATION_NON_UNIQUE, nullptr)); +} diff --git a/apps/mobile/linux/runner/my_application.h b/apps/mobile/linux/runner/my_application.h new file mode 100644 index 0000000..db16367 --- /dev/null +++ b/apps/mobile/linux/runner/my_application.h @@ -0,0 +1,21 @@ +#ifndef FLUTTER_MY_APPLICATION_H_ +#define FLUTTER_MY_APPLICATION_H_ + +#include + +G_DECLARE_FINAL_TYPE(MyApplication, + my_application, + MY, + APPLICATION, + GtkApplication) + +/** + * my_application_new: + * + * Creates a new Flutter-based application. + * + * Returns: a new #MyApplication. + */ +MyApplication* my_application_new(); + +#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/apps/mobile/pubspec.lock b/apps/mobile/pubspec.lock new file mode 100644 index 0000000..018897a --- /dev/null +++ b/apps/mobile/pubspec.lock @@ -0,0 +1,237 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: e2eb0491ba5ddb6177742d2da23904574082139b07c1e33b8503b9f46f3e1a37 + url: "https://pub.dev" + source: hosted + version: "2.13.1" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + characters: + dependency: transitive + description: + name: characters + sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b + url: "https://pub.dev" + source: hosted + version: "1.4.1" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" + url: "https://pub.dev" + source: hosted + version: "1.3.3" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + http: + dependency: "direct main" + description: + name: http + sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412" + url: "https://pub.dev" + source: hosted + version: "1.6.0" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" + url: "https://pub.dev" + source: hosted + version: "4.1.2" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" + url: "https://pub.dev" + source: hosted + version: "11.0.2" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" + url: "https://pub.dev" + source: hosted + version: "3.0.10" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: "31bd099b47c10cd1aeb55146a2d46ce0277630ecef3f7dae54ad7873f36696cd" + url: "https://pub.dev" + source: hosted + version: "0.12.20" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b" + url: "https://pub.dev" + source: hosted + version: "0.13.0" + meta: + dependency: transitive + description: + name: meta + sha256: c82594181e3312f3d0695fc95aaaf7758d75b8d4ae2bbecf223b9fd5109a059d + url: "https://pub.dev" + source: hosted + version: "1.18.3" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab" + url: "https://pub.dev" + source: hosted + version: "1.10.2" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: "2a122cbe059f8b610d3a5415f42e255b6c17b1f21eee1d960f31080237fb4f11" + url: "https://pub.dev" + source: hosted + version: "0.7.12" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "1d774bbdf6b72a0b12122fc1560c9c2d2a67db5a4a4cc2bd8a5c990ab20e3188" + url: "https://pub.dev" + source: hosted + version: "2.4.0" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "5f37239c4851efcef929cea7824e76df7f2f0970aef85d66bbc430afa40e72f0" + url: "https://pub.dev" + source: hosted + version: "15.3.0" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" + source: hosted + version: "1.1.1" +sdks: + dart: ">=3.11.0-0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/apps/mobile/pubspec.yaml b/apps/mobile/pubspec.yaml new file mode 100644 index 0000000..a4f540c --- /dev/null +++ b/apps/mobile/pubspec.yaml @@ -0,0 +1,17 @@ +name: fishiq_mobile +description: FishIQ mobile client +publish_to: none +version: 0.1.0+1 +environment: + sdk: '>=3.5.0 <4.0.0' +dependencies: + flutter: + sdk: flutter + http: ^1.2.2 +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^5.0.0 +flutter: + uses-material-design: true + diff --git a/apps/mobile/test/widget_test.dart b/apps/mobile/test/widget_test.dart new file mode 100644 index 0000000..d6ba251 --- /dev/null +++ b/apps/mobile/test/widget_test.dart @@ -0,0 +1,11 @@ +import 'package:fishiq_mobile/main.dart'; +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('FishIQ launches successfully', (tester) async { + await tester.pumpWidget(const FishIQApp()); + + expect(find.text('FishIQ'), findsOneWidget); + expect(find.text('Plan smarter. Fish better.'), findsOneWidget); + }); +} diff --git a/apps/mobile/web/favicon.png b/apps/mobile/web/favicon.png new file mode 100644 index 0000000..8aaa46a Binary files /dev/null and b/apps/mobile/web/favicon.png differ diff --git a/apps/mobile/web/icons/Icon-192.png b/apps/mobile/web/icons/Icon-192.png new file mode 100644 index 0000000..b749bfe Binary files /dev/null and b/apps/mobile/web/icons/Icon-192.png differ diff --git a/apps/mobile/web/icons/Icon-512.png b/apps/mobile/web/icons/Icon-512.png new file mode 100644 index 0000000..88cfd48 Binary files /dev/null and b/apps/mobile/web/icons/Icon-512.png differ diff --git a/apps/mobile/web/icons/Icon-maskable-192.png b/apps/mobile/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000..eb9b4d7 Binary files /dev/null and b/apps/mobile/web/icons/Icon-maskable-192.png differ diff --git a/apps/mobile/web/icons/Icon-maskable-512.png b/apps/mobile/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000..d69c566 Binary files /dev/null and b/apps/mobile/web/icons/Icon-maskable-512.png differ diff --git a/apps/mobile/web/index.html b/apps/mobile/web/index.html new file mode 100644 index 0000000..59d95cd --- /dev/null +++ b/apps/mobile/web/index.html @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + fishiq_mobile + + + + + + + diff --git a/apps/mobile/web/manifest.json b/apps/mobile/web/manifest.json new file mode 100644 index 0000000..939e7e0 --- /dev/null +++ b/apps/mobile/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "fishiq_mobile", + "short_name": "fishiq_mobile", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A new Flutter project.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +} diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile new file mode 100644 index 0000000..1554d2e --- /dev/null +++ b/apps/web/Dockerfile @@ -0,0 +1,8 @@ +FROM node:24-alpine +WORKDIR /app +COPY package.json pnpm-lock.yaml* ./ +RUN corepack enable && pnpm install +COPY . . +EXPOSE 5173 +CMD ["pnpm", "dev", "--host", "0.0.0.0"] + diff --git a/apps/web/index.html b/apps/web/index.html new file mode 100644 index 0000000..8ff9111 --- /dev/null +++ b/apps/web/index.html @@ -0,0 +1,2 @@ +
+ diff --git a/apps/web/package.json b/apps/web/package.json new file mode 100644 index 0000000..6491770 --- /dev/null +++ b/apps/web/package.json @@ -0,0 +1,2 @@ +{"name":"@fishiq/web","private":true,"version":"0.1.0","type":"module","scripts":{"dev":"vite","build":"tsc -b && vite build","typecheck":"tsc --noEmit"},"dependencies":{"@vitejs/plugin-react":"latest","vite":"latest","typescript":"latest","react":"latest","react-dom":"latest"},"devDependencies":{"@types/react":"latest","@types/react-dom":"latest"}} + diff --git a/apps/web/src/main.tsx b/apps/web/src/main.tsx new file mode 100644 index 0000000..b3317c9 --- /dev/null +++ b/apps/web/src/main.tsx @@ -0,0 +1,11 @@ +import React from "react"; +import { createRoot } from "react-dom/client"; +import "./styles.css"; + +const features = ["Condition-aware plan", "Tackle you already own", "Explainable confidence", "Ask Professor Finn"]; + +function App() { + return

YOUR FISHING INTELLIGENCE

Know where to go.
Know what to throw.

Turn water, weather, season, and your own tackle into a practical fishing plan.

{features.map((f, i) =>
0{i+1}

{f}

)}
; +} +createRoot(document.getElementById("root")!).render(); + diff --git a/apps/web/src/styles.css b/apps/web/src/styles.css new file mode 100644 index 0000000..aea4363 --- /dev/null +++ b/apps/web/src/styles.css @@ -0,0 +1,3 @@ +@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;600;700&family=Manrope:wght@600;800&display=swap'); +:root{font-family:'DM Sans',sans-serif;color:#eaf4ef;background:#071c1b}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 80% 10%,#174e46 0,transparent 34%),#071c1b}main{max-width:1180px;margin:auto;padding:28px}nav{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #ffffff24;padding:0 0 22px}nav strong{font:800 25px Manrope;color:#72e3ad}nav span{color:#a8bdb7}.hero{min-height:600px;display:grid;grid-template-columns:1.5fr 1fr;gap:64px;align-items:center}.eyebrow{color:#72e3ad;font-size:12px;font-weight:700;letter-spacing:.18em}h1{font:800 clamp(48px,7vw,84px)/.98 Manrope;margin:18px 0}.lede{font-size:20px;line-height:1.6;color:#b8c9c4;max-width:600px}button{background:#72e3ad;color:#06201b;border:0;border-radius:99px;padding:15px 25px;font-weight:700;font-size:16px}aside{background:#f2f0e8;color:#102b28;padding:34px;border-radius:24px;box-shadow:0 30px 70px #0005}aside .eyebrow{color:#237c62}.score{font:800 70px Manrope;color:#197457;border-block:1px solid #183a3125;padding:20px 0}.score small{font:600 14px 'DM Sans';color:#526763}.features{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.features article{border-top:1px solid #ffffff33;padding:20px 4px}.features b{color:#72e3ad;font-size:12px}.features h3{font:600 16px Manrope}@media(max-width:760px){.hero{grid-template-columns:1fr;padding:70px 0}.features{grid-template-columns:1fr 1fr}nav span{display:none}} + diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json new file mode 100644 index 0000000..57cf34d --- /dev/null +++ b/apps/web/tsconfig.json @@ -0,0 +1,2 @@ +{"compilerOptions":{"target":"ES2022","useDefineForClassFields":true,"lib":["ES2022","DOM","DOM.Iterable"],"allowJs":false,"skipLibCheck":true,"esModuleInterop":true,"allowSyntheticDefaultImports":true,"strict":true,"forceConsistentCasingInFileNames":true,"module":"ESNext","moduleResolution":"Bundler","resolveJsonModule":true,"isolatedModules":true,"noEmit":true,"jsx":"react-jsx"},"include":["src"],"references":[]} + diff --git a/apps/web/vite.config.ts b/apps/web/vite.config.ts new file mode 100644 index 0000000..95e7bac --- /dev/null +++ b/apps/web/vite.config.ts @@ -0,0 +1,4 @@ +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; +export default defineConfig({ plugins: [react()] }); + diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..f98dbc7 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,49 @@ +services: + db: + image: postgres:17-alpine + environment: + POSTGRES_DB: ${POSTGRES_DB:-fishiq} + POSTGRES_USER: ${POSTGRES_USER:-fishiq} + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-fishiq_dev} + volumes: + - postgres_data:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-fishiq} -d ${POSTGRES_DB:-fishiq}"] + interval: 5s + timeout: 5s + retries: 10 + redis: + image: redis:7-alpine + healthcheck: + test: ["CMD", "redis-cli", "ping"] + interval: 5s + timeout: 3s + retries: 10 + api: + build: ./apps/api + command: sh -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000" + env_file: .env + volumes: + - ./apps/api:/app + ports: + - "8000:8000" + depends_on: + db: + condition: service_healthy + redis: + condition: service_healthy + web: + build: ./apps/web + environment: + VITE_API_URL: ${VITE_API_URL:-http://localhost:8000/api} + volumes: + - ./apps/web:/app + - web_node_modules:/app/node_modules + ports: + - "5173:5173" + depends_on: + - api +volumes: + postgres_data: + web_node_modules: + diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md new file mode 100644 index 0000000..798a3da --- /dev/null +++ b/docs/ARCHITECTURE.md @@ -0,0 +1,16 @@ +# Architecture + +FishIQ begins as a modular monolith around Django and PostgreSQL, with Redis for caching and background work. The web and mobile clients consume a versioned REST API. Professor Finn, recommendations, conditions, and notifications have explicit service boundaries but remain deployable together until scale or team ownership justifies extraction. + +## Core flow + +User + trip + target species + water body → normalized conditions → recommendation evidence → ranked plan → Professor Finn explanation. + +## Principles + +- Keep precise catch locations private by default. +- Store source, timestamp, and freshness for condition data. +- Make recommendations explainable and measure outcomes. +- Keep provider integrations behind adapters. +- Never send secrets or unnecessary personal data to AI providers. + diff --git a/docs/DATA_MODEL.md b/docs/DATA_MODEL.md new file mode 100644 index 0000000..5f8e498 --- /dev/null +++ b/docs/DATA_MODEL.md @@ -0,0 +1,10 @@ +# Initial data model + +- User owns trips, tackle items, catches, and private waypoints. +- WaterBody has geography, access metadata, and known Species. +- Trip targets one water body, a time window, and one or more species. +- ConditionSnapshot records normalized observations and forecast provenance. +- Recommendation belongs to a trip and stores evidence, setup, confidence, and engine version. +- Conversation is scoped to a user and optionally an active trip. +- Catch records outcome, conditions, presentation, and independently controlled location visibility. + diff --git a/docs/DECISIONS.md b/docs/DECISIONS.md new file mode 100644 index 0000000..3b5a083 --- /dev/null +++ b/docs/DECISIONS.md @@ -0,0 +1,14 @@ +# Architecture decisions + +## ADR-001: Modular monolith first + +Accepted. Deploy Django modules together while maintaining service boundaries. This reduces early operational cost and preserves a clean path to extraction. + +## ADR-002: Explainable recommendations + +Accepted. Store inputs, rule/model version, evidence, and confidence with every recommendation. + +## ADR-003: Privacy-first location data + +Accepted. Exact catch coordinates and waypoints are private unless a user deliberately changes visibility. + diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md new file mode 100644 index 0000000..b71ef8e --- /dev/null +++ b/docs/DEVELOPMENT.md @@ -0,0 +1,14 @@ +# Development setup + +## Prerequisites + +- Git +- Docker with Compose and permission to access its service +- Flutter SDK for native mobile development (not needed for the Docker web/API stack) + +Copy `.env.example` to `.env`, then run `docker compose up --build`. + +## Current devbox notes + +At project creation, Git, Docker/Compose, Python, Node, npm, and pnpm were installed. Flutter/Dart were absent, and the current user could not access the Docker socket. Resolve Docker access according to the host's administration policy; do not weaken socket permissions. Install Flutter before generating platform-specific iOS/Android runner files. + diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md new file mode 100644 index 0000000..138868c --- /dev/null +++ b/docs/ROADMAP.md @@ -0,0 +1,35 @@ +# Roadmap + +## Milestone 1 — Eufaula vertical slice + +- Accounts and profiles +- Water bodies and species catalog +- Trip creation +- Condition snapshot contract +- Rules-based bass recommendation +- Professor Finn grounded trip Q&A +- Responsive web experience + +## Milestone 2 — Personalization + +- Digital tackle box and complete setups +- Catch log with photos and privacy controls +- Recommendations constrained to owned tackle +- Feedback loop for recommendation outcomes +- Flutter trip companion + +## Milestone 3 — Field intelligence + +- Maps, private waypoints, contours, and structure +- Live condition-change alerts +- Regulations with provenance and effective dates +- Community reports with anti-abuse controls +- Fish photo identification + +## Milestone 4 — Scale and learning + +- Community pattern aggregation with privacy thresholds +- Personalized ranking models +- Voice conversations +- Broader species and water coverage + diff --git a/packages/shared/README.md b/packages/shared/README.md new file mode 100644 index 0000000..1befdbd --- /dev/null +++ b/packages/shared/README.md @@ -0,0 +1,4 @@ +# Shared contracts + +Versioned API schemas, domain vocabulary, and generated client types belong here once the first API contract stabilizes. + diff --git a/services/conditions/README.md b/services/conditions/README.md new file mode 100644 index 0000000..f57b857 --- /dev/null +++ b/services/conditions/README.md @@ -0,0 +1,4 @@ +# Conditions service + +Normalizes weather, wind, pressure trend, water temperature/level, moon, and solunar windows. External providers will be selected behind adapters so licensing and coverage can change independently. + diff --git a/services/notifications/README.md b/services/notifications/README.md new file mode 100644 index 0000000..0ed6408 --- /dev/null +++ b/services/notifications/README.md @@ -0,0 +1,4 @@ +# Notifications + +Owns trip reminders and meaningful condition-change alerts. It consumes domain events and must respect user quiet hours and channel preferences. + diff --git a/services/professor-finn/README.md b/services/professor-finn/README.md new file mode 100644 index 0000000..fd8b0c3 --- /dev/null +++ b/services/professor-finn/README.md @@ -0,0 +1,4 @@ +# Professor Finn + +Conversation orchestration boundary. It will combine the active trip, live conditions, tackle inventory, catch history, and recommendation evidence into grounded answers. Provider-specific AI code stays behind an adapter and is not committed with secrets. + diff --git a/services/recommendations/README.md b/services/recommendations/README.md new file mode 100644 index 0000000..48ff982 --- /dev/null +++ b/services/recommendations/README.md @@ -0,0 +1,4 @@ +# Recommendation engine + +Rules-first scoring engine for species activity, structure, depth, presentation, and tackle fit. Every output includes evidence and a confidence score; learned ranking can be introduced after sufficient outcome data exists. +