Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
158 changes: 158 additions & 0 deletions DEPLOYMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# Deployment

## App

```text
Name: AROS
Repo: Shreai/aros
Runtime: Node.js >=20, pnpm 9.15.4, Turbo, PM2 on remote hosts
Build command: pnpm build
Dev command: pnpm dev
Serve command: pnpm serve
Deploy workflow: .github/workflows/deploy.yml
```

## Local Development

```powershell
pnpm install
pnpm dev
```

Build:

```powershell
pnpm build
```

Checks:

```powershell
pnpm typecheck
pnpm lint
```

## Environments

GitHub environments already created:

| Environment | URL | Deploy target | Secrets namespace |
|---|---|---|---|
| dev | `https://dev.aros.live` | staging host / `aros-dev` PM2 app | `shre/aros/dev/*` |
| qa-beta | `https://beta.aros.live` | staging host / `aros-beta` PM2 app | `shre/aros/qa-beta/*` |
| production | `https://aros.live` | production host / `aros-prod` PM2 app | `shre/aros/production/*` |

The existing deploy workflow uses `target_env` values:

```text
staging
prod
```

Map those to the platform model:

```text
staging -> qa-beta and dev routes
prod -> production
```

## Deployment Workflow

Manual deploy:

```text
GitHub Actions -> Deploy AROS -> target_env: staging or prod
```

The workflow:

```text
resolves target host
validates runtime ownership
syncs source to /opt/aros-platform
runs pnpm install/build where appropriate
restarts PM2 apps
validates environment mapping
runs route health checks
```

## Required GitHub Secrets

Current deploy workflow expects:

```text
AROS_MAIN_SSH_HOST
AROS_STAGING_SSH_HOST
AROS_SSH_PRIVATE_KEY
```

These should be backed by or migrated to:

```text
shre-secrets :5473
```

Namespace pattern:

```text
shre/aros/<environment>/<secret-name>
```

Examples:

```text
shre/aros/qa-beta/ssh-host
shre/aros/qa-beta/ssh-private-key
shre/aros/production/ssh-host
shre/aros/production/supabase-url
```

## Signup / Access Mode

Recommended current mode:

```text
Signup mode: private beta / customer-specific onboarding
Auth: Shre/AROS auth provider
Public self-signup: disabled until commercial launch
Workspace creation: admin-created
API keys: workspace-scoped only
```

Future public SaaS mode:

```text
email/OAuth signup -> email verification -> workspace creation -> plan/trial gate -> scoped integrations
```

## Release

AROS is currently deployed as a hosted web platform, not as a downloadable app.

Recommended channel model:

```text
feature branches -> CI only
main -> staging candidate
beta tags -> qa-beta release
v* tags -> production release
```

## Rollback

Minimum rollback path:

```text
redeploy previous commit through GitHub Actions
or SSH to host and roll PM2 app back to previous source/release
```

Before broader production use, define:

```text
previous release marker
database rollback/backup process
PM2 rollback command
Cloudflare route rollback
post-rollback smoke checks
```
50 changes: 50 additions & 0 deletions OWNERSHIP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Ownership

## Identity

```text
App name: AROS
Full name: Agentic Retail Operating System
GitHub owner/repo: Shreai/aros
Business owner: Shre AI
Technical owner: Shre AI / AROS platform owner
Product family: aros-retail
App type: web-app / retail operating platform
Visibility: public source, proprietary license
Status: active
```

## Environments

```text
Dev URL: https://dev.aros.live
QA/Beta URL: https://beta.aros.live
Production URL: https://aros.live
Download URL: Not a downloadable app by default
```

## Operations

```text
Deployment target: VPS/PM2 via GitHub Actions deploy workflow
Secrets namespace: shre/aros
Logs: PM2 logs on deployment hosts and GitHub Actions logs
Monitoring: deploy workflow health checks and public route smoke checks
Rollback owner: Shre AI / AROS platform owner
Support contact: Shre AI / AROS platform owner
```

## Data

```text
Data classification: customer retail operations and business intelligence data
Production database: production Supabase project configured in deployment workflow
Backup location: TBD per Supabase/host backup policy
Retention policy: TBD before broader production rollout
```

## Repo Notes

`Nirpat3/aros` was transferred to `Shreai/aros` on 2026-07-07 and is now the
canonical AROS source repository. Older public copies remain under `Nirlabinc`
and `RapidInfosoft` until branch/release comparisons are complete.
Loading