diff --git a/QUICK_START.md b/QUICK_START.md index ce3674e..cdd7728 100644 --- a/QUICK_START.md +++ b/QUICK_START.md @@ -11,10 +11,27 @@ Before you begin, ensure you have: ## Quick Start Commands -### 🎯 First-Time Setup +### ⚡ Fastest Way - Using npm + +The simplest way to get started using npm scripts: + +```bash +# 1. Validate configuration +npm run check + +# 2. Install dependencies +npm run install:all + +# 3. Start all services +npm start +``` + +### 🎯 First-Time Setup (Detailed) 1. **Validate Configuration** ```bash +npm run check +# or bash start-all-phases.sh --check ``` @@ -32,16 +49,24 @@ nano mini-app/.env 2. **Install Dependencies** ```bash +npm run install:all +# or bash start-all-phases.sh --install ``` 3. **Validate Again** ```bash +npm run check +# or bash start-all-phases.sh --check ``` ### 🎯 Start Everything (Recommended) ```bash +npm start +# or +npm run start:all +# or bash start-all-phases.sh --all ``` @@ -55,6 +80,8 @@ This will: ### 📊 Check Status ```bash +npm run status +# or bash start-all-phases.sh --status ``` @@ -65,6 +92,8 @@ Shows: ### 🛑 Stop All Services ```bash +npm run stop +# or bash start-all-phases.sh --stop ``` @@ -72,6 +101,8 @@ Cleanly stops all running services. ### 📦 Install Dependencies Only ```bash +npm run install:all +# or bash start-all-phases.sh --install ``` @@ -81,11 +112,15 @@ Installs dependencies without starting services. ### Backend Only ```bash +npm run start:backend +# or bash start-all-phases.sh --backend ``` ### Frontend Only ```bash +npm run start:frontend +# or bash start-all-phases.sh --frontend ``` @@ -187,6 +222,8 @@ lsof -i :3000 kill -9 # Or use the stop command +npm run stop +# or bash start-all-phases.sh --stop ``` @@ -196,6 +233,8 @@ bash start-all-phases.sh --stop npm cache clean --force # Try installing again +npm run install:all +# or bash start-all-phases.sh --install ``` @@ -214,9 +253,9 @@ All logs are stored in `Logs/` directory: ## Next Steps -1. ✅ Run `bash start-all-phases.sh --check` to validate setup +1. ✅ Run `npm run check` (or `bash start-all-phases.sh --check`) to validate setup 2. ✅ Configure `.env` files using the `.env.example` templates -3. ✅ Run `bash start-all-phases.sh --all` +3. ✅ Run `npm start` (or `bash start-all-phases.sh --all`) 4. ✅ Test backend API at http://localhost:3000/health 5. ✅ Test mini-app on your device 6. ✅ Check `PHASE_STATUS.md` for development roadmap @@ -224,7 +263,10 @@ All logs are stored in `Logs/` directory: ## Getting Help ```bash -# Show all available options +# Show all available npm scripts +npm run + +# Show all script options bash start-all-phases.sh --help ``` diff --git a/README.md b/README.md index af8d283..bebc3e2 100644 --- a/README.md +++ b/README.md @@ -236,9 +236,32 @@ Create a `.env` file in both `mini-app/` and `server/` directories: #### Quick Start - All Phases (Recommended) -**Automated Startup Script** +**Automated Startup with npm (Easiest)** -The easiest way to start all components at once: +The simplest way to start all components using npm scripts: + +```bash +# First-time setup: Validate configuration +npm run check + +# Install dependencies for all components +npm run install:all + +# Start all services (backend + frontend) +npm start +# or +npm run start:all + +# Or for specific components: +npm run start:backend # Backend only +npm run start:frontend # Frontend only +npm run status # Check status +npm run stop # Stop all services +``` + +**Alternative: Direct Script Usage** + +You can also run the script directly: ```bash # First-time setup: Validate configuration diff --git a/package-lock.json b/package-lock.json index 24457bb..e950984 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "demo-repo", - "version": "0.2.0", + "name": "zeazdev", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "demo-repo", - "version": "0.2.0", + "name": "zeazdev", + "version": "1.0.0", "license": "MIT", "dependencies": { "@primer/css": "17.0.1" diff --git a/package.json b/package.json index 40427d6..6a08edb 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,20 @@ { - "name": "demo-repo", - "version": "0.2.0", - "description": "A sample package.json", + "name": "zeazdev", + "version": "1.0.0", + "description": "ZeaZDev - World App Mini App with World ID verification for Sybil-resistant rewards and DeFi features", + "scripts": { + "start": "bash start-all-phases.sh --all", + "start:all": "bash start-all-phases.sh --all", + "start:backend": "bash start-all-phases.sh --backend", + "start:frontend": "bash start-all-phases.sh --frontend", + "check": "bash start-all-phases.sh --check", + "install:all": "bash start-all-phases.sh --install", + "status": "bash start-all-phases.sh --status", + "stop": "bash start-all-phases.sh --stop" + }, "dependencies": { "@primer/css": "17.0.1" }, + "author": "PHIPHAT PHOEMSUK (ZeaZDev)", "license": "MIT" }