···11+# Contributing to Spark Client
22+33+Thank you for your interest in contributing to Spark!
44+55+## How to Contribute
66+77+1. **Keep changes scoped** to the feature you are editing
88+2. **Run format, codegen (if needed), and analyze** before opening a PR
99+3. **Test on a real device or simulator** and add screenshots when applicable.
1010+1111+## Development
1212+1313+### Prerequisites
1414+1515+- Flutter SDK 3.41+
1616+- Dart SDK matching Flutter toolchain
1717+- Xcode (for iOS builds) and/or Android SDK
1818+1919+### Setup
2020+2121+From repository root:
2222+2323+```bash
2424+touch .env
2525+flutter pub get --enforce-lockfile # install dependencies
2626+dart run build_runner build --delete-conflicting-outputs # generated code
2727+flutter run
2828+```
2929+3030+### Before Submitting
3131+3232+1. Format your code:
3333+ ```bash
3434+ dart format .
3535+ ```
3636+3737+2. Analyze for issues:
3838+ ```bash
3939+ flutter analyze .
4040+ ```
4141+4242+3. If you changed annotations/models, regenerate code:
4343+ ```bash
4444+ dart run build_runner build --delete-conflicting-outputs
4545+ ```
4646+4747+### Pull Request Guidelines
4848+4949+1. Make your changes following the codebase conventions
5050+2. Ensure CI passes (format check, analyze, build)
5151+4. Use conventional commit titles. e.g. "fix: remove misshapen meatballs" or
5252+ "feat(fruit): add strawberries"
5353+5454+## Code Conventions
5555+5656+- Prefer `package:spark/...` imports; avoid deep relative imports
5757+- Import order: Dart SDK, third-party, project; keep `part` after imports
5858+- Use strong explicit types; avoid `dynamic`
5959+- Use Freezed for immutable models and `@riverpod` for providers
6060+- Naming: types `PascalCase`, members/providers `lowerCamelCase`, private
6161+ `_name`
6262+- Keep feature flow: external/API/storage -> repository -> provider -> widget
+31-93
README.md
···11-# Spark Client
22-33-Flutter client for Spark social. This repository contains the production mobile app,
44-plus workspace packages used by the app (assets, fonts, and widgetbook).
55-66-## What This Repo Contains
77-88-- `spark` app package at repo root (`pubspec.yaml`)
99-- Flutter workspace members:
1010- - `widgetbook` (component/dev preview package)
1111- - `fonts` (shared font package)
1212- - `assets` (shared assets package)
1313-1414-The app is organized with a feature-first structure and uses Riverpod + GetIt +
1515-Freezed + AutoRoute.
1616-1717-## Tech Stack
1818-1919-- Flutter / Dart
2020-- Riverpod (with code generation)
2121-- GetIt for dependency injection
2222-- Freezed + json_serializable for immutable models
2323-- AutoRoute for navigation
2424-- AT Protocol client libraries (`atproto`, `bluesky`)
2525-2626-## Prerequisites
2727-2828-- Flutter SDK (CI uses stable `3.41.3`)
2929-- Dart SDK matching Flutter toolchain
3030-- Xcode (for iOS builds) and/or Android SDK
3131-3232-## Quick Start
3333-3434-From repository root:
3535-3636-```bash
3737-touch .env
3838-flutter pub get --enforce-lockfile
3939-dart run build_runner build --delete-conflicting-outputs
4040-flutter run
4141-```
11+# Spark Social App
4224343-## Common Commands
33+Welcome to the codebase for the Spark Social mobile app.
4444545-### Dependencies and codegen
55+Get the Spark Social app:
4664747-```bash
4848-flutter pub get --enforce-lockfile
4949-dart run build_runner build --delete-conflicting-outputs
5050-dart run build_runner watch --delete-conflicting-outputs
5151-```
5252-5353-### Lint and format
5454-5555-```bash
5656-flutter analyze lib
5757-flutter analyze .
5858-dart format .
5959-dart format --set-exit-if-changed .
6060-```
6161-6262-### Tests
77+- iOS
88+- Android
6396464-No tests are currently committed, but these are the standard commands:
1010+## Overview
65116666-```bash
6767-flutter test
6868-flutter test test/path/to/some_test.dart
6969-flutter test test/path/to/some_test.dart --plain-name "does something specific"
7070-```
1212+This repo contains the mobile client for Spark Social. This is a Flutter app,
1313+written in Dart, using MaterialApp as its base.
71147272-For `widgetbook` (run inside `widgetbook/`):
1515+Spark is an open source shortform social app for photos and videos built on AT
1616+Protocol. It's an open alternative to closed platforms like Instagram and
1717+Tiktok.
73187474-```bash
7575-flutter test
7676-```
1919+We support stories, reusable sounds, DMs, and we have a built-in photo and video
2020+editor powered by [pro_image_editor](https://github.com/hm21/pro_image_editor).
77217878-### Builds
2222+## Structure
79238080-```bash
8181-flutter build appbundle
8282-flutter build apk
8383-flutter build ios --no-codesign
8484-```
2424+The app is organized with a feature-first structure and uses Riverpod + GetIt +
2525+Freezed + AutoRoute. We also utilize the open source
2626+[atproto.dart](https://github.com/myConsciousness/atproto.dart) client
2727+libraries.
85288686-## Project Layout
2929+### Project Layout
87308831```text
8932lib/
···10043assets/ # local assets package
10144```
10245103103-## Architecture Notes
4646+## Resources
10447105105-- Prefer package imports (`package:spark/...`) for app code.
106106-- Typical flow is: external/API/storage -> repository -> provider -> widget.
107107-- Providers are generated with `@riverpod`; immutable state is typically Freezed.
108108-- Generated files (`*.g.dart`, `*.freezed.dart`, `*.gr.dart`) should not be edited manually.
4848+Spark Social is built on [AT Protocol](https://atproto.com/), a protocol for
4949+decentralized social networks. This allows for unprecidented amounts of
5050+user-autonomy and data ownership, and ensures no one entity is in charge of the
5151+network.
10952110110-## CI Overview
5353+The lexicon schemas for the records published and APIs used by this app are
5454+under the `so.sprk.*` namespace.
11155112112-- Lint workflow runs codegen, then `flutter analyze`.
113113-- Android internal release workflow runs codegen, config setup, then `flutter build appbundle`.
114114-115115-See:
116116-117117-- `.github/workflows/flutter_lint.yml`
118118-- `.github/workflows/android-internal-release.yml`
5656+The API server or "AppView" this app uses can be found in the
5757+[server repo](https://github.com/sprksocial/server), and contains the
5858+`sprk.so.*` lexicon schemas used in this client.
1195912060## Contributing
12161122122-1. Keep changes scoped to the feature you are editing.
123123-2. Run format, codegen (if needed), and analyze before opening a PR.
124124-3. Do not commit secrets (`.env`, signing keys, service credentials).
6262+See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
1256312664## License
12765128128-MIT. See `LICENSE`.
6666+MIT Licensed. See [LICENSE](LICENSE).