Skip to content

Commit 75b11b2

Browse files
committed
docs(README): enhance content and structure for better readability and feature highlighting
- Add div alignment for logo consistency - Introduce Dart Frog framework mention in the project description - Restructure feature sections with details dropdowns for better organization - Refine language and add emphasis to key features and advantages - Reorganize architecture section to highlight Dart Frog usage - Adjust license and getting started sections for clarity
1 parent ee00d12 commit 75b11b2

File tree

1 file changed

+82
-57
lines changed

1 file changed

+82
-57
lines changed

README.md

Lines changed: 82 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,116 @@
11
<div align="center">
2-
<img src="https://avatars.githubusercontent.com/u/202675624?s=400&u=2daf23e8872a3b666bcd4f792a21fe2633097e79&v=4" alt="Flutter News App Toolkit Logo" width="220">
3-
4-
# Flutter News App API Server Full Source Code
2+
<img src="https://avatars.githubusercontent.com/u/202675624?s=400&u=2daf23e8872a3b666bcd4f792a21fe2633097e79&v=4" alt="Flutter News App Toolkit Logo" width="220">
3+
<h1>Flutter News App API Server</h1>
4+
<p><strong>Complete, production-ready source code for a Flutter news app api server.</strong></p>
5+
</div>
56

6-
<p>
7+
<p align="center">
78
<img src="https://img.shields.io/badge/coverage-0%25-green?style=for-the-badge" alt="coverage: 0%">
89
<a href="https://flutter-news-app-full-source-code.github.io/docs/api-server/local-setup/"><img src="https://img.shields.io/badge/DOCUMENTATION-READ-slategray?style=for-the-badge" alt="Documentation: Read"></a>
910
<a href="LICENSE"><img src="https://img.shields.io/badge/TRIAL_LICENSE-VIEW_TERMS-blue?style=for-the-badge" alt="Trial License: View Terms"></a>
1011
<a href="https://github.com/sponsors/flutter-news-app-full-source-code"><img src="https://img.shields.io/badge/LIFETIME_LICENSE-PURCHASE-purple?style=for-the-badge" alt="Lifetime License: Purchase"></a>
1112
</p>
12-
</div>
1313

14-
This repository contains the complete, production-ready source code for the backend API server that powers the entire Flutter News App ecosystem. Built with the high-performance Dart Frog framework, it gives you all the server-side features you need, right out of the box. It is the core component of the [**Flutter News App - Full Source Code Toolkit**](https://github.com/flutter-news-app-full-source-code), serving the Flutter [mobile app](https://github.com/flutter-news-app-full-source-code/flutter-news-app-mobile-client-full-source-code) and the web-based [content dashboard](https://github.com/flutter-news-app-full-source-code/flutter-news-app-web-dashboard-full-source-code).
14+
This repository contains the complete, production-ready source code for a robust Flutter news app api server that powers the entire Flutter News App toolkit. Built with the high-performance **Dart Frog** framework, it gives you all the server-side features you need, right out of the box. It is the core component of the [**Flutter News App Full Source Code Toolkit**](https://github.com/flutter-news-app-full-source-code), serving the Flutter [mobile app](https://github.com/flutter-news-app-full-source-code/flutter-news-app-mobile-client-full-source-code) and the web-based [content dashboard](https://github.com/flutter-news-app-full-source-code/flutter-news-app-web-dashboard-full-source-code).
15+
16+
## ⭐ Feature Showcase: Everything You Get, Ready to Go
17+
18+
This API server comes packed with all the backend features you need to launch a professional and scalable news application.
19+
20+
Click on any category to explore.
21+
22+
<details>
23+
<summary><strong>🔐 Identity & Access Management</strong></summary>
1524

16-
## ⭐ Everything You Get, Ready to Go
25+
### 📧 Passwordless & Anonymous Authentication
26+
- **Modern Flows:** Implements secure, passwordless email + code sign-in and allows users to start with anonymous guest accounts.
27+
- **Seamless Account Linking:** Intelligently converts guest users to permanent accounts upon sign-up, migrating all their data (preferences, saved items) automatically.
28+
> **Your Advantage:** You get a modern, frictionless, and secure user onboarding experience that reduces user friction and encourages sign-ups.
1729
18-
This API server comes packed with all the features you need to launch a professional, scalable news application.
30+
---
1931

20-
#### 🔐 **Robust & Flexible Authentication**
21-
* Provides secure, modern authentication flows, including passwordless email sign-in and anonymous guest accounts.
22-
* Intelligently handles converting guest users to permanent accounts, preserving all their settings and saved content.
23-
* Includes a separate, role-aware login flow for privileged dashboard users.
24-
> **Your Advantage:** You get a complete, secure authentication system without the complexity. All the user management logic is done for you. ✅
32+
### 🛡️ Secure Session Management
33+
- **JWT-Powered:** Uses industry-standard JSON Web Tokens (JWTs) for robust and stateless session management.
34+
- **Instant Session Invalidation:** A token blacklisting service ensures that when a user signs out, their session is immediately and securely terminated.
35+
> **Your Advantage:** Deliver a highly secure authentication system that protects user data and gives you full control over sessions.
2536
26-
#### ⚡️ **Granular Role-Based Access Control (RBAC)**
27-
* Implement precise permissions with a dual-role system: `appRole` for mobile app features and `dashboardRole` for admin functions.
28-
* Securely control access to API features and data management capabilities based on user roles.
29-
> **Your Advantage:** A powerful, built-in security model that protects your data and ensures users only access what they're supposed to. 🛡️
37+
---
3038

31-
#### 🛡️ **Built-in API Rate Limiting**
32-
* Protects critical endpoints like email verification and data access from abuse and denial-of-service attacks.
33-
* Features configurable, user-aware limits that distinguish between guests and authenticated users.
34-
* Includes a bypass for trusted roles (admin, publisher) to ensure dashboard functionality is never impeded.
35-
> **Your Advantage:** Your API is protected from day one against common abuse vectors, ensuring stability and preventing costly overages on services like email providers. ✅
39+
### 👮 Granular Role-Based Access Control (RBAC)
40+
- **Permission-Driven:** A flexible RBAC system controls what users can do based on their assigned roles (`AppUserRole`, `DashboardUserRole`).
41+
- **Ownership Verification:** Built-in middleware automatically checks if a user owns a piece of data before allowing them to modify or delete it.
42+
> **Your Advantage:** Easily enforce complex business rules and security policies, ensuring users can only access and manage the data they are supposed to.
3643
37-
#### ⚙️ **Centralized App & User Settings**
38-
* Effortlessly sync user-specific settings like theme, language, and font styles across devices.
39-
* Manage personalized content preferences, including saved headlines and followed topics/sources.
40-
> **Your Advantage:** Deliver a seamless, personalized experience that keeps users' settings in sync, boosting engagement and retention. ❤️
44+
---
4145

42-
#### 💾 **Robust Data Management API**
43-
* Securely manage all your core news data, including headlines, topics, sources, and countries.
44-
* The API supports flexible querying, filtering, and sorting, allowing your app to display dynamic content feeds.
45-
> **Your Advantage:** A powerful and secure data backend that's ready to scale with your content needs. 📈
46+
### 🚦 API Abuse Prevention
47+
- **Smart Rate Limiting:** Protects critical endpoints like `request-code` and the main data API from brute-force attacks, spam, and denial-of-service attempts.
48+
- **IP & User-Based:** Applies rate limits based on IP for anonymous users and by user ID for authenticated users, providing fair and effective protection.
49+
> **Your Advantage:** Your API is shielded from common threats, ensuring high availability and stability for your legitimate users.
4650
47-
#### 🌐 **Dynamic Remote Configuration**
48-
* Centrally manage your app's behavior without shipping an update.
49-
* Control ad frequency, feature flags, force-update prompts, and maintenance status directly from the server.
50-
> **Your Advantage:** Adapt your app on the fly, run experiments, and respond to issues instantly, giving you maximum operational control. 🕹️
51+
</details>
5152

52-
#### 📊 **Real-Time Dashboard Analytics**
53-
* Access real-time, aggregated metrics on key data points like total headlines, topics, and sources.
54-
* Provides an at-a-glance overview perfect for administrative dashboards.
55-
> **Your Advantage:** Instantly feed your content dashboard with the data it needs to provide valuable insights. 🎯
53+
<details>
54+
<summary><strong>📦 Dynamic Content & Data API</strong></summary>
5655

57-
#### 🏗️ **Clean & Modern Architecture**
58-
* Built with Dart and the high-performance Dart Frog framework.
59-
* Features a clean, layered architecture with standardized API responses and built-in dependency injection.
60-
> **Your Advantage:** A solid, maintainable codebase that's easy to understand, extend, and build upon. 🔧
56+
### ⚙️ Generic & Extensible Data API
57+
- **Unified Endpoint Design:** A single, powerful set of RESTful endpoints (`/api/v1/data`) handles all CRUD operations for every data model in the system, driven by a `?model=` query parameter.
58+
- **Registry-Based Architecture:** The API's extensibility is powered by two core components:
59+
- **`ModelRegistry`**: Maps a model name (e.g., `"headline"`) to a `ModelConfig` that defines its metadata: how to deserialize it from JSON, how to extract its ID, and the specific authorization rules for every action (Create, Read, Update, Delete).
60+
- **`DataOperationRegistry`**: Maps the same model name to the concrete functions that perform the CRUD operations, connecting the generic route to the specific `DataRepository<T>` for that model.
61+
- **How to Add a New Model:** To add a new data type, you simply register its configuration in these two central registries. The generic middleware and route handlers automatically enforce its permissions and execute its data operations without requiring new routes or custom logic.
62+
> **Your Advantage:** This architecture is incredibly easy to maintain and extend. Adding new data types to your application is fast, consistent, and requires minimal code, dramatically speeding up development.
6163
6264
---
6365

64-
## 🔑 License: Source-Available with a Free Trial
66+
### 🔍 Advanced Querying & Pagination
67+
- **Rich Filtering:** Supports complex, MongoDB-style filtering directly through the API.
68+
- **Flexible Sorting & Pagination:** Allows for multi-field sorting and efficient cursor-based pagination to handle large datasets.
69+
> **Your Advantage:** Enable powerful, high-performance content discovery features in your client applications (like filtering, sorting, and infinite scrolling) with no extra backend work.
6570
66-
Get started for free and purchase when you're ready to launch!
71+
</details>
6772

68-
* **TRY IT:** Download and explore the full source code under the PolyForm Free Trial [license](LICENSE). Perfect for evaluation.
69-
* **BUY IT:** One-time payment for a lifetime license to publish unlimited commercial apps.
70-
* **GET YOURS:** [**Purchase via GitHub Sponsors**](https://github.com/sponsors/flutter-news-app-full-source-code).
73+
<details>
74+
<summary><strong>🏗️ Architecture & Infrastructure</strong></summary>
7175

72-
> [!NOTE]
73-
> *A single purchase provides a commercial license for every repository within the [Flutter News App - Full Source Code Toolkit](https://github.com/flutter-news-app-full-source-code). No other purchases are needed..*
76+
### 🚀 High-Performance Dart Frog Core
77+
- **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.
78+
> **Your Advantage:** Your backend is built on a solid, modern foundation that is both powerful and easy to work with.
7479
7580
---
7681

77-
## 🚀 Getting Started & Running Locally
82+
### 🧱 Clean, Layered Architecture
83+
- **Separation of Concerns:** Strictly follows a layered architecture (Data Clients, Repositories, Services) that is clean, maintainable, and scalable.
84+
- **Standardized Responses:** Consistent JSON response structures for both success and error scenarios make client-side handling predictable and simple.
85+
> **Your Advantage:** You get a codebase that is easy to understand, modify, and extend, saving you significant development and maintenance time.
7886
79-
For a complete guide on setting up your local environment, running the server, and understanding the configuration, please see the **[Local Setup Guide](https://flutter-news-app-full-source-code.github.io/docs/api-server/local-setup/)** in our official documentation.
87+
---
8088

81-
Our documentation provides a detailed, step-by-step walkthrough to get you up and running smoothly.
89+
### 🔌 Robust Dependency Injection
90+
- **Testable & Modular:** A centralized dependency injection system makes the entire application highly modular and easy to test.
91+
- **Swappable Implementations:** Easily swap out core components—like the database (MongoDB), email provider (SendGrid), or storage services—without rewriting your business logic.
92+
> **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.
8293
8394
---
8495

85-
## ✅ Testing
96+
### ⚙️ Secure Environment Configuration
97+
- **Secure & Flexible:** Manages all sensitive keys, API credentials, and environment-specific settings through a `.env` file, keeping your secrets out of the codebase.
98+
> **Your Advantage:** Deploy your application across different environments (local, staging, production) safely and efficiently.
99+
100+
</details>
101+
102+
## 🔑 License: Source-Available with a Free Trial
103+
104+
Get started for free and purchase when you're ready to launch!
86105

87-
This project aims for high test coverage to ensure quality and reliability.
106+
- **TRY IT:** Download and explore the full source code under the PolyForm Free Trial [license](LICENSE). Perfect for evaluation.
107+
- **BUY IT:** One-time payment for a lifetime license to publish unlimited commercial apps.
108+
- **GET YOURS:** [**Purchase via GitHub Sponsors**](https://github.com/sponsors/flutter-news-app-full-source-code).
88109

89-
* Run tests with:
90-
```bash
91-
very_good test --min-coverage 90
110+
> A single purchase provides a commercial license for every repository within the [Flutter News App Full Source Code Toolkit](https://github.com/flutter-news-app-full-source-code). No other purchases are needed.
111+
112+
## 🚀 Getting Started & Running Locally
113+
114+
For a complete guide on setting up your local environment, running the server, and understanding the configuration, please see the **[Local Setup Guide](https://flutter-news-app-full-source-code.github.io/docs/api-server/local-setup/)** in our official documentation.
115+
116+
Our documentation provides a detailed, step-by-step walkthrough to get you up and running smoothly.

0 commit comments

Comments
 (0)