|
| 1 | +--- |
| 2 | +title: React Templates |
| 3 | +--- |
| 4 | + |
| 5 | +## React Static |
| 6 | + |
| 7 | +### Development |
| 8 | + |
| 9 | +```mermaid |
| 10 | +--- |
| 11 | +config: |
| 12 | + layout: dagre |
| 13 | + look: neo |
| 14 | + theme: redux |
| 15 | + themeVariables: |
| 16 | + edgeLabelBackground: '#ffffff' |
| 17 | +--- |
| 18 | +flowchart LR |
| 19 | + subgraph DEVELOPMENT["DEVELOPMENT"] |
| 20 | + direction LR |
| 21 | + DevServer[(".NET PROJECT<br>(localhost:5001)")] |
| 22 | + Identity("ASP.NET Core Identity<br>Razor Pages") |
| 23 | + Endpoints(".NET Endpoint Routing") |
| 24 | + DevNext[/"Vite React App<br>(localhost:5173)<br>Runs concurrently"/] |
| 25 | + end |
| 26 | + DevServer -- /Identity/* --> Identity |
| 27 | + DevServer -- /* --> Endpoints |
| 28 | + DevServer -- /* Fallback<br>(Proxied) --> DevNext |
| 29 | + DevServer -- Vite HMR<br>(Websocket) --> DevNext |
| 30 | +
|
| 31 | + Identity:::static |
| 32 | + Endpoints:::static |
| 33 | + DevServer:::netHost |
| 34 | + DevNext:::nextApp |
| 35 | + classDef netHost fill:#dbeafe,stroke:#1e3a8a,stroke-width:2px,color:#1e3a8a |
| 36 | + classDef nextApp fill:#f3e8ff,stroke:#6b21a8,stroke-width:2px,color:#6b21a8 |
| 37 | + classDef static fill:#ecfdf5,stroke:#047857,stroke-width:2px |
| 38 | +``` |
| 39 | + |
| 40 | +### Production |
| 41 | + |
| 42 | +```mermaid |
| 43 | +--- |
| 44 | +config: |
| 45 | + layout: dagre |
| 46 | + look: neo |
| 47 | + theme: redux |
| 48 | + themeVariables: |
| 49 | + edgeLabelBackground: '#ffffff' |
| 50 | +--- |
| 51 | +flowchart LR |
| 52 | + subgraph PRODUCTION["PRODUCTION"] |
| 53 | + direction LR |
| 54 | + DevServer[(".NET PROJECT<br>(localhost:5001)")] |
| 55 | + Endpoints(".NET Endpoint Routing") |
| 56 | + Identity("ASP.NET Core Identity<br>Razor Pages") |
| 57 | + StaticFiles[/"/wwwroot<br>Serves static files<br>(HTML, CSS, JS)"/] |
| 58 | + end |
| 59 | + DevServer -- /Identity/* --> Identity |
| 60 | + DevServer -- /* --> Endpoints |
| 61 | + DevServer <-- /* Static Files --> StaticFiles |
| 62 | +
|
| 63 | + DevServer:::netHost |
| 64 | + StaticFiles:::static |
| 65 | +
|
| 66 | + classDef netHost fill:#dbeafe,stroke:#1e3a8a,stroke-width:2px,color:#1e3a8a |
| 67 | + classDef nextApp fill:#f3e8ff,stroke:#6b21a8,stroke-width:2px,color:#6b21a8 |
| 68 | + classDef static fill:#ecfdf5,stroke:#047857,stroke-width:2px |
| 69 | +``` |
| 70 | + |
| 71 | +## Next.js Static |
| 72 | + |
| 73 | +### Development |
| 74 | + |
| 75 | +```mermaid |
| 76 | +--- |
| 77 | +config: |
| 78 | + layout: dagre |
| 79 | + look: neo |
| 80 | + theme: redux |
| 81 | + themeVariables: |
| 82 | + edgeLabelBackground: '#ffffff' |
| 83 | +--- |
| 84 | +flowchart LR |
| 85 | + subgraph DEVELOPMENT["DEVELOPMENT"] |
| 86 | + direction LR |
| 87 | + DevServer[(".NET PROJECT<br>(localhost:5001)")] |
| 88 | + Identity("ASP.NET Core Identity<br>Razor Pages") |
| 89 | + Endpoints(".NET Endpoint Routing") |
| 90 | + subgraph NEXTJS["NodeProxy"] |
| 91 | + DevNext[/"Next.js App<br>(localhost:3000)<br>Runs concurrently"/] |
| 92 | + end |
| 93 | + end |
| 94 | + DevServer -- /* --> Endpoints |
| 95 | + DevServer -- /Identity/* --> Identity |
| 96 | + DevServer -- /* Fallback requests<br>(Proxied) --> DevNext |
| 97 | + DevServer -- /_next HMR<br>(Websocket) --> DevNext |
| 98 | +
|
| 99 | + DevNext:::nextApp |
| 100 | + DevServer:::netHost |
| 101 | + Identity:::static |
| 102 | + Endpoints:::static |
| 103 | + NEXTJS:::static |
| 104 | + classDef netHost fill:#dbeafe,stroke:#1e3a8a,stroke-width:2px,color:#1e3a8a |
| 105 | + classDef nextApp fill:#f3e8ff,stroke:#6b21a8,stroke-width:2px,color:#6b21a8 |
| 106 | + classDef static fill:#ecfdf5,stroke:#047857,stroke-width:2px |
| 107 | +``` |
| 108 | + |
| 109 | +### Production |
| 110 | + |
| 111 | +```mermaid |
| 112 | +--- |
| 113 | +config: |
| 114 | + layout: dagre |
| 115 | + look: neo |
| 116 | + theme: redux |
| 117 | + themeVariables: |
| 118 | + edgeLabelBackground: '#ffffff' |
| 119 | +--- |
| 120 | +flowchart LR |
| 121 | + subgraph PRODUCTION["PRODUCTION"] |
| 122 | + direction LR |
| 123 | + DevServer[(".NET PROJECT<br>(localhost:5001)")] |
| 124 | + Endpoints(".NET Endpoint Routing") |
| 125 | + Identity("ASP.NET Core Identity<br>Razor Pages") |
| 126 | + StaticFiles[/"/wwwroot<br>Serves static files<br>(HTML, CSS, JS)"/] |
| 127 | + end |
| 128 | + DevServer -- /Identity/* --> Identity |
| 129 | + DevServer -- /* --> Endpoints |
| 130 | + DevServer <-- /* Static Files --> StaticFiles |
| 131 | +
|
| 132 | + DevServer:::netHost |
| 133 | + StaticFiles:::static |
| 134 | +
|
| 135 | + classDef netHost fill:#dbeafe,stroke:#1e3a8a,stroke-width:2px,color:#1e3a8a |
| 136 | + classDef nextApp fill:#f3e8ff,stroke:#6b21a8,stroke-width:2px,color:#6b21a8 |
| 137 | + classDef static fill:#ecfdf5,stroke:#047857,stroke-width:2px |
| 138 | +``` |
| 139 | + |
| 140 | +## Next.js React Server Components |
| 141 | + |
| 142 | +### Development |
| 143 | + |
| 144 | +```mermaid |
| 145 | +--- |
| 146 | +config: |
| 147 | + layout: dagre |
| 148 | + look: neo |
| 149 | + theme: redux |
| 150 | + themeVariables: |
| 151 | + edgeLabelBackground: '#ffffff' |
| 152 | +--- |
| 153 | +flowchart LR |
| 154 | + subgraph DEVELOPMENT["DEVELOPMENT"] |
| 155 | + direction LR |
| 156 | + DevServer[(".NET PROJECT<br>(localhost:5001)")] |
| 157 | + Identity("ASP.NET Core Identity<br>Razor Pages") |
| 158 | + Endpoints(".NET Endpoint Routing") |
| 159 | + subgraph NEXTJS["NodeProxy"] |
| 160 | + DevNext[/"Next.js App<br>(localhost:3000)<br>Runs concurrently"/] |
| 161 | + end |
| 162 | + end |
| 163 | + DevServer -- /* --> Endpoints |
| 164 | + DevServer -- /Identity/* --> Identity |
| 165 | + DevServer -- /* Fallback requests<br>(Proxied) --> DevNext |
| 166 | + DevServer -- /_next HMR<br>(Websocket) --> DevNext |
| 167 | +
|
| 168 | + DevNext:::nextApp |
| 169 | + DevServer:::netHost |
| 170 | + Identity:::static |
| 171 | + Endpoints:::static |
| 172 | + NEXTJS:::static |
| 173 | + classDef netHost fill:#dbeafe,stroke:#1e3a8a,stroke-width:2px,color:#1e3a8a |
| 174 | + classDef nextApp fill:#f3e8ff,stroke:#6b21a8,stroke-width:2px,color:#6b21a8 |
| 175 | + classDef static fill:#ecfdf5,stroke:#047857,stroke-width:2px |
| 176 | +``` |
| 177 | + |
| 178 | +### Production |
| 179 | + |
| 180 | +```mermaid |
| 181 | +--- |
| 182 | +config: |
| 183 | + layout: dagre |
| 184 | + look: neo |
| 185 | + theme: redux |
| 186 | + themeVariables: |
| 187 | + edgeLabelBackground: '#ffffff' |
| 188 | +--- |
| 189 | +flowchart LR |
| 190 | + subgraph PRODUCTION["PRODUCTION"] |
| 191 | + direction LR |
| 192 | + DevServer[(".NET PROJECT<br>(localhost:5001)")] |
| 193 | + Identity("ASP.NET Core Identity<br>Razor Pages") |
| 194 | + Endpoints(".NET Endpoint Routing") |
| 195 | + subgraph NEXTJS["NodeProxy"] |
| 196 | + Cache["Static file<br>Managed Cache"] |
| 197 | + DevNext[/"Next.js App<br>(localhost:3000)<br>Runs concurrently"/] |
| 198 | + end |
| 199 | + end |
| 200 | + DevServer -- /* --> Endpoints |
| 201 | + DevServer -- /Identity/* --> Identity |
| 202 | + DevServer -- /* Fallback requests<br>(Proxied) --> Cache --> DevNext |
| 203 | +
|
| 204 | + DevNext:::nextApp |
| 205 | + DevServer:::netHost |
| 206 | + Identity:::static |
| 207 | + Endpoints:::static |
| 208 | + NEXTJS:::static |
| 209 | + classDef netHost fill:#dbeafe,stroke:#1e3a8a,stroke-width:2px,color:#1e3a8a |
| 210 | + classDef nextApp fill:#f3e8ff,stroke:#6b21a8,stroke-width:2px,color:#6b21a8 |
| 211 | + classDef static fill:#ecfdf5,stroke:#047857,stroke-width:2px |
| 212 | +``` |
0 commit comments