Skip to content

Commit

Permalink
Add Diagrams and the image
Browse files Browse the repository at this point in the history
  • Loading branch information
yasuflatland-lf committed Aug 5, 2024
1 parent d8a25f3 commit cc84619
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
# Framingo Armond
🔥Tinder like Flashcard App.

![flamingo-armond backend](https://github.com/yasuflatland-lf/flamingo-armond/actions/workflows/backend.yml/badge.svg)
![flamingo-armond frontend](https://github.com/yasuflatland-lf/flamingo-armond/actions/workflows/frontend.yml/badge.svg)

# Architecture
- **Render** (Static site for React, GraphQL service)
- **Superbase** (Database and authentication)

![Architecture](./docs/diagram.png)

# Environment
This repository is structured as a mono repository.

| Directroy | Discription |
|:--|:--|
|frontend | frontend implementation |
|backend| backend GraphQL API server |
|frontend | Frontend implementation |
|backend| Backend GraphQL API server |

## frontend
- Typescript
Expand Down
15 changes: 15 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Documentations
This directory
# Precondition
- Python 3.6 >=
- [Graphviz](https://graphviz.gitlab.io/download/)
- [Diagrams](https://diagrams.mingrammer.com/docs/getting-started/installation#quick-start)

# Generate the network diagram

## Install Diagram
1. Install [Graphviz](https://graphviz.gitlab.io/download/)
1. Install [Diagrams](https://diagrams.mingrammer.com/docs/getting-started/installation#quick-start)

## Generate Image
2. Run `phthon diagram.py`
Binary file added docs/diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions docs/diagram.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# diagram.py
from diagrams import Cluster, Diagram, Edge
from diagrams.onprem.compute import Server
from diagrams.onprem.database import Postgresql
from diagrams.onprem.vcs import Github
from diagrams.generic.device import Mobile, Tablet
from diagrams.onprem.client import Users
from diagrams.aws.iot import IotCertificate

spbase_attr = {
"bgcolor": "lightgreen"
}

with Diagram("Flamingo Service Architecture", filename="diagram", show=False):
tablet = Tablet("Tablet users")
mobile = Mobile("Mobile users")
github = Github("Repository")
with Cluster("Render"):
frontend = Server("Frontend (React)")
backend = Server("Backend (Go)")
render = frontend - backend
with Cluster("Superbase", graph_attr=spbase_attr):
database = Postgresql("Database")
auth = IotCertificate("Auth")
sbase = [database, auth]

backend >> database
backend >> Edge(label="Authentication (Google)") >> auth
frontend >> Edge(label="Authentication (Google)") >> auth
github >> Edge(label="Deploy") >> render
tablet >> frontend
mobile >> frontend

0 comments on commit cc84619

Please sign in to comment.