Skip to content

Commit 1d78738

Browse files
committed
update readme
1 parent da8e2f7 commit 1d78738

File tree

1 file changed

+138
-8
lines changed

1 file changed

+138
-8
lines changed

README.md

+138-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,85 @@
11
# todo-list-fullstack
2-
example application to demonstrate test automation and ci/cd practices.
32

4-
## overview
3+
example application to demonstrate test automation and ci/cd practices. playground to try out different frameworks and
4+
more.
5+
6+
It's not only about code. For this to be more realistic, we don't develop without goal. This leads to some dissonance
7+
between `this is a playground` and `this is product development` which shows in the vision, value, etc.
8+
9+
## vision
10+
11+
We want to know the what, why and how ToDo stuff. From personal experience, it seems that there is so much stuff you
12+
have to do, be it daily routine, sudden issues, reoccurring obligations and then there is also the stuff you should do
13+
but don't even know about. This is where `[product name]` comes in. We analyse your life holistically and with the help
14+
of `[AI/ML/blockchain/...]` we will be able to not only tell you, what needs to be done, we also
15+
deploy `[smart agents/replacable drones/underpaid workers]` to get it done for you. A truly digital personal assistant
16+
to handle the tedious bits of adulting.
17+
18+
### Now
19+
20+
* gather user details
21+
* MVP development
22+
* save/load list by name
23+
* auth with github account
24+
* dogfooding
25+
26+
### Next
27+
28+
* suggest todos
29+
* suggest ways to outsource resolution
30+
31+
### Later
32+
33+
* create a comprehensive plan of all the things a person or community has to do
34+
* get it done automatically
35+
36+
## Risks
37+
38+
`ToDo`
39+
40+
## Test Strategy
41+
42+
`ToDo`: what's called a strategy here isn't really helping decision makeing, maybe it's more `principles`
43+
or `things that sound good`
44+
45+
We test for 3 things:
46+
47+
* ensure and prove people can trust us
48+
* learn about our users
49+
* make the development experience best
50+
51+
Therefor we value:
52+
53+
* good engineering practices
54+
* good user feedback loops
55+
* automation of the things that should be automated
56+
* collaboration
57+
* diversity
58+
59+
Great looks like:
60+
61+
* 80/20 rule of test automation
62+
* monitoring and data driven development instead of e2e tests
63+
* paying attention to the DORA metrics
64+
* make it easy for users to get good help and give feedback
65+
* devs can pick the tools they like
66+
* continously incorporate diverse expert feedback
67+
* no persistent stages, all testing done locally, on ephemeral environments or in production
68+
* the product is used by most of the staff privately or for working on this product
69+
70+
## Test Plan
71+
72+
| when | what | who | why | precondition | done |
73+
|------------|--------------------------------|------|-----------------|------------------|-------------------------------------------------------|
74+
| continuous | unit testing | dev | TDD | scenario context | good coverage, readable, running in CI and green |
75+
| continous | integration | dev | BDD | discovery | automated and green and/or confirmed on ephemeral env |
76+
| continous | exploration | pair | share,diversity | product vision | timeboxed |
77+
| continous | smoke test | dev | observability | scenarios | dashboard green |
78+
| continous | user observation and interview | dev | diversity | scenarios | timeboxed |
79+
80+
`ToDo`: performance/security/accessibility/data/chaos
81+
82+
## Architecture
583

684
```mermaid
785
C4Context
@@ -33,14 +111,47 @@ Rel(TODO, DB, "client library")
33111
Rel(USER, DB, "client library")
34112
UpdateLayoutConfig($c4ShapeInRow="2", $c4BoundaryInRow="2")
35113
```
114+
Currently, people interact with a browser based client that allows them to access a REST API that acts as a front to a service mesh.
115+
116+
## repo structure
117+
### [.google](.google): cloudbuild pipeline scripts
118+
119+
120+
### [bff](bff): backend for frontend, REST API
121+
BFF (Backend for Frontend), which is a way of designing the backend
122+
(server) of an application to specifically meet the needs of the frontend (client) of that application. BFFs communicate with a set of backend services through an API gateway, and are designed to be lightweight and scalable.
123+
124+
### [bin](bin): convenience scripts for development
125+
### [grpc](grpc): describes data and services from which code is generated to implement services and interact with these
126+
gRPC is a high-performance Remote Procedure Call (RPC) framework that lets developers exchange data between microservices or applications efficiently and with low latency. It relies on a binary protocol called Protocol Buffers (protobufs) to describe message formats and interfaces, which helps reduce network round trips required for data exchange. gRPC provides both client-side and server-side libraries for multiple programming languages, and includes built-in support for load balancing, flow control, and congestion control.
127+
128+
### [report](report): library that parses junit test results and pushes them to google bigquery
129+
130+
### [single page application](single-page-application): frontend based on the famous ToDoMVC
131+
A single-page application (SPA) package is a software development tool that helps build web applications that load all their content on a single web page, instead of multiple pages from the server. This makes the user experience smoother and faster, with less need to refresh or reload data from the server. SPA packages use JavaScript to dynamically update content without needing to rely on server-side rendering. This project use React framework but SPA frameworks can also include Angular, and Vue.js
132+
133+
### [system tests](system-tests): end-to-end tests
134+
135+
Various frameworks for testing the whole system as mostly black box. Some frameworks may focus on http apis, others on browser interaction or mixture of both.
136+
137+
138+
### [terraform](terraform): infrastructure as code
139+
Terraform is a tool used in infrastructure as code that helps teams define, create and manage their infrastructure using code. It allows users to easily and quickly make changes to infrastructure resources such as virtual machines, databases, and load balancers across multiple cloud providers. Terraform is highly interoperable, working with almost any cloud provider and supporting various infrastructure types.
140+
141+
### [todo service](terraform): microservice handling todo management
142+
The todo-service package is a software development tool used to create a task management service. It provides an API that lets users create, read, update, and delete tasks. The package can be customized and integrated with various front-end frameworks to create full-featured task management applications. Document full-stack project 6 The todo-service package may also include features such as task prioritization, deadlines, tags, user access control, and notifications.
36143

37144
## get your own instance:
145+
38146
* fork this repository
39147
* create GCP project, enable billing
40148
* install gcloud and terraform
41149
* login `gcloud auth application-default login`
42-
* create billing budget `gcloud alpha billing budgets create --billing-account=$your_billling_account --display-name="budget" --budget-amount=5.00EUR --threshold-rule=percent=0.70 --threshold-rule=percent=0.90,basis=forecasted-spend` this will notify you if for some reason you spend
43-
* go to `/terraform/production` and create a `terraform.tfvars` file, replace values with yours:
150+
* create billing
151+
budget `gcloud alpha billing budgets create --billing-account=$your_billling_account --display-name="budget" --budget-amount=5.00EUR --threshold-rule=percent=0.70 --threshold-rule=percent=0.90,basis=forecasted-spend`
152+
this will notify you if for some reason you spend
153+
* go to `/terraform/production` and create a `terraform.tfvars` file, replace values with yours:
154+
44155
```
45156
location = "europe-west1"
46157
notification_email = "[email protected]"
@@ -49,20 +160,39 @@ repo_name = "todo-list-fullstack"
49160
repo_owner = ${gihub_username}
50161
zone = "europe-west1-d"
51162
```
52-
* run terraform init and terraform apply (might require multiple tries first time for apis to be enabled).
53-
* `Error creating Trigger: googleapi: Error 400: Repository mapping does not exist. Please visit https://console.cloud.google.com/cloud-build/triggers/connect?project=... to connect a repository to your project` do that
163+
164+
* run terraform init and terraform apply (might require multiple tries first time for apis to be enabled).
165+
* `Error creating Trigger: googleapi: Error 400: Repository mapping does not exist. Please visit https://console.cloud.google.com/cloud-build/triggers/connect?project=... to connect a repository to your project`
166+
do that
54167
* some images are not present yet, so you have to run all the deployment triggers to have the image built
55-
* change and commit/push [.env](single-page-application/.env) to your actual bff url (go to cloud run to find it) FIXME, should be automatic
56-
* Configure Error Reporting notifications by [going to the console](https://console.cloud.google.com/errors) and clicking "Configure Notifications". Unfortunately, [we're unable to automate this](https://github.com/hashicorp/terraform-provider-google/issues/12068).
168+
* change and commit/push [.env](single-page-application/.env) to your actual bff url (go to cloud run to find it) FIXME,
169+
should be automatic
170+
* Configure Error Reporting notifications by [going to the console](https://console.cloud.google.com/errors) and
171+
clicking "Configure Notifications".
172+
Unfortunately, [we're unable to automate this](https://github.com/hashicorp/terraform-provider-google/issues/12068).
57173
* set error notification channel https://console.cloud.google.com/errors
58174

59175
## dev
176+
60177
### docker
178+
61179
run everything locally with `docker compose`
180+
62181
```shell
63182
git clone [email protected]:globalworming/todo-list-fullstack.git
64183
cd todo-list-fullstack/
65184
docker compose -f docker-compose.local.yml up
66185
```
186+
67187
open `localhost:3000`
68188

189+
### test
190+
there is a [run all tests](bin/runAllTests.sh) script. make sure everything on port 8000 and 3000 is shut down `ToDo: script should check that`
191+
```
192+
Usage: bash runAllTests.sh [-t] [-s "${stage}"]
193+
stage defaults to local
194+
-t is for pushing to bigquery, you need the right credentials for that
195+
```
196+
197+
198+

0 commit comments

Comments
 (0)