You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/howitworks.mdx
+12-37Lines changed: 12 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: 'Learn the architecture of the project'
5
5
6
6
## Architecture
7
7
8
-
GrowChief is composed of 4 main services and 3 external services - all 4 of the main services typically run within a **single docker container**, and talk to each other through HTTP. Those 4 main servers typically talk to other containers, running the external services - the SQL Database, Redis Queue and Storage.
8
+
GrowChief is composed of 3 main services and 2 external services - all 5 of the main services typically run within a **single docker container**, and talk to each other through HTTP. Those 4 main servers typically talk to other containers, running the external services - the SQL Database, Redis Queue and Storage.
9
9
10
10
```mermaid
11
11
flowchart LR;
@@ -14,58 +14,33 @@ flowchart LR;
14
14
15
15
frontend[Frontend Service]:::svc
16
16
backend[Backend Service]:::svc
17
-
cron[Cron Service]:::svc
18
-
workers[Worker Service]:::svc
19
-
redis[Redis Queue]:::ext
20
-
db[SQL Database]:::ext
21
-
storage[Storage]:::ext
17
+
orchestrator[Temporal Worker]:::svc
18
+
temporal[Temporal Service]:::ext
19
+
postgres[Postgres Database]:::ext
22
20
23
21
frontend --> backend
24
-
backend --> db
25
-
backend --> redis
26
-
cron <--> redis
27
-
workers --> storage
28
-
workers --> db
29
-
redis --> workers
30
-
backend --> storage
31
-
22
+
backend --> postgres
23
+
backend --> temporal
24
+
orchestrator --> temporal
25
+
orchestrator --> postgres
32
26
```
33
27
34
28
35
29
-[Frontend](#frontend) - Provides the Web user interface, talks to the Backend.
36
30
-[Backend](#backend) - Does all the real work, provides an API for the frontend, and posts work to the redis queue.
37
-
-[Workers](#worker) - Consumes work from the Redis Queue.
38
-
-[Cron](#cron) - Run jobs at scheduled times.
31
+
-[Workers](#worker) - Consumes work from the Temporal Service.
39
32
40
-
-[Redis Queue](#redis) - A simple queue for the workers to consume work from.
33
+
-[Temporal Service](#temporal) - A simple queue for the workers to consume work from.
41
34
-[SQL Database](#db) - Stores all the data, Postgres is typically used, but any SQL database can be used.
42
-
-[Storage](#storage) - Stores all the files, this used to be CloudFlare R2 as the default, but now it's just a local file system.
43
35
44
36
### Frontend
45
37
46
-
The frontend is the part that you see, the web interface.
47
-
48
-
It relies on the backend to:
49
-
50
-
- Schedule posts
51
-
- Show analytics
52
-
- Manage users
38
+
The frontend is the part that you see, the web interface make with React Vite.
53
39
54
40
### Backend
55
41
56
42
The backend is the "brain" of GrowChief, and coordinates all the work. Typically the SQL database it talks to is Postgres, but other databases can be used.
57
43
58
-
### Cron
59
-
60
-
The cron service does the following;
61
-
62
-
- Refresh tokens from different social media platforms.
63
-
- Check for trending change every hour and inform users about it.
64
-
- Sync the amount of stars for every repository at the end of the day.
65
-
66
44
### Worker
67
45
68
-
The worker services does the following;
69
-
70
-
- Post scheduled posts to social media platforms.
71
-
- Perform multiple jobs coming from the cron.
46
+
The worker process the queue and automate your social media accounts.
0 commit comments