Skip to content

Commit 088039e

Browse files
committed
chore: update README
1 parent fcf56db commit 088039e

File tree

3 files changed

+112
-103
lines changed

3 files changed

+112
-103
lines changed

README.md

Lines changed: 56 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,16 @@
1212
</a>
1313
</h1>
1414

15-
DOGs, short for Dart Object Graphs, is a object mapping and serialization library that use
16-
code generation to create a structure definition of your serializable classes, which is usable at
17-
runtime.
15+
DOGs (Dart Object Graphs) is a serialization and object-mapping library for Dart that turns your classes into
16+
introspectable, immutable, and easily validated data models across multiple formats.
1817

1918
[Documentation](https://dogs.helight.dev) |
2019
[Discord](https://discord.gg/6HKuGSzYKJ) |
2120
[Pub Package](https://pub.dev/packages/dogs_core)
2221

2322
```dart
2423
@serializable
25-
class Person with Dataclass<Person>{
24+
class Person with Dataclass<Person> {
2625
2726
@LengthRange(max: 128)
2827
final String name;
@@ -39,82 +38,87 @@ class Person with Dataclass<Person>{
3938
}
4039
```
4140

42-
* 🐦 **Concise** Write expressive code with effectively zero boilerplate
43-
* 🚀 **Fast** Similar or increased performance compared to alternatives
44-
* 🧩 **Extensible** Modify and customize any part of your serialization
45-
* 📦 **Adaptive** Use one of the various formats or bring your own
41+
* 🐦 **Concise** Define immutable dataclasses with a simple annotation and mixin. toString, equals, hashCode, and
42+
builders are generated automatically. No equatable, no copyWith, no additional boilerplate.
43+
* 🚀 **Fast** Optimized serialization and deserialization with performance on par or better than alternatives. JSON
44+
support is built in with zero extra dependencies.
45+
* 🧩 **Extensible**
46+
Replace or extend any part of the pipeline. Add new formats, validators, projections, or field converters. Works with
47+
custom Flutter types through the integration package.
48+
* 📦 **Adaptive** Multiple formats supported out of the box: JSON, YAML, TOML, CBOR. Schema generation enables dynamic
49+
use cases like server-driven forms.
4650
* 📚 **Documented** Comprehensive documentation and examples
47-
***Unmatched DX** No part files, no dollar signs, no getters, no hassle
48-
51+
***Developer-friendly** All generated code goes into a single dogs.g.dart. Models remain clean and free of part
52+
directives. Builders and nullable copy methods are exposed centrally.
4953

5054
## Format Support
55+
5156
- **JSON** (included in dogs_core)
5257
- **YAML** <a href="https://pub.dev/packages/dogs_yaml"><img src="https://img.shields.io/pub/v/dogs_yaml?label=dogs_yaml" alt="pub"></a>
5358
- **TOML** <a href="https://pub.dev/packages/dogs_toml"><img src="https://img.shields.io/pub/v/dogs_toml?label=dogs_toml" alt="pub"></a>
5459
- **CBOR** <a href="https://pub.dev/packages/dogs_cbor"><img src="https://img.shields.io/pub/v/dogs_cbor?label=dogs_cbor" alt="pub"></a>
5560

5661
## Core Package <a href="https://pub.dev/packages/dogs_core"><img src="https://img.shields.io/pub/v/dogs_core?label=dogs_core" alt="pub"></a>
62+
5763
- **Json**
5864
The core package comes with json support out of the box and requires no additional dependencies.
5965

66+
- **Builders & Nullable Copy**
67+
We provide a nullable copy method that also works with null values, as well as autogenerated builders, similar to
68+
built_value. Both let you create immutable objects with a simple and fluent api.
6069

61-
- **Builders**
62-
We provide autogenerated builders, similar to built_value, which allow you to easily create
63-
immutable objects with a fluent api.
64-
70+
- **Structures**
71+
Every serializable class has an introspectable generated `DogStructure` that provides runtime access to the class's
72+
fields, annotations, factories and metadata. Together with the extensible core system, you can build powerful
73+
reflection-like functionality without the need for custom code generation or mirrors.
6574

6675
- **Dataclasses**
6776
Using our dataclass mixin automatically implements toString, equals and hashCode for your
6877
serializable classes. This removes the requirement for a package like equatable or
69-
ungodly amounts of boilerplate code.
70-
78+
ungodly amounts of boilerplate code, that is hard to maintain and distracting.
7179

7280
- **Projections**
73-
Dogs offers a powerful projection api, which allows you to transform your objects into
74-
other objects, without having to write additional boilerplate code.
75-
81+
Dogs offers a powerful projection api, which enables you to transform your objects into
82+
other objects, without having to write additional boilerplate code with brittle `copyWith`
83+
invocations and hard coded key names.
7684

7785
- **Polymorphism**
78-
Dogs supports polymorphic serialization, which allows you to serialize and deserialize
86+
Dogs supports polymorphic serialization, which enables you to serialize and deserialize
7987
objects of different types. You can even use interfaces and abstract classes as types,
8088
including `Object`.
8189

82-
8390
- **Validation**
8491
Using the validation api, you can easily validate your objects, without having the struggle
85-
of writing your own validation logic for most common use cases.
92+
of writing your own validation logic for most common use cases. Translation of messages and
93+
custom validators are supported as well.
8694

87-
88-
- **OpenApi Schema** (preview)
89-
Dogs offers a schema generation api, which allows you to generate an OpenApi schema for your
90-
objects, to be used with OpenApi tools like Swagger.
95+
- **JsonSchema-like Schema** (preview)
96+
Dogs offers a schema generation api, which allows you to dynamically export and parse a subset
97+
of json-schema. This enables advanced dynamic uses cases such as partially server-driven forms when used
98+
in combination with the flutter integration.
9199

92100
[Package on pub.dev](https://pub.dev/packages/dogs_core)
93101
[Documentation](https://dogs.helight.dev)
94102

95-
## Firestore <a href="https://pub.dev/packages/dogs_firestore"><img src="https://img.shields.io/pub/v/dogs_firestore?label=dogs_firestore" alt="pub"></a>
96-
Dogs offers a firestore api, which allows you to easily create firestore documents from your
97-
serializable objects and vice versa. You can either use our lightweight extensions on the Firestore
98-
classes or make use of our entity api, which offers you a simplified and more object oriented way of
99-
interacting with firestore.
100-
[Package on pub.dev](https://pub.dev/packages/dogs_firestore)
101-
[Documentation](https://dogs.helight.dev/firestore/)
102-
103-
## Forms <a href="https://pub.dev/packages/dogs_forms"><img src="https://img.shields.io/pub/v/dogs_forms?label=dogs_forms" alt="pub"></a>
104-
Use our forms api to easily create forms for any serializable object, without having
105-
to write boilerplate code. The package uses flutter_form_builder under the hood, so you can
106-
benefit from its large ecosystem of form fields.
107-
[Package on pub.dev](https://pub.dev/packages/dogs_forms)
108-
[Documentation](https://dogs.helight.dev/forms/)
109-
110-
## ✨ Fancy Code Generation ✨
111-
Dogs doesn't use part files for generated code but instead
112-
generated files for all serializable classes, which then get exported in the
113-
dogs.g.dart file at the root of your lib folder. This massively improves the
114-
developer experience, as you **don't** have to write **annoying part statements** with
115-
missing files everytime. In fact, you don't need do **import anything generated** in
116-
your **model files** at all! Generally, the api of dogs is designed to be independent
117-
of generated code, where it makes sense. All serialization and deserialization
118-
methods don't require any reference to generated code and can be used without
119-
any imports. The only exception to this are the builders, which are generated
120-
for each serializable class and require the dogs.g.dart file to be imported.
103+
## Flutter <a href="https://pub.dev/packages/dogs_flutter"><img src="https://img.shields.io/pub/v/dogs_flutter?label=dogs_flutter" alt="pub"></a>
104+
105+
Use our flutter integration to easily create forms for any serializable object, without having
106+
to write boilerplate code. The databinding system supports all primitive field types and can easily
107+
be extended to support custom field types and layouts. This package also provides converters for
108+
commonly used flutter types, like `Color`, `Offset`, `Size`, `Rect`, etc.
109+
110+
[Package on pub.dev](https://pub.dev/packages/dogs_flutter)
111+
[Documentation](https://dogs.helight.dev/flutter/)
112+
113+
## ✨ Non-Intrusive Code Generation ✨
114+
115+
Dogs takes a different approach to generated code. Instead of scattering part files across your models,
116+
all generated output lives in a single dogs.g.dart file at the root of your lib folder. This makes development smoother
117+
and far less error-prone. No more missing part statements or fragile imports.
118+
119+
Even better: your model definitions stay clean. You never need to reference generated code inside them. The only time
120+
you’ll interact with generated code directly is when using builders, which are neatly exported through
121+
the central dogs.g.dart.
122+
123+
This design keeps Dogs non-intrusive and future-proof. While part files may be added later for flexibility,
124+
you will never be required to reference generated code from within your model definition files.

packages/dogs_core/README.md

Lines changed: 55 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212
</a>
1313
</h1>
1414

15-
DOGs, short for Dart Object Graphs, is a object mapping and serialization library that use
16-
code generation to create a structure definition of your serializable classes, which is usable at
17-
runtime.
15+
DOGs (Dart Object Graphs) is a serialization and object-mapping library for Dart that turns your classes into
16+
introspectable, immutable, and easily validated data models across multiple formats.
1817

1918
[Documentation](https://dogs.helight.dev) |
2019
[Discord](https://discord.gg/6HKuGSzYKJ) |
@@ -39,81 +38,87 @@ class Person with Dataclass<Person> {
3938
}
4039
```
4140

42-
* 🐦 **Concise** Write expressive code with effectively zero boilerplate
43-
* 🚀 **Fast** Similar or increased performance compared to alternatives
44-
* 🧩 **Extensible** Modify and customize any part of your serialization
45-
* 📦 **Adaptive** Use one of the various formats or bring your own
41+
* 🐦 **Concise** Define immutable dataclasses with a simple annotation and mixin. toString, equals, hashCode, and
42+
builders are generated automatically. No equatable, no copyWith, no additional boilerplate.
43+
* 🚀 **Fast** Optimized serialization and deserialization with performance on par or better than alternatives. JSON
44+
support is built in with zero extra dependencies.
45+
* 🧩 **Extensible**
46+
Replace or extend any part of the pipeline. Add new formats, validators, projections, or field converters. Works with
47+
custom Flutter types through the integration package.
48+
* 📦 **Adaptive** Multiple formats supported out of the box: JSON, YAML, TOML, CBOR. Schema generation enables dynamic
49+
use cases like server-driven forms.
4650
* 📚 **Documented** Comprehensive documentation and examples
47-
***Unmatched DX** No part files, no dollar signs, no getters, no hassle
51+
***Developer-friendly** All generated code goes into a single dogs.g.dart. Models remain clean and free of part
52+
directives. Builders and nullable copy methods are exposed centrally.
4853

4954
## Format Support
55+
5056
- **JSON** (included in dogs_core)
5157
- **YAML** <a href="https://pub.dev/packages/dogs_yaml"><img src="https://img.shields.io/pub/v/dogs_yaml?label=dogs_yaml" alt="pub"></a>
5258
- **TOML** <a href="https://pub.dev/packages/dogs_toml"><img src="https://img.shields.io/pub/v/dogs_toml?label=dogs_toml" alt="pub"></a>
5359
- **CBOR** <a href="https://pub.dev/packages/dogs_cbor"><img src="https://img.shields.io/pub/v/dogs_cbor?label=dogs_cbor" alt="pub"></a>
5460

5561
## Core Package <a href="https://pub.dev/packages/dogs_core"><img src="https://img.shields.io/pub/v/dogs_core?label=dogs_core" alt="pub"></a>
62+
5663
- **Json**
5764
The core package comes with json support out of the box and requires no additional dependencies.
5865

66+
- **Builders & Nullable Copy**
67+
We provide a nullable copy method that also works with null values, as well as autogenerated builders, similar to
68+
built_value. Both let you create immutable objects with a simple and fluent api.
5969

60-
- **Builders**
61-
We provide autogenerated builders, similar to built_value, which allow you to easily create
62-
immutable objects with a fluent api.
63-
70+
- **Structures**
71+
Every serializable class has an introspectable generated `DogStructure` that provides runtime access to the class's
72+
fields, annotations, factories and metadata. Together with the extensible core system, you can build powerful
73+
reflection-like functionality without the need for custom code generation or mirrors.
6474

6575
- **Dataclasses**
6676
Using our dataclass mixin automatically implements toString, equals and hashCode for your
6777
serializable classes. This removes the requirement for a package like equatable or
68-
ungodly amounts of boilerplate code.
69-
78+
ungodly amounts of boilerplate code, that is hard to maintain and distracting.
7079

7180
- **Projections**
72-
Dogs offers a powerful projection api, which allows you to transform your objects into
73-
other objects, without having to write additional boilerplate code.
74-
81+
Dogs offers a powerful projection api, which enables you to transform your objects into
82+
other objects, without having to write additional boilerplate code with brittle `copyWith`
83+
invocations and hard coded key names.
7584

7685
- **Polymorphism**
77-
Dogs supports polymorphic serialization, which allows you to serialize and deserialize
86+
Dogs supports polymorphic serialization, which enables you to serialize and deserialize
7887
objects of different types. You can even use interfaces and abstract classes as types,
7988
including `Object`.
8089

81-
8290
- **Validation**
8391
Using the validation api, you can easily validate your objects, without having the struggle
84-
of writing your own validation logic for most common use cases.
85-
92+
of writing your own validation logic for most common use cases. Translation of messages and
93+
custom validators are supported as well.
8694

87-
- **OpenApi Schema** (preview)
88-
Dogs offers a schema generation api, which allows you to generate an OpenApi schema for your
89-
objects, to be used with OpenApi tools like Swagger.
95+
- **JsonSchema-like Schema** (preview)
96+
Dogs offers a schema generation api, which allows you to dynamically export and parse a subset
97+
of json-schema. This enables advanced dynamic uses cases such as partially server-driven forms when used
98+
in combination with the flutter integration.
9099

91100
[Package on pub.dev](https://pub.dev/packages/dogs_core)
92101
[Documentation](https://dogs.helight.dev)
93102

94-
## Firestore <a href="https://pub.dev/packages/dogs_firestore"><img src="https://img.shields.io/pub/v/dogs_firestore?label=dogs_firestore" alt="pub"></a>
95-
Dogs offers a firestore api, which allows you to easily create firestore documents from your
96-
serializable objects and vice versa. You can either use our lightweight extensions on the Firestore
97-
classes or make use of our entity api, which offers you a simplified and more object oriented way of
98-
interacting with firestore.
99-
[Package on pub.dev](https://pub.dev/packages/dogs_firestore)
100-
[Documentation](https://dogs.helight.dev/firestore/)
101-
102-
## Forms <a href="https://pub.dev/packages/dogs_forms"><img src="https://img.shields.io/pub/v/dogs_forms?label=dogs_forms" alt="pub"></a>
103-
Use our forms api to easily create forms for any serializable object, without having
104-
to write boilerplate code. The package uses flutter_form_builder under the hood, so you can
105-
benefit from its large ecosystem of form fields.
106-
[Package on pub.dev](https://pub.dev/packages/dogs_forms)
107-
[Documentation](https://dogs.helight.dev/forms/)
108-
109-
## ✨ Fancy Code Generation ✨
110-
Dogs doesn't use part files for generated code but instead
111-
generated files for all serializable classes, which then get exported in the
112-
dogs.g.dart file at the root of your lib folder. This massively improves the
113-
developer experience, as you **don't** have to write **annoying part statements** with
114-
missing files everytime. In fact, you don't need do **import anything generated** in
115-
your **model files** at all! Generally, the api of dogs is designed to be independent
116-
of generated code, where it makes sense. All serialization and deserialization
117-
methods don't require any reference to generated code and can be used without
118-
any imports. The only exception to this are the builders, which are generated
119-
for each serializable class and require the dogs.g.dart file to be imported.
103+
## Flutter <a href="https://pub.dev/packages/dogs_flutter"><img src="https://img.shields.io/pub/v/dogs_flutter?label=dogs_flutter" alt="pub"></a>
104+
105+
Use our flutter integration to easily create forms for any serializable object, without having
106+
to write boilerplate code. The databinding system supports all primitive field types and can easily
107+
be extended to support custom field types and layouts. This package also provides converters for
108+
commonly used flutter types, like `Color`, `Offset`, `Size`, `Rect`, etc.
109+
110+
[Package on pub.dev](https://pub.dev/packages/dogs_flutter)
111+
[Documentation](https://dogs.helight.dev/flutter/)
112+
113+
## ✨ Non-Intrusive Code Generation ✨
114+
115+
Dogs takes a different approach to generated code. Instead of scattering part files across your models,
116+
all generated output lives in a single dogs.g.dart file at the root of your lib folder. This makes development smoother
117+
and far less error-prone. No more missing part statements or fragile imports.
118+
119+
Even better: your model definitions stay clean. You never need to reference generated code inside them. The only time
120+
you’ll interact with generated code directly is when using builders, which are neatly exported through
121+
the central dogs.g.dart.
122+
123+
This design keeps Dogs non-intrusive and future-proof. While part files may be added later for flexibility,
124+
you will never be required to reference generated code from within your model definition files.

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ melos:
2222
copy-readme:
2323
name: copy-readme
2424
description: 'Copies the root-Readme to the dogs package'
25-
run: cp README.md packages/dogs/README.md
25+
run: cp README.md packages/dogs_core/README.md
2626
analyze:
2727
name: analyze
2828
description: 'Runs the dart analyzer'

0 commit comments

Comments
 (0)