Files
mxpic_EDA/INTRANET_DEPLOYMENT.md
xsxx03-art 960066735c update
2026-06-04 15:17:02 +08:00

85 lines
2.0 KiB
Markdown

<!--
Description: Project documentation for setup, deployment, and operational guidance.
Inside functions: N/A - documentation content.
Developer : Qin Yue @ 2026
Organization : OptiHK Limited
-->
# mxPIC EDA Intranet Deployment
## Build-Time Router Stack
The Flask server can launch for login, dashboard, canvas editing, YAML
generation, and PDK browsing without importing `mxpic_router` or `mxpic_forge`.
Build actions require `mxpic_router` and Nazca. When `mxpic_forge.Route` is not
available, routing falls back to Nazca `interconnects.Interconnect`; SVG preview
generation also requires `gdstk`.
## Start on the office LAN
1. On the host computer, open PowerShell in this repository.
2. Set a persistent secret key:
```powershell
$env:MXPIC_SECRET_KEY = "replace-with-a-long-random-secret"
```
3. Start the server:
```powershell
.\run_intranet_server.ps1
```
The app listens on `0.0.0.0:3000`, so other users can open:
```text
http://<host-computer-ip>:3000
```
Find the host IP with:
```powershell
ipconfig
```
Use the IPv4 address on the company LAN adapter.
## Windows firewall
If coworkers cannot connect, allow inbound TCP port `3000` on the host computer.
## Accounts
Default local accounts:
```text
admin / 123456
engineer / 123456
```
Change these passwords from the dashboard profile panel before regular use.
Each user stores projects under:
```text
database/<username>/layout
```
## Useful environment variables
```text
MXPIC_HOST=0.0.0.0
MXPIC_PORT=3000
MXPIC_DEBUG=0
MXPIC_SECRET_KEY=<long random string>
MXPIC_COOKIE_SECURE=0
MXPIC_PDK_PUBLIC_ROOT=<path-to-public-foundries>
MXPIC_PDK_ATLAS_ROOT=<path-to-atlas-foundries>
```
Set `MXPIC_COOKIE_SECURE=1` only when serving through HTTPS.
PDK component metadata, GDS assets, and `technology.yml` manifests are all read
from these role-scoped roots. If the variables are not set, the backend defaults
to `../opt_pdk_public/foundries` for normal users/developers and
`../opt_pdk_atlas/foundries` for managers.