platform/README.md

212 lines
7.6 KiB
Markdown
Raw Normal View History

2021-06-21 04:07:48 +00:00
# Angel3 Framework
2023-12-25 03:45:10 +00:00
[![Angel3 Framework](angel3_logo.png)](https://github.com/dart-backend/angel)
2020-02-15 23:35:27 +00:00
2021-12-21 01:11:53 +00:00
![Pub Version (including pre-releases)](https://img.shields.io/pub/v/angel3_framework?include_prereleases)
2021-05-16 09:54:16 +00:00
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
2024-07-07 15:40:44 +00:00
[![Discord](https://img.shields.io/discord/1060322353214660698)](https://discord.gg/3X6bxTUdCM)
2023-12-25 03:45:10 +00:00
[![License](https://img.shields.io/github/license/dart-backend/angel)](https://github.com/dart-backend/angel/LICENSE)
2022-03-20 00:55:30 +00:00
[![melos](https://img.shields.io/badge/maintained%20with-melos-f700ff.svg?style=flat-square)](https://github.com/invertase/melos)
2020-02-15 23:35:27 +00:00
2023-10-18 23:48:24 +00:00
**A production-ready dart backend framework.**
2020-02-15 23:35:27 +00:00
-----
2021-06-21 04:07:48 +00:00
2020-02-15 23:35:27 +00:00
## About
2021-06-21 04:07:48 +00:00
2023-10-18 23:48:24 +00:00
Angel3 originated from a fork of the archived Angel framework in support of Dart SDK 2.12.x or later. It is a full-stack backend framework in Dart that aims to streamline development by providing many common features out-of-the-box in a consistent manner. The codebase has been completely migrated and refactored to support null safety. One of the main goal is to enable developers to build both frontend and backend in dart language. Angel3 is designed as a collection of plugins that enable developers to pick and choose the parts needed for their projects. A series of starter templates are also provided for quick start and trial run with Angel3. Visit our [website](<https://angel3-framework.web.app/>) to learn more.
2020-02-15 23:35:27 +00:00
2022-08-28 17:51:56 +00:00
The available features in Angel3 includes:
2021-06-21 04:07:48 +00:00
2023-03-11 05:46:54 +00:00
* OAuth2 Authentication
* WebSocket
* HTTP/2
* HTTP Streaming
2021-06-21 04:07:48 +00:00
* GraphQL
2024-07-07 15:40:44 +00:00
* Markdown, Mustache, Jinja and JAEL as Server-Side HTML Rendering
* ORM for PostgreSQL and MySQL
* MongoDB, Sembast and RethinkDB as storage
* Redis as cache
2020-02-15 23:36:29 +00:00
2023-03-11 06:42:29 +00:00
See all of the available [`packages`](https://angel3-docs.dukefirehawk.com/packages) for more information.
2021-06-21 04:07:48 +00:00
## Important Notes
2020-02-15 23:35:27 +00:00
Angel3 packages are published under `angel3_` prefix on pub.dev. These packages have passed all of their respective test suites before going live. The development work are currently focused on:
2023-03-11 04:44:22 +00:00
* Keeping the packages with `angel3_` prefix in sync with Dart SDK releases
* Remove and replace deprecated classes and methods while keeping backward compatible
* Refactor the code to use new language features
* Fix and resolve reported issues
* Performance tunning
* Improve on existing features, unit test, user guide and examples
* Add new features
2021-03-13 02:32:48 +00:00
2023-03-11 06:42:29 +00:00
The status of the project is as follows:
2021-03-13 02:00:29 +00:00
2021-08-20 04:59:15 +00:00
Branch: `master`
2021-06-21 04:07:48 +00:00
2024-07-07 15:40:44 +00:00
* Dart version : 3.x.x or later.
2021-08-20 04:59:15 +00:00
* Publish : Yes. Refer to packages with `angel3_` prefix on [pub.dev](https://pub.dev/publishers/dukefirehawk.com/packages).
2021-12-01 07:10:58 +00:00
* Null Safety : Yes
* Status : Production
* Notes : Use this branch for all PR submission
2021-03-13 02:00:29 +00:00
2023-12-25 03:45:10 +00:00
For more details, checkout [Project Status](https://github.com/dart-backend/angel/wiki/Project-Status)
2021-03-13 02:12:24 +00:00
2023-06-10 04:10:21 +00:00
## Release Notes
2024-06-23 04:09:26 +00:00
### Release 9.0.0 (Future)
* Performance optimsation
2024-07-14 23:35:19 +00:00
* Update ORM to support macro
2024-06-23 04:09:26 +00:00
2023-06-10 04:10:21 +00:00
### Release 8.0.0 (Current)
2022-04-24 01:42:33 +00:00
2023-12-24 16:10:10 +00:00
* Updated `angel3_` packages to require dart >= 3.0.0
2023-06-17 07:07:19 +00:00
* Updated dependencies to the latest
2024-07-07 15:40:44 +00:00
* Updated code generator to use `analyzer` 6.x.x
2023-06-10 04:20:53 +00:00
* Resolved issues related to generated container
2023-03-11 04:44:22 +00:00
2023-06-10 04:10:21 +00:00
### Release 7.0.0
2023-03-11 04:44:22 +00:00
2023-06-10 04:20:53 +00:00
* Updated `angel3_` packages to require dart >= 2.17.x
2023-06-17 07:07:19 +00:00
* Updated dependencies to the latest
2023-03-11 06:42:29 +00:00
* Updated code generator to use `analyzer` 5.x.x
2023-06-17 07:07:19 +00:00
* Fixed ORM issues
2022-08-28 17:51:56 +00:00
2023-06-10 04:20:53 +00:00
### Release 6.0.0
2022-04-24 01:42:33 +00:00
2023-06-17 07:07:19 +00:00
* Updated all `angel3_` packages to require dart >= 2.16.x
* Updated ORM to support MariaDB 10.2.x (stable) and MySQL 8.x (beta)
* Updated code generator to use `analyzer` 3.x.x
* Updated exception handling
2022-04-24 01:42:33 +00:00
* Added default logger to generate standardised logging messages
* Added `melos` support
* Removed deprecated API
2022-04-25 00:54:13 +00:00
* [**Breaking**] `error` for `AngelHttpException` is no longer mandatory
2022-08-28 17:51:56 +00:00
2023-06-10 04:10:21 +00:00
## TODO
* Improve HTTP and ORM performance
* Improve ORM for MySQL
* Add cache support in ORM (using Redis)
* Upgrade and release angel3_oauth2 8.0.0 (5 failed test cases)
2024-07-07 15:40:44 +00:00
* Upgrade and release angel3_auth_twitter 8.0.0 (Migrate to OAuth2)
2023-06-10 04:10:21 +00:00
* Upgrade and release angel3_shelf 8.0.0 (2 failed test cases)
2021-06-21 04:07:48 +00:00
## Installation and Setup
2020-02-15 23:35:27 +00:00
2021-08-20 04:59:15 +00:00
### Create a new project by cloning from boilerplate templates
2021-06-21 04:07:48 +00:00
1. Download and install [Dart](https://dart.dev/get-dart)
2021-08-20 04:59:15 +00:00
2. Clone one of the following starter projects:
2022-10-03 15:31:46 +00:00
* [Angel3 Basic Template](https://github.com/dukefirehawk/boilerplates/tree/v7/angel3-basic)
* [Angel3 ORM Template](https://github.com/dukefirehawk/boilerplates/tree/v7/angel3-orm)
* [Angel3 ORM MySQL Template](https://github.com/dukefirehawk/boilerplates/tree/v7/angel3-orm-mysql)
* [Angel3 Graphql Template](https://github.com/dukefirehawk/boilerplates/tree/v7/angel3-graphql)
2021-05-16 10:46:58 +00:00
2021-08-20 04:59:15 +00:00
3. Run the project in development mode (*hot-reloaded* is enabled on file changes).
```bash
dart --observe bin/dev.dart
```
4. Run the project in production mode (*hot-reloaded* is disabled).
```bash
dart bin/prod.dart
```
5. Run as docker. Edit and build the image with the provided `Dockerfile` file.
6. Next, refer to the [developer guide](https://angel3-docs.dukefirehawk.com/) to learn more about Angel3 framework.
### Create a new project with Angel3 CLI
1. Download and install [Dart](https://dart.dev/get-dart)
2. Install the [Angel3 CLI](https://pub.dev/packages/angel3_cli):
```bash
dart pub global activate angel3_cli
```
3. On terminal, create a new project:
2021-06-21 04:07:48 +00:00
2021-08-20 04:59:15 +00:00
```bash
angel3 init hello
```
2020-02-15 23:35:27 +00:00
2021-08-20 04:59:15 +00:00
4. Run the project in development mode (*hot-reloaded* is enabled on file changes).
2020-02-15 23:35:27 +00:00
2021-08-20 04:59:15 +00:00
```bash
dart --observe bin/dev.dart
```
2020-02-15 23:35:27 +00:00
2021-08-20 04:59:15 +00:00
5. Run the project in production mode (*hot-reloaded* is disabled).
2020-02-15 23:35:27 +00:00
2021-08-20 04:59:15 +00:00
```bash
dart bin/prod.dart
```
2020-02-15 23:35:27 +00:00
2021-08-20 04:59:15 +00:00
6. Run as docker. Edit and build the image with the provided `Dockerfile` file.
2020-02-15 23:35:27 +00:00
2021-08-20 04:59:15 +00:00
7. Next, refer to the [developer guide](https://angel3-docs.dukefirehawk.com/) to learn more about Angel3 framework.
2020-02-15 23:35:27 +00:00
2021-08-20 04:59:15 +00:00
### Migrating from Angel to Angel3
2021-03-13 03:00:04 +00:00
2021-06-21 04:07:48 +00:00
Check out [Migrating to Angel3](https://angel3-docs.dukefirehawk.com/migration/angel-2.x.x-to-angel3/migration-guide-3)
2021-05-16 08:07:47 +00:00
2021-12-21 01:11:53 +00:00
## Performance Benchmark
2024-07-14 23:43:49 +00:00
The performance benchmark can be found at [TechEmpower Framework Benchmarks](https://www.techempower.com/benchmarks/#section=data-r22&test=composite&hw=ph)
2021-12-21 01:11:53 +00:00
2024-07-14 23:35:19 +00:00
The test cases are build using standard `Angel3 ORM` template for PostgreSQL and MySQL database. The result are used for fine-tuning Angel3 framework with respect to other frameworks. The following test cases will be added in the upcoming update to the benchmark.
2022-01-08 08:16:50 +00:00
2024-07-14 23:35:19 +00:00
1. Cache with Redis
2022-10-03 15:31:46 +00:00
2. Angel3 with MongoDB
2021-12-21 01:11:53 +00:00
2020-02-15 23:35:27 +00:00
## Examples and Documentation
2024-07-14 23:35:19 +00:00
Please visit our [User Guide](https://angel3-docs.dukefirehawk.com/) and [Examples](https://github.com/dart-backend/angel3-examples) for more detailed information on the available features of Angel3 framework.
2020-02-15 23:35:27 +00:00
2024-07-07 15:40:44 +00:00
## Community
Join us on [Discord](https://discord.gg/3X6bxTUdCM).
2020-02-15 23:36:29 +00:00
## Contributing
2021-06-21 04:07:48 +00:00
2024-07-14 23:35:19 +00:00
If you are interested in contributing to Angel3 framework please check out the [Contribution Guide](CONTRIBUTING.md).
2022-08-13 02:14:43 +00:00
2023-05-20 23:40:23 +00:00
### Development Setup
1. Fork `angel` repository
2. Clone the project to local and create a new branch
```bash
git clone https://github.com/<your_repo_name>/angel.git
git checkout -b feature/<your_branch_name>
```
2023-05-21 00:02:05 +00:00
3. Download and install [Dart 3](https://dart.dev/get-dart)
2023-05-20 23:40:23 +00:00
2024-06-23 04:09:26 +00:00
4. Install `melos` 6.1
2023-05-20 23:40:23 +00:00
```bash
dart pub global activate melos
```
2023-05-21 00:02:05 +00:00
5. Run `melos exec "dart pub upgrade"` to update all the packages
2023-05-20 23:40:23 +00:00
2023-05-21 00:02:05 +00:00
6. Make changes to the packages
2023-05-20 23:40:23 +00:00
2022-08-16 11:19:04 +00:00
## Donation & Support
2022-08-13 02:14:43 +00:00
2024-07-14 23:35:19 +00:00
If you like this project and interested in supporting its development work, you are welcome to make a donation via the following links.
2024-02-12 05:03:40 +00:00
2024-07-14 23:35:19 +00:00
* [![GitHub Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/dukefirehawk)
* [Paypal Donation](https://paypal.me/dukefirehawk?country.x=MY&locale.x=en_US)