# MyOffice

ASP.NET Core API + Angular SPA. This repository has the **source needed to build**, plus Proxmox install scripts. Runnable binaries are **Gitea Releases** (`myoffice-publish.tar.gz`).

## Install on Proxmox (one line)

On the Proxmox host:

```bash
bash -c "$(curl -fsSL https://mygit.ase.com.ua/alexandr/myoffice_public/raw/branch/master/proxmox/myoffice.sh)"
```

Creates an LXC with PostgreSQL + ASP.NET runtime, downloads the latest release, starts the app on port **9100**. Point your nginx LXC at `http://<ct-ip>:9100`.

Optional:

```bash
export GITEA_URL="https://mygit.ase.com.ua"
export GITEA_OWNER="alexandr"
export GITEA_REPO="myoffice_public"
export GITEA_BRANCH="master"
export RELEASE_TAG="latest"   # or v1.2.3
```

Details: [proxmox/README.md](proxmox/README.md).

## Build from source

Requirements: .NET 10 SDK, Node.js 20+.

```bash
./proxmox/publish.sh --tar
# Windows: .\proxmox\publish.ps1 -Tar
```

Output: `_Published/` (API + SPA in `wwwroot`) and optional `myoffice-publish.tar.gz`.

Local development:

```bash
dotnet build MyOffice.Web/MyOffice.Web.csproj
cd MyOffice.SPA && npm install && npm start   # http://localhost:4300
# Run MyOffice.Web (API http://localhost:9100); set FrontEnd:Host to the SPA origin
```

## Demo logins

Seeded on empty DB:

- `user_UAH@user_UAH.userUAH` / `user_UAH` (also USD, EUR variants)
