Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 495dbb7

Browse files
authored
Merge pull request #77 from flutter-news-app-full-source-code/release/1.1.0
Release/1.1.0
2 parents 90a0204 + 553f6f6 commit 495dbb7

File tree

3 files changed

+85
-103
lines changed

3 files changed

+85
-103
lines changed

‎README.md‎

Lines changed: 41 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -17,92 +17,79 @@ This repository contains the complete, production-ready source code for a high-p
1717

1818
## ⭐ Feature Showcase: Everything You Get, Ready to Go
1919

20-
This API server comes packed with all the backend features you need to launch a professional and scalable news application.
20+
This API is the powerful, secure, and scalable core of the entire news toolkit. Built on a high-performance Dart Frog foundation, it provides a complete backend solution designed for maintainability and rapid development.
2121

22-
Click on any category to explore.
22+
Explore the high-level domains below to see how.
2323

2424
<details>
2525
<summary><strong>🔐 Identity & Access Management</strong></summary>
2626

27-
### 📧 Passwordless & Anonymous Authentication
28-
- **Modern Flows:** Implements secure, passwordless email + code sign-in and allows users to start with anonymous guest accounts.
29-
- **Seamless Account Linking:** Intelligently converts guest users to permanent accounts upon sign-up, migrating all their data (preferences, saved items) automatically.
30-
> **Your Advantage:** You get a modern, frictionless, and secure user onboarding experience that reduces user friction and encourages sign-ups.
27+
### 🛡️ Modern, Secure Authentication
28+
A complete identity system provides a frictionless and secure user journey from the very first interaction.
29+
- **Flexible Onboarding:** Supports modern, passwordless sign-in for registered users and seamless anonymous access for guests, reducing barriers to entry.
30+
- **Intelligent Account Conversion:** Automatically migrates all user data—including preferences and saved content—when a guest user creates a permanent account.
31+
- **Robust Session Control:** Uses industry-standard JWTs for stateless sessions and includes a token blacklisting service to ensure sessions are instantly and securely terminated upon sign-out.
32+
> **Your Advantage:** You get a complete, modern, and secure user management system out of the box, covering the entire user lifecycle from guest to registered user.
3133
3234
---
3335

34-
### 🛡️ Secure Session Management
35-
- **JWT-Powered:** Uses industry-standard JSON Web Tokens (JWTs) for robust and stateless session management.
36-
- **Instant Session Invalidation:** A token blacklisting service ensures that when a user signs out, their session is immediately and securely terminated.
37-
> **Your Advantage:** Deliver a highly secure authentication system that protects user data and gives you full control over sessions.
36+
### 👮 Granular, Role-Based Security
37+
A sophisticated and flexible security model ensures that users and administrators can only access and modify the data they are permitted to.
38+
- **Multi-Layered Access Control:** Defines distinct permission sets for different user classes, such as mobile app consumers and dashboard administrators, ensuring a clear separation of capabilities.
39+
- **Automated Ownership Enforcement:** Built-in middleware automatically verifies data ownership before any modification or deletion request is processed, preventing unauthorized actions.
40+
> **Your Advantage:** Easily enforce complex business rules and security policies. The architecture guarantees data integrity and provides a secure foundation for scaling your user base.
3841
3942
---
4043

41-
### 👮 Granular Role-Based Access Control (RBAC)
42-
- **Permission-Driven:** A flexible RBAC system controls what users can do based on their assigned roles (`AppUserRole`, `DashboardUserRole`).
43-
- **Ownership Verification:** Built-in middleware automatically checks if a user owns a piece of data before allowing them to modify or delete it.
44-
> **Your Advantage:** Easily enforce complex business rules and security policies, ensuring users can only access and manage the data they are supposed to.
45-
46-
---
47-
48-
### 🚦 API Abuse Prevention
49-
- **Smart Rate Limiting:** Protects critical endpoints like `request-code` and the main data API from brute-force attacks, spam, and denial-of-service attempts.
50-
- **IP & User-Based:** Applies rate limits based on IP for anonymous users and by user ID for authenticated users, providing fair and effective protection.
51-
> **Your Advantage:** Your API is shielded from common threats, ensuring high availability and stability for your legitimate users.
44+
### 🚦 Automated API Protection
45+
The API is shielded from common threats with intelligent, built-in abuse prevention mechanisms.
46+
- **Smart Rate Limiting:** Protects critical endpoints from brute-force attacks and denial-of-service attempts by applying fair and effective limits based on IP address for guests and user ID for authenticated users.
47+
> **Your Advantage:** Ensure high availability and stability for your application. This automated defense layer protects your infrastructure and preserves a quality experience for legitimate users.
5248
5349
</details>
5450

5551
<details>
5652
<summary><strong>📦 Dynamic Content & Data API</strong></summary>
5753

58-
### ⚙️ Generic & Extensible Data API
59-
- **Unified Data Gateway:** A single, powerful set of RESTful endpoints (`/api/v1/data`) serves as a central gateway for all data operations. It uses a simple `?model=` query parameter to dynamically handle CRUD requests for any data type in the system—Headlines, Topics, User Preferences, and more.
60-
- **Metadata-Driven Engine:** Instead of hardcoding routes for each data type, the API uses a central registry. This registry defines everything about a model—its permissions, validation rules, and how it connects to the database—in one place.
61-
> **Your Advantage:** This architecture is incredibly clean and scalable. Adding a completely new data type to your application, with its own unique permissions and logic, doesn't require writing new boilerplate API routes. You simply define its metadata in the central registry, and the generic endpoint handles the rest, dramatically speeding up development and reducing code duplication.
54+
### ⚙️ A Radically Efficient Data Engine
55+
Instead of a rigid collection of hardcoded routes, the API is built around a single, unified data gateway. This metadata-driven architecture dramatically accelerates development and enhances scalability.
56+
- **Unified Data Endpoint:** A central engine handles all data operations (CRUD) for every data type in the system—from articles and topics to user preferences and beyond.
57+
- **Metadata-Driven Logic:** To add a completely new data type to your application, you simply define its rules—permissions, validation, and database connections—in a central registry. The engine handles the rest automatically.
58+
> **Your Advantage:** This architecture eliminates boilerplate code and massively speeds up development. You can add new features and data models to your application without writing new API routes, enabling you to innovate and scale at a much faster pace.
6259
6360
---
6461

65-
### 🔍 Advanced Querying & Pagination
66-
- **Rich Filtering:** Supports complex, MongoDB-style filtering directly through the API.
67-
- **Flexible Sorting & Pagination:** Allows for multi-field sorting and efficient cursor-based pagination to handle large datasets.
68-
> **Your Advantage:** Enable powerful, high-performance content discovery features in your client applications (like filtering, sorting, and infinite scrolling) with no extra backend work.
62+
### 🔍 Advanced Querying & Performance
63+
The data API is equipped with powerful querying capabilities, enabling rich, high-performance content discovery features in your client applications.
64+
- **Complex Filtering & Sorting:** Supports deep, multi-parameter filtering and flexible, multi-field sorting directly through the API.
65+
- **High-Performance Pagination:** Utilizes efficient cursor-based pagination to handle massive datasets gracefully, perfect for infinite-scrolling feeds.
66+
> **Your Advantage:** Empower your mobile and web clients with powerful data discovery features right out of the box, without needing to write any extra backend logic.
6967
7068
</details>
7169

7270
<details>
7371
<summary><strong>🏗️ Architecture & Infrastructure</strong></summary>
7472

75-
### 🚀 High-Performance Dart Frog Core
76-
- **Modern & Fast:** Built on Dart Frog, a minimalist and extremely fast backend framework from the creators of Very Good Ventures, ensuring excellent performance and low latency.
77-
> **Your Advantage:** Your backend is built on a solid, modern foundation that is both powerful and easy to work with.
78-
79-
---
80-
81-
### 🧱 Clean, Layered Architecture
82-
- **Separation of Concerns:** Strictly follows a layered architecture (Data Clients, Repositories, Services) that is clean, maintainable, and scalable.
83-
- **Standardized Responses:** Consistent JSON response structures for both success and error scenarios make client-side handling predictable and simple.
84-
> **Your Advantage:** You get a codebase that is easy to understand, modify, and extend, saving you significant development and maintenance time.
85-
86-
---
87-
88-
### 🔌 Robust Dependency Injection
89-
- **Testable & Modular:** A centralized dependency injection system makes the entire application highly modular and easy to test.
90-
- **Swappable Implementations:** Easily swap out core components—like the database (MongoDB), email provider (SendGrid), or storage services—without rewriting your business logic.
91-
> **Your Advantage:** The architecture is not locked into specific services. You have the freedom to adapt and evolve your tech stack as your needs change.
73+
### 🚀 High-Performance by Design
74+
Built on a modern, minimalist foundation to ensure low latency and excellent performance.
75+
- **Dart Frog Core:** Leverages the high-performance Dart Frog framework for a fast, efficient, and scalable backend.
76+
- **Clean, Layered Architecture:** A strict separation of concerns into distinct layers makes the codebase clean, maintainable, and easy to reason about.
77+
> **Your Advantage:** Your backend is built on a solid, modern foundation that is both powerful and a pleasure to work with, reducing maintenance overhead.
9278
9379
---
9480

95-
### ⚙️ Secure Environment Configuration
96-
- **Secure & Flexible:** Manages all sensitive keys, API credentials, and environment-specific settings through a `.env` file, keeping your secrets out of the codebase.
97-
> **Your Advantage:** Deploy your application across different environments (local, staging, production) safely and efficiently.
81+
### 🔌 Extensible & Unlocked
82+
The entire application is designed with a robust dependency injection system, giving you the freedom to choose your own infrastructure.
83+
- **Swappable Implementations:** Easily swap out core components—like the database, email provider, or file storage service—without rewriting business logic.
84+
> **Your Advantage:** Avoid vendor lock-in and future-proof your application. You have the freedom to adapt and evolve your tech stack as your business needs change.
9885
9986
---
10087

101-
### 🔄 Automated Database Migrations
102-
-**PR-Driven Schema Evolution:** Implements a robust, versioned database migration system that automatically applies schema changes to MongoDB on application startup.
103-
- **Idempotent & Generic:** Each migration is idempotent and designed to handle schema evolution for *any* model in the database, ensuring data consistency across deployments.
104-
- **Traceable Versioning:** Migrations are identified by their Pull Request merge date (`prDate` in `YYYYMMDDHHMMSS` format) for chronological execution, a concise `prSummary`, and a direct `prId` (GitHub PR ID) for full traceability.
105-
> **Your Advantage:** Say goodbye to manual database updates! Your application gracefully handles schema changes, providing a professional and reliable mechanism for evolving your data models without breaking existing data, with clear links to the originating code changes.
88+
### 🔄 Automated & Traceable Database Migrations
89+
Say goodbye to risky manual database updates. A professional, versioned migration system ensures your database schema evolves safely and automatically.
90+
- **Code-Driven Schema Evolution:** The system automatically applies schema changes to your database on application startup, ensuring consistency across all environments.
91+
- **Traceable to Source:** Each migration is versioned and directly linked to the pull request that initiated it, providing a clear, auditable history of every change.
92+
> **Your Advantage:** Deploy with confidence. This robust system eliminates an entire class of deployment errors, ensuring your data models evolve gracefully and reliably with full traceability.
10693
10794
</details>
10895

‎pubspec.lock‎

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ packages:
55
dependency: transitive
66
description:
77
name: _fe_analyzer_shared
8-
sha256: dd3d2ad434b9510001d089e8de7556d50c834481b9abc2891a0184a8493a19dc
8+
sha256: c209688d9f5a5f26b2fb47a188131a6fb9e876ae9e47af3737c0b4f58a93470d
99
url: "https://pub.dev"
1010
source: hosted
11-
version: "89.0.0"
11+
version: "91.0.0"
1212
adaptive_number:
1313
dependency: transitive
1414
description:
@@ -21,10 +21,10 @@ packages:
2121
dependency: transitive
2222
description:
2323
name: analyzer
24-
sha256: c22b6e7726d1f9e5db58c7251606076a71ca0dbcf76116675edfadbec0c9e875
24+
sha256: a40a0cee526a7e1f387c6847bd8a5ccbf510a75952ef8a28338e989558072cb0
2525
url: "https://pub.dev"
2626
source: hosted
27-
version: "8.2.0"
27+
version: "8.4.0"
2828
archive:
2929
dependency: transitive
3030
description:
@@ -117,11 +117,11 @@ packages:
117117
dependency: "direct main"
118118
description:
119119
path: "."
120-
ref: "v1.3.0"
121-
resolved-ref: ee2ad7de28baec04d64c0afd3e3a61d7e4ad6cb0
120+
ref: "v1.3.1"
121+
resolved-ref: a03efff11b7577974cb444a1a6a46fee8b05ea42
122122
url: "https://github.com/flutter-news-app-full-source-code/core.git"
123123
source: git
124-
version: "1.3.0"
124+
version: "1.3.1"
125125
coverage:
126126
dependency: transitive
127127
description:
@@ -142,45 +142,45 @@ packages:
142142
dependency: "direct main"
143143
description:
144144
name: dart_frog
145-
sha256: "84b8f82413f622dfdcfba6982522f8752ece09b49fea9a35f8794a0b2bc357e4"
145+
sha256: "0fc909d10ae79dd069e6a3a4769aeaa9839c93b7f6f1e71cfd37b276410875e7"
146146
url: "https://pub.dev"
147147
source: hosted
148-
version: "1.2.3"
148+
version: "1.2.4"
149149
dart_jsonwebtoken:
150150
dependency: "direct main"
151151
description:
152152
name: dart_jsonwebtoken
153-
sha256: "21ce9f8a8712f741e8d6876a9c82c0f8a257fe928c4378a91d8527b92a3fd413"
153+
sha256: "0de65691c1d736e9459f22f654ddd6fd8368a271d4e41aa07e53e6301eff5075"
154154
url: "https://pub.dev"
155155
source: hosted
156-
version: "3.2.0"
156+
version: "3.3.1"
157157
data_client:
158158
dependency: "direct main"
159159
description:
160160
path: "."
161-
ref: "v1.0.0"
162-
resolved-ref: b9a8a8c2c660928c22f2d38d657000bcae4c74d6
161+
ref: "v1.0.1"
162+
resolved-ref: "61e693e22e05c279a41304c98d68d96424b96df6"
163163
url: "https://github.com/flutter-news-app-full-source-code/data-client.git"
164164
source: git
165-
version: "0.0.0"
165+
version: "1.0.1"
166166
data_mongodb:
167167
dependency: "direct main"
168168
description:
169169
path: "."
170-
ref: "v1.0.0"
171-
resolved-ref: f55b686acdbc0af9c617df4833733a07f9208b57
170+
ref: "v1.0.1"
171+
resolved-ref: a353f46f48019b0fc8e9180cf4061623adcd2b99
172172
url: "https://github.com/flutter-news-app-full-source-code/data-mongodb.git"
173173
source: git
174-
version: "0.0.0"
174+
version: "1.0.1"
175175
data_repository:
176176
dependency: "direct main"
177177
description:
178178
path: "."
179-
ref: "v1.0.0"
180-
resolved-ref: "7f9242d810d60fefd2f883b19e1650e8e4eb41a3"
179+
ref: "v1.0.1"
180+
resolved-ref: "3e9115fc5229a6e84b81f44b74bc7df47824a00e"
181181
url: "https://github.com/flutter-news-app-full-source-code/data-repository.git"
182182
source: git
183-
version: "0.0.0"
183+
version: "1.0.1"
184184
decimal:
185185
dependency: transitive
186186
description:
@@ -225,29 +225,29 @@ packages:
225225
dependency: "direct main"
226226
description:
227227
path: "."
228-
ref: "v1.0.0"
229-
resolved-ref: "31faf0e429aeea519204dfdd26afdba36ea1d8dc"
228+
ref: "v1.0.1"
229+
resolved-ref: "2e4b468c96e60e7f899ec28c02389c5ce0b578fa"
230230
url: "https://github.com/flutter-news-app-full-source-code/email-client.git"
231231
source: git
232-
version: "0.0.0"
232+
version: "1.0.1"
233233
email_repository:
234234
dependency: "direct main"
235235
description:
236236
path: "."
237-
ref: "v1.0.0"
238-
resolved-ref: "2be152f3c48acd35d0a79a01d7258a4e8e8ab399"
237+
ref: "v1.0.1"
238+
resolved-ref: e0a04e22bce1e891e6c3b35f83a30c3a8800b044
239239
url: "https://github.com/flutter-news-app-full-source-code/email-repository.git"
240240
source: git
241-
version: "0.0.0"
241+
version: "1.0.1"
242242
email_sendgrid:
243243
dependency: "direct main"
244244
description:
245245
path: "."
246-
ref: "v1.0.0"
247-
resolved-ref: f28572a0c0598348391df7701a205249f2454031
246+
ref: "v1.0.1"
247+
resolved-ref: "9eb355fe901823cf9062472a545efc5302ba9168"
248248
url: "https://github.com/flutter-news-app-full-source-code/email-sendgrid.git"
249249
source: git
250-
version: "0.0.0"
250+
version: "1.0.1"
251251
equatable:
252252
dependency: transitive
253253
description:
@@ -317,10 +317,10 @@ packages:
317317
description:
318318
path: "."
319319
ref: "v1.0.1"
320-
resolved-ref: ce550196f78ee2e95aa9e985759179265983689d
320+
resolved-ref: "22a1531a279769ec472f698e9c727cd2c29a81b9"
321321
url: "https://github.com/flutter-news-app-full-source-code/http-client.git"
322322
source: git
323-
version: "0.0.0"
323+
version: "1.0.1"
324324
http_methods:
325325
dependency: transitive
326326
description:
@@ -549,10 +549,10 @@ packages:
549549
dependency: transitive
550550
description:
551551
name: shelf_hotreload
552-
sha256: d7099618b18d3c63ba5272491c1812c306629495129ef9996115f0417902f963
552+
sha256: "449f68ce2d087a030c2bfbb40e6925c63fac3dcb502a67388a7139ce72102e7a"
553553
url: "https://pub.dev"
554554
source: hosted
555-
version: "1.5.0"
555+
version: "1.6.0"
556556
shelf_packages_handler:
557557
dependency: transitive
558558
description:
@@ -685,10 +685,10 @@ packages:
685685
dependency: transitive
686686
description:
687687
name: unorm_dart
688-
sha256: "8e3870a1caa60bde8352f9597dd3535d8068613269444f8e35ea8925ec84c1f5"
688+
sha256: "0c69186b03ca6addab0774bcc0f4f17b88d4ce78d9d4d8f0619e30a99ead58e7"
689689
url: "https://pub.dev"
690690
source: hosted
691-
version: "0.3.1+1"
691+
version: "0.3.2"
692692
uuid:
693693
dependency: transitive
694694
description:
@@ -725,10 +725,10 @@ packages:
725725
dependency: transitive
726726
description:
727727
name: watcher
728-
sha256: "5bf046f41320ac97a469d506261797f35254fa61c641741ef32dacda98b7d39c"
728+
sha256: "592ab6e2892f67760543fb712ff0177f4ec76c031f02f5b4ff8d3fc5eb9fb61a"
729729
url: "https://pub.dev"
730730
source: hosted
731-
version: "1.1.3"
731+
version: "1.1.4"
732732
web:
733733
dependency: transitive
734734
description:

‎pubspec.yaml‎

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,34 @@ dependencies:
1212
core:
1313
git:
1414
url: https://github.com/flutter-news-app-full-source-code/core.git
15-
ref: v1.3.0
15+
ref: v1.3.1
1616
dart_frog: ^1.1.0
1717
dart_jsonwebtoken: ^3.2.0
1818
data_client:
1919
git:
2020
url: https://github.com/flutter-news-app-full-source-code/data-client.git
21-
ref: v1.0.0
21+
ref: v1.0.1
2222
data_mongodb:
2323
git:
2424
url: https://github.com/flutter-news-app-full-source-code/data-mongodb.git
25-
ref: v1.0.0
25+
ref: v1.0.1
2626
data_repository:
2727
git:
2828
url: https://github.com/flutter-news-app-full-source-code/data-repository.git
29-
ref: v1.0.0
29+
ref: v1.0.1
3030
dotenv: ^4.2.0
3131
email_client:
3232
git:
3333
url: https://github.com/flutter-news-app-full-source-code/email-client.git
34-
ref: v1.0.0
34+
ref: v1.0.1
3535
email_repository:
3636
git:
3737
url: https://github.com/flutter-news-app-full-source-code/email-repository.git
38-
ref: v1.0.0
38+
ref: v1.0.1
3939
email_sendgrid:
4040
git:
4141
url: https://github.com/flutter-news-app-full-source-code/email-sendgrid.git
42-
ref: v1.0.0
42+
ref: v1.0.1
4343
http_client:
4444
git:
4545
url: https://github.com/flutter-news-app-full-source-code/http-client.git
@@ -55,8 +55,3 @@ dev_dependencies:
5555
test: ^1.25.5
5656
very_good_analysis: ^9.0.0
5757

58-
dependency_overrides:
59-
core:
60-
git:
61-
url: https://github.com/flutter-news-app-full-source-code/core.git
62-
ref: v1.3.0

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /