Skip to content
Merged
Show file tree
Hide file tree
Changes from 83 commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
dffb020
feat(core): add EngagementMode enum
fulleni Nov 29, 2025
a4e1722
feat(core): add CommentStatus enum
fulleni Nov 29, 2025
602c8eb
feat(core): add ReactionType enum
fulleni Nov 29, 2025
9224645
feat(core): add ReportableEntity enum
fulleni Nov 29, 2025
18d4656
feat(core): add ReportStatus enum
fulleni Nov 29, 2025
b86e3b1
feat(core): add HeadlineReportReason enum
fulleni Nov 29, 2025
9fb3891
feat(core): add SourceReportReason enum
fulleni Nov 29, 2025
ed09db4
feat(core): add CommentReportReason enum
fulleni Nov 29, 2025
a713143
feat(core): add Comment model
fulleni Nov 29, 2025
cca5699
feat(core): add HeadlineReaction model
fulleni Nov 29, 2025
1e46762
feat(core): add Report model
fulleni Nov 29, 2025
85e0f51
feat(core): add EngagementConfig model
fulleni Nov 29, 2025
6969934
feat(core): add ReportingConfig model
fulleni Nov 29, 2025
dcec3f9
feat(core): add ReviewFunnelConfig model
fulleni Nov 29, 2025
782cb2d
feat(core): integrate UGC configs into FeaturesConfig
fulleni Nov 29, 2025
0b998b1
feat(core): extend UserLimitsConfig with UGC limits
fulleni Nov 29, 2025
d997c41
chore: barrels
fulleni Nov 29, 2025
2273e7c
chore: barrels
fulleni Nov 29, 2025
f35f934
build(serialization): generate
fulleni Nov 29, 2025
9f3cdd2
refactor(models): rename ReviewFunnelConfig to AppReviewConfig
fulleni Nov 29, 2025
08066dd
refactor(config): introduce CommunityConfig and deprecate related models
fulleni Nov 29, 2025
543269d
docs(app_review_config): update model documentation for two-layer app…
fulleni Nov 29, 2025
049a735
docs(README): add community and engagement system description
fulleni Nov 29, 2025
991fb8d
feat(community): implement comprehensive Community & Engagement System
fulleni Nov 29, 2025
4a3a6f5
docs(CHANGELOG): update changelog for upcoming release
fulleni Nov 29, 2025
d54269c
build(serialization): sync
fulleni Nov 29, 2025
cae7c39
refactor(models): reorganize feed-related models and imports
fulleni Nov 29, 2025
2d5be91
fix(remote-config): add missing community config values for standard …
fulleni Nov 29, 2025
35413f5
test(core): add EngagementMode enum tests
fulleni Nov 29, 2025
ccb8a0b
test(core): add CommentStatus enum tests
fulleni Nov 29, 2025
380fdcb
test(core): add ReactionType enum tests
fulleni Nov 29, 2025
707c232
test(core): add ReportableEntity enum tests
fulleni Nov 29, 2025
871452f
test(core): add unit tests for ReportStatus enum
fulleni Nov 29, 2025
38a08af
test: add HeadlineReportReason enum tests
fulleni Nov 29, 2025
cb8affa
test(core): add SourceReportReason enum tests
fulleni Nov 29, 2025
4fbf35d
test(core): add CommentReportReason enum tests
fulleni Nov 29, 2025
d1deea9
test(core): add Comment model tests
fulleni Nov 29, 2025
3de2a81
test(headline_reaction): add tests for HeadlineReaction model
fulleni Nov 29, 2025
b5b8854
test(core): add report model test cases
fulleni Nov 29, 2025
a9e4db5
test(core): add EngagementConfig model tests
fulleni Nov 29, 2025
d8b26c6
test(core): add ReportingConfig model tests
fulleni Nov 29, 2025
832c3ae
test(core): add AppReviewConfig model tests
fulleni Nov 29, 2025
fe2ae6e
test(config): add community feature flag to FeaturesConfig fixture
fulleni Nov 29, 2025
0016a3c
test(config): update UserLimitsConfig test to include new fields
fulleni Nov 29, 2025
7d36b9c
feat(remote_configs): add role-based reactionsPerDay limits
fulleni Nov 29, 2025
2f5d2ef
test: restructure test files to reflect models package changes
fulleni Nov 29, 2025
fbd41ae
build(serialization): sync
fulleni Nov 29, 2025
4bfe510
style: format
fulleni Nov 29, 2025
722dc3d
chore: update fixtures ids
fulleni Nov 29, 2025
3e66b0e
fix(lib): add comment fixtures for testing and development
fulleni Nov 29, 2025
6f9597b
fix(lib): add reactions fixtures for testing and development
fulleni Nov 29, 2025
38d61d8
fix(lib): add reports fixtures for testing and development
fulleni Nov 29, 2025
cf08a8f
style: format
fulleni Nov 29, 2025
0fb9a1c
feat(enums): add EngageableType enum
fulleni Nov 29, 2025
896f77c
chore: delete absolete file
fulleni Nov 29, 2025
df87f08
refactor(comment): update model for broader engageable content types
fulleni Nov 29, 2025
34ee823
feat(user-generated-content): add Reaction model
fulleni Nov 29, 2025
7355a64
feat(user_generated_content): add Engagement model
fulleni Nov 29, 2025
ee2555c
chore: delete bsolete files
fulleni Nov 30, 2025
97cbdab
refactor(fixtures): update reaction fixtures for generic use
fulleni Nov 30, 2025
245e982
test: update headline reactions fixture to use getHeadlinesFixturesData
fulleni Nov 30, 2025
a64abf8
test: update headline reactions fixture to use getHeadlinesFixturesData
fulleni Nov 30, 2025
eb87e08
fix(core): add engagement fixtures for testing and demo purposes
fulleni Nov 30, 2025
be00b38
refactor: enance headlines fixtures generation
fulleni Nov 30, 2025
90d1e4e
refactor fixtures: make saved headline filters multilingual
fulleni Nov 30, 2025
49e4ec7
refactor(fixtures): enhance saved source filters fixture for internat…
fulleni Nov 30, 2025
2d88372
refactor: make sources fixtures multilingual
fulleni Nov 30, 2025
96e96ff
refactor: make topics fixtures multilingual
fulleni Nov 30, 2025
93d00c6
fix(core): update reports fixture to use proper getter functions
fulleni Nov 30, 2025
865bbb7
feat(comment): add language field and update copyWith method
fulleni Nov 30, 2025
d2f1581
chore: barrels
fulleni Nov 30, 2025
0254469
fix(in-app-notifications): update headline fixtures data retrieval
fulleni Nov 30, 2025
a4f5343
refactor: refactor in app notification ficture into language configur…
fulleni Nov 30, 2025
73d18f7
test(core): add EngageableType enum tests
fulleni Nov 30, 2025
ddd5547
test(core): add Comment model tests
fulleni Nov 30, 2025
0d1e7bd
test(user_generated_content): add Engagement model tests
fulleni Nov 30, 2025
4bdd92e
test(user_generated_content): add Reaction model tests
fulleni Nov 30, 2025
b21b8e9
test(models): add report model tests
fulleni Nov 30, 2025
588c36f
fix: sync tests with fixture namings update
fulleni Nov 30, 2025
d98acec
build(serialization): sync with file updates
fulleni Nov 30, 2025
4503379
style: format
fulleni Nov 30, 2025
73d2cc0
refactor(engagement_config): remove unused AI moderation feature
fulleni Nov 30, 2025
cefd203
docs(CHANGELOG): update feature description for Community & Engagemen…
fulleni Nov 30, 2025
a1c2b4f
chore: fixtures update
fulleni Nov 30, 2025
6cebaef
fix(report): handle explicit null values for additional comments
fulleni Nov 30, 2025
1854468
test(comment): update tests to use dynamic date and language code
fulleni Nov 30, 2025
7c2f6b4
test(user_generated_content): update engagement tests with configurab…
fulleni Nov 30, 2025
d072351
test(models): update Report model tests to use fixtures and add test …
fulleni Nov 30, 2025
c308fe9
style: format
fulleni Nov 30, 2025
728fe1a
refactor: remove predefined engagementsFixturesData list
fulleni Nov 30, 2025
d716f05
refactor(fixture): update models and improve engagements fixture
fulleni Nov 30, 2025
8f42833
refactor(report): rename `ReportableEntity.comment` to `ReportableEnt…
fulleni Nov 30, 2025
754d1e5
style: format
fulleni Nov 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Upcoming

- **feat**: Added a comprehensive **Community & Engagement System**. This major feature introduces the foundational data models, fixtures and tests for user reactions, comments, a multi-entity reporting system, and a smart app review funnel. The entire system is remotely configurable via a new unified `CommunityConfig` model and extends `UserLimitsConfig` to support role-based limits for comments and reports.
- **BREAKING** refactor!: Overhauled data models and configuration to align with the new identity pivot toward news aggregator. This major refactor introduces a more scalable remote configuration structure, standardizes enums and models for broader use (e.g., `FeedItem` settings), and simplifies ad, notification, and headline data structures for improved clarity and maintainability.
- **feat**: Introduce data models to support a filter-based push notification system. This includes `SavedHeadlineFilter`, `SavedSourceFilter`, and related configuration models, providing the architectural foundation for clients to implement notification subscriptions.
- **BREAKING** refactor!: Rework `UserPreferenceConfig` to support the new notification system with a more scalable, role-based map structure for all user limits.
- **test**: Add comprehensive unit tests for all new and refactored models.
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,27 @@ Provides data structures for persisting all user-specific configurations, from a

</details>

<details>
<summary><strong>💬 Community & Engagement System</strong></summary>

---

### 💬 Reactions, Comments & Reporting

Provides a complete suite of models for building a rich community interaction layer. This includes individualized reactions, a robust commenting system with a built-in moderation workflow, and a flexible reporting system for headlines, sources, and comments.

> **Your Advantage:** Foster a vibrant and safe user community, maintain high content quality through effective moderation, and gather direct user feedback on your content.

---

### ⭐ Smart App Review Funnel

Implements the data structures for a strategic, two-layer review funnel. This system intelligently prompts engaged users for public reviews while channeling critical feedback from dissatisfied users into private channels.

> **Your Advantage:** Maximize positive app store ratings and improve your app's reputation by proactively managing user feedback and preventing negative public reviews.

</details>

<details>
<summary><strong>🔔 Notification & Alerting System</strong></summary>

Expand Down
19 changes: 19 additions & 0 deletions lib/src/enums/comment_report_reason.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import 'package:json_annotation/json_annotation.dart';

/// {@template comment_report_reason}
/// Defines the specific reasons a user can provide for reporting a comment.
/// {@endtemplate}
@JsonEnum()
enum CommentReportReason {
/// The comment is unsolicited advertising or promotion.
@JsonValue('spamOrAdvertising')
spamOrAdvertising,

/// The comment contains abusive language, personal attacks, or bullying.
@JsonValue('harassmentOrBullying')
harassmentOrBullying,

/// The comment targets certain groups with hateful language.
@JsonValue('hateSpeech')
hateSpeech,
}
27 changes: 27 additions & 0 deletions lib/src/enums/comment_status.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import 'package:json_annotation/json_annotation.dart';

/// {@template comment_status}
/// Defines the lifecycle status of a user-submitted comment.
/// {@endtemplate}
@JsonEnum()
enum CommentStatus {
/// The comment has been submitted and is awaiting moderation.
@JsonValue('pendingReview')
pendingReview,

/// The comment has been approved by a moderator and is publicly visible.
@JsonValue('approved')
approved,

/// The comment has been rejected by a moderator and is not visible.
@JsonValue('rejected')
rejected,

/// The comment has been automatically flagged by an AI moderation service.
@JsonValue('flaggedByAI')
flaggedByAI,

/// The comment has been hidden by the user who posted it.
@JsonValue('hiddenByUser')
hiddenByUser,
}
12 changes: 12 additions & 0 deletions lib/src/enums/engageable_type.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'package:json_annotation/json_annotation.dart';

/// {@template engageable_type}
/// Defines the types of entities that can be engaged with (reacted to or
/// commented on).
/// {@endtemplate}
@JsonEnum()
enum EngageableType {
/// The engagement is for a news headline.
@JsonValue('headline')
headline,
}
15 changes: 15 additions & 0 deletions lib/src/enums/engagement_mode.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import 'package:json_annotation/json_annotation.dart';

/// {@template engagement_mode}
/// Defines the engagement features available to users.
/// {@endtemplate}
@JsonEnum()
enum EngagementMode {
/// Users can only react to headlines.
@JsonValue('reactionsOnly')
reactionsOnly,

/// Users can both react and comment on headlines.
@JsonValue('reactionsAndComments')
reactionsAndComments,
}
9 changes: 9 additions & 0 deletions lib/src/enums/enums.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,25 @@ export 'app_font_weight.dart';
export 'app_text_scale_factor.dart';
export 'app_user_role.dart';
export 'banner_ad_shape.dart';
export 'comment_report_reason.dart';
export 'comment_status.dart';
export 'content_status.dart';
export 'content_type.dart';
export 'dashboard_user_role.dart';
export 'device_platform.dart';
export 'engageable_type.dart';
export 'engagement_mode.dart';
export 'feed_decorator_category.dart';
export 'feed_decorator_type.dart';
export 'feed_item_click_behavior.dart';
export 'feed_item_density.dart';
export 'feed_item_image_style.dart';
export 'headline_report_reason.dart';
export 'push_notification_provider.dart';
export 'push_notification_subscription_delivery_type.dart';
export 'reaction_type.dart';
export 'report_status.dart';
export 'reportable_entity.dart';
export 'sort_order.dart';
export 'source_report_reason.dart';
export 'source_type.dart';
32 changes: 32 additions & 0 deletions lib/src/enums/headline_report_reason.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import 'package:json_annotation/json_annotation.dart';

/// {@template headline_report_reason}
/// Defines the specific reasons a user can provide for reporting a headline.
/// {@endtemplate}
@JsonEnum()
enum HeadlineReportReason {
/// The content is factually incorrect or considered fake news.
@JsonValue('misinformationOrFakeNews')
misinformationOrFakeNews,

/// The headline is clickbait or does not reflect the article's content.
@JsonValue('clickbaitTitle')
clickbaitTitle,

/// The content contains hate speech, graphic violence, or other inappropriate
/// material.
@JsonValue('offensiveOrHateSpeech')
offensiveOrHateSpeech,

/// The link leads to advertising, phishing, or fraudulent content.
@JsonValue('spamOrScam')
spamOrScam,

/// The article URL does not work.
@JsonValue('brokenLink')
brokenLink,

/// The content requires a subscription that was not disclosed.
@JsonValue('paywalled')
paywalled,
}
38 changes: 38 additions & 0 deletions lib/src/enums/reaction_type.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import 'package:json_annotation/json_annotation.dart';

/// {@template reaction_type}
/// Defines the types of reactions a user can have to a headline.
/// {@endtemplate}
@JsonEnum()
enum ReactionType {
/// Represents a "like" or "thumbs up" reaction.
/// General positive approval.
@JsonValue('like')
like,

/// Represents an "insightful" or "lightbulb" reaction.
/// Signals the article provided new information or a valuable perspective.
@JsonValue('insightful')
insightful,

/// Represents an "amusing" or "funny" reaction.
/// For lighthearted or humorous content.
@JsonValue('amusing')
amusing,

/// Represents a "sad" reaction.
/// For news that evokes empathy or sadness.
@JsonValue('sad')
sad,

/// Represents an "angry" or "outrageous" reaction.
/// For news that provokes a strong negative emotional response.
@JsonValue('angry')
angry,

/// Represents a "skeptical" or "questionable" reaction.
/// Signals that the user questions the validity, bias, or sourcing of the
/// article without formally reporting it.
@JsonValue('skeptical')
skeptical,
}
19 changes: 19 additions & 0 deletions lib/src/enums/report_status.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import 'package:json_annotation/json_annotation.dart';

/// {@template report_status}
/// Defines the moderation workflow status for a user-submitted report.
/// {@endtemplate}
@JsonEnum()
enum ReportStatus {
/// The report has been submitted by a user and is awaiting review.
@JsonValue('submitted')
submitted,

/// A moderator is actively reviewing the report.
@JsonValue('inReview')
inReview,

/// The report has been reviewed and a decision has been made.
@JsonValue('resolved')
resolved,
}
22 changes: 22 additions & 0 deletions lib/src/enums/reportable_entity.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import 'package:json_annotation/json_annotation.dart';

/// {@template reportable_entity}
/// Defines the types of entities that can be reported by users.
///
/// This enum acts as a discriminator in the `Report` model to identify
/// what kind of content the report refers to.
/// {@endtemplate}
@JsonEnum()
enum ReportableEntity {
/// The report is for a news headline.
@JsonValue('headline')
headline,

/// The report is for a news source.
@JsonValue('source')
source,

/// The report is for a user-submitted comment.
@JsonValue('comment')
comment,
}
30 changes: 30 additions & 0 deletions lib/src/enums/source_report_reason.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import 'package:json_annotation/json_annotation.dart';

/// {@template source_report_reason}
/// Defines the specific reasons a user can provide for reporting a news source.
///
/// These reasons are designed to be actionable and can provide data to
/// influence other systems, like an automated content scraper's scoring.
/// {@endtemplate}
@JsonEnum()
enum SourceReportReason {
/// The source consistently produces poor, biased, or unreliable content.
@JsonValue('lowQualityJournalism')
lowQualityJournalism,

/// The source's website is unusable due to excessive ads or popups.
@JsonValue('highAdDensity')
highAdDensity,

/// The source often requires a subscription to view content.
@JsonValue('frequentPaywalls')
frequentPaywalls,

/// The source is pretending to be another entity.
@JsonValue('impersonation')
impersonation,

/// The source has a pattern of publishing fake news or misinformation.
@JsonValue('spreadsMisinformation')
spreadsMisinformation,
}
Loading
Loading