You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(setup): one-command developer setup via npm run setup
Adds an additive setup orchestrator that installs deps, builds the wizard,
bootstraps .env, starts backend + frontend, completes the installation wizard
headlessly, creates a default admin account, and opens the login page — all
from a single command. Non-technical contributors can go from `git clone` to
a working login screen with no manual steps.
New
- scripts/dev.js — orchestrator with HTTP-based wizard auto-completion,
MongoDB probe with retry, defensive .env patching, credentials banner.
- nodemon.json — explicit watch list (server-side dirs / .js only) so wizard
writes to installationSteps.json no longer restart the backend mid-request
(root cause of the "wizard reloads on MongoDB step" bug).
- package.json — `setup`, `dev`, `setup:reset` scripts + nodemon devDep.
Wizard improvements (back-compat preserving)
- Modules/CheckInstallStep/controller.js: `isDoItLater` support added for
Firebase (step 4) and SMTP (step 6), mirroring the existing AI (step 5)
skip pattern. Both steps remain mandatory unless the caller opts in.
- Defensive APIURL fallback at module-load (was crashing the backend on
fresh clones if .env hadn't loaded yet — TypeError on .substring of
undefined).
.env.example
- SERVICE_FILE corrected from "../firebase-adminsdk.json" to
"./firebase-adminsdk.json" (the prior default tripped the BUG-036
path-traversal guard and blocked the Firebase wizard step).
- Quick-start comment block at the top.
Nothing existing changes
- `npm start`, `npm run nodemon`, `npm run basic-install`, the interactive
wizard, and the documented manual setup paths are all untouched.
- New scripts never run automatically; users must invoke them explicitly.
- Fallback chain at every failure point (MongoDB unreachable / auto-setup
error / --manual flag) opens the interactive wizard UI so the user is
never left in an unrecoverable state.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
That's it. **No technical knowledge required.**`npm run setup` will:
53
+
54
+
1. Install all dependencies (root, frontend, wizard) in parallel
55
+
2. Generate a `.env` file with secure random secrets
56
+
3. Build the installation wizard UI
57
+
4. Start the backend and frontend dev server
58
+
5.**Auto-complete the installation wizard** — connects to MongoDB, sets up storage, skips optional services (Firebase / AI / SMTP), initializes the database, and creates an admin account
**Prerequisite:** MongoDB running locally on `mongodb://localhost:27017`. If you don't have it: `docker run -d -p 27017:27017 mongo:7` or download from [mongodb.com](https://www.mongodb.com/try/download/community).
78
+
79
+
### Available commands
80
+
81
+
| Command | What it does |
82
+
|---------|--------------|
83
+
|`npm run setup`| Full setup — install, configure, start, auto-complete wizard, open browser |
84
+
|`npm run dev`| Fast restart — skips install, just starts the services |
85
+
|`npm run setup:reset`| Wipe `node_modules` and reinstall everything |
86
+
|`npm run setup -- --manual`| Skip auto-setup — open the interactive wizard instead |
87
+
|`npm run setup -- --no-open`| Start without auto-opening a browser |
88
+
89
+
### Custom admin credentials
90
+
91
+
```bash
92
+
SETUP_ADMIN_EMAIL=you@example.com SETUP_ADMIN_PASSWORD=secret npm run setup
93
+
```
94
+
95
+
Other env-var overrides: `SETUP_ADMIN_FIRST`, `SETUP_ADMIN_LAST`, `SETUP_COMPANY`, `SETUP_PHONE`, `SETUP_COUNTRY`, `SETUP_CITY`, `SETUP_STATE`.
96
+
97
+
> **Manual setup still works.** Everything above is an additive convenience layer. All existing scripts (`npm start`, `npm run nodemon`, `npm run basic-install`, etc.) and the original interactive wizard are unchanged. If `npm run setup` ever fails it falls back automatically to the wizard UI so you can finish manually.
98
+
99
+
---
100
+
44
101
## What is AlianHub?
45
102
46
103
**AlianHub** is a full-stack, open-source project management system designed for teams that require flexibility, transparency, and ownership over their workflows.
0 commit comments