Initial commit: Tagesbyte prototype
Flutter app that collects daily tech news from German and English RSS/Atom feeds, with a reader view, AI article summaries and daily briefings (Claude API or n8n webhook), paywall/sponsored filtering and ad/consent blocking. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
f12fb1dabb
159 files changed
+8738
No files matched your search
@@ -0,0 +1,81 @@
|
||||
/// An AI generated digest of the day's news, grouped into topics.
|
||||
class DailyBriefing {
|
||||
const DailyBriefing({
|
||||
required this.createdAt,
|
||||
required this.intro,
|
||||
required this.topics,
|
||||
required this.generatedBy,
|
||||
});
|
||||
|
||||
final DateTime createdAt;
|
||||
final String intro;
|
||||
final List<BriefingTopic> topics;
|
||||
|
||||
/// Human readable name of the summarizer, e.g. "Claude (claude-opus-5-5)".
|
||||
final String generatedBy;
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'createdAt': createdAt.toIso8601String(),
|
||||
'intro': intro,
|
||||
'generatedBy': generatedBy,
|
||||
'topics': topics.map((t) => t.toJson()).toList(),
|
||||
};
|
||||
|
||||
factory DailyBriefing.fromJson(Map<String, dynamic> json) => DailyBriefing(
|
||||
createdAt: DateTime.parse(json['createdAt'] as String),
|
||||
intro: json['intro'] as String? ?? '',
|
||||
generatedBy: json['generatedBy'] as String? ?? '',
|
||||
topics: (json['topics'] as List? ?? [])
|
||||
.map((t) => BriefingTopic.fromJson(t as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
|
||||
class BriefingTopic {
|
||||
const BriefingTopic({
|
||||
required this.title,
|
||||
required this.summary,
|
||||
required this.sources,
|
||||
});
|
||||
|
||||
final String title;
|
||||
final String summary;
|
||||
final List<ArticleRef> sources;
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'title': title,
|
||||
'summary': summary,
|
||||
'sources': sources.map((s) => s.toJson()).toList(),
|
||||
};
|
||||
|
||||
factory BriefingTopic.fromJson(Map<String, dynamic> json) => BriefingTopic(
|
||||
title: json['title'] as String? ?? '',
|
||||
summary: json['summary'] as String? ?? '',
|
||||
sources: (json['sources'] as List? ?? [])
|
||||
.map((s) => ArticleRef.fromJson(s as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
|
||||
/// A lightweight pointer to an article, stored with the briefing so links
|
||||
/// still work after the feed has been refreshed.
|
||||
class ArticleRef {
|
||||
const ArticleRef({
|
||||
required this.title,
|
||||
required this.url,
|
||||
required this.sourceName,
|
||||
});
|
||||
|
||||
final String title;
|
||||
final String url;
|
||||
final String sourceName;
|
||||
|
||||
Map<String, dynamic> toJson() =>
|
||||
{'title': title, 'url': url, 'sourceName': sourceName};
|
||||
|
||||
factory ArticleRef.fromJson(Map<String, dynamic> json) => ArticleRef(
|
||||
title: json['title'] as String? ?? '',
|
||||
url: json['url'] as String? ?? '',
|
||||
sourceName: json['sourceName'] as String? ?? '',
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user