Added better logging and websocket, more readme details
This commit is contained in:
@@ -2,13 +2,15 @@
|
||||
|
||||
Flutter and Dart full stack template, Lovingly called FartStack
|
||||
|
||||
## TLDR
|
||||
Optimising for iteration speed, correctness, and deployability.
|
||||
|
||||
Dev is done all in dart, with the flutter framework as a frontend. The
|
||||
backend uses [dart_frog](), a dart backend framework with a focus on developer
|
||||
experience. This whole stack revolves around my Dart expertise, so its not about
|
||||
being the fastest stack, but the quickest stack I can build in. Because building
|
||||
a product is like a fart: You can't be sure its not crap until the follow-through.
|
||||
Because building a product is like a fart: You can't be sure its not crap until the follow-through.
|
||||
|
||||
## HowTo
|
||||
|
||||
Dev is done all in dart, with the flutter framework as a frontend. The backend uses [dart_frog](https://dartfrog.vgv.dev/), a dart backend
|
||||
framework with a focus on developer experience. This whole stack revolves around my Dart expertise, so its not about
|
||||
being blazingly fast, but the quickest stack I can build in with a statically-typed language.
|
||||
|
||||
### Installing
|
||||
|
||||
@@ -21,9 +23,11 @@ If not, well, you need to setup `flutter`, `dart` (should get installed with flu
|
||||
This codebase makes use of [RPS](https://pub.dev/packages/rps/install), just to standardize calling
|
||||
various tools, like Make, but for dart.
|
||||
|
||||
- Frontend is started with `cd frontend` and `flutter run` (not included in rps because there are lots of cli flags I change often with flutter run)
|
||||
- Frontend is started with `cd frontend` and `flutter run` (not included in rps because there are lots of cli flags I
|
||||
change often with flutter run)
|
||||
- Backend is started with `cd backend` and `rps dev` or `dart_frog dev`
|
||||
- The `build_runners` (codegen) for each subproject can all be run `cd backend` and `rps watch` for development or `rps build` for a one off codegen
|
||||
- The `build_runners` (codegen) for each subproject can all be run `cd backend` and `rps watch` for development or `rps
|
||||
build` for a one off codegen
|
||||
- If you dont want to bother installing rps, you can run the script directly:
|
||||
```sh
|
||||
dart backend/scripts/run_build_runner.dart
|
||||
@@ -41,7 +45,7 @@ dart run build_runner watch # or other args
|
||||
End to end tests can be run with `cd backend` and `rps e2e`.
|
||||
|
||||
All end to end tests are located in the `backend/test_e2e/tests` folder.
|
||||
There is a helper script that compiles and launches the backend and runs some end to end tests through.
|
||||
There is a helper script that compiles and launches the backend and runs some end to end tests through it.
|
||||
|
||||
#### Frontend
|
||||
|
||||
@@ -54,3 +58,16 @@ WIP
|
||||
|
||||
## Backend `./backend/`
|
||||
|
||||
Uses the great [dart frog](https://dartfrog.vgv.dev/) framework. Its an file-based framework, so to create a new route on `/new_route/bingo`,
|
||||
you would create a new file in `routes/new_route/bingo.dart` that contains a function
|
||||
```dart
|
||||
Response onRequest(RequestContext context) {
|
||||
return Response
|
||||
}
|
||||
```
|
||||
|
||||
Easy Peasy.
|
||||
|
||||
Go to the docks for more.
|
||||
|
||||
In the box, fartstack has authentication with JWT tokens setup
|
||||
|
||||
Reference in New Issue
Block a user