Skip to content
Merged
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
77 changes: 65 additions & 12 deletions QUICK_START.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,47 @@ Before you begin, ensure you have:

## Quick Start Commands

### 🎯 First-Time Setup

1. **Validate Configuration**
```bash
bash start-all-phases.sh --check
```

This validates your environment without starting services. If `.env` files are missing, it will show you how to create them:

```bash
# Copy example files to create your .env files
cp server/.env.example server/.env
cp mini-app/.env.example mini-app/.env

# Edit with your actual configuration
nano server/.env
nano mini-app/.env
```

2. **Install Dependencies**
```bash
bash start-all-phases.sh --install
```

3. **Validate Again**
```bash
bash start-all-phases.sh --check
```

### 🎯 Start Everything (Recommended)
```bash
bash start-all-phases.sh --all
```

This will:
1. Check prerequisites
2. Install dependencies
3. Start backend service
4. Start mini-app with Expo
5. Show service status
2. Validate environment configuration
3. Install dependencies
4. Start backend service
5. Start mini-app with Expo
6. Show service status

### 📊 Check Status
```bash
Expand Down Expand Up @@ -69,14 +99,21 @@ bash start-all-phases.sh --contracts
Before running services, create these `.env` files:

### 1. Server Environment (`server/.env`)

Copy from example:
```bash
cp server/.env.example server/.env
```

Then edit with your values:
```bash
# Server Configuration
PORT=3000

# World ID Configuration
WORLD_APP_ID=app_staging_your_app_id_here
WORLD_APP_API_KEY=api_your_secret_api_key_here
WORLD_ACTION_ID=verify-humanity_your_action_id
WORLD_ACTION_ID=verify-humanity

# Blockchain Configuration
RPC_URL=https://worldchain-mainnet.g.alchemy.com/v2/your-key
Expand All @@ -88,10 +125,17 @@ ZEA_TOKEN_CONTRACT=0x0000000000000000000000000000000000000000
```

### 2. Mini-App Environment (`mini-app/.env`)

Copy from example:
```bash
cp mini-app/.env.example mini-app/.env
```

Then edit with your values:
```bash
# World ID Configuration
WORLD_APP_ID=app_staging_your_app_id_here
WORLD_ACTION_ID=verify-humanity_your_action_id
WORLD_ACTION_ID=verify-humanity

# API Configuration
API_URL=http://localhost:3000
Expand All @@ -102,7 +146,7 @@ RPC_URL=https://worldchain-mainnet.g.alchemy.com/v2/your-key

### 1. Backend API Test
```bash
curl http://localhost:3000
curl http://localhost:3000/health
```

### 2. Mini-App Test
Expand All @@ -126,6 +170,14 @@ cat PHASE_STATUS.md

## Troubleshooting

### Configuration Issues
```bash
# Validate your configuration
bash start-all-phases.sh --check

# If .env files are missing, follow the instructions provided
```

### Port 3000 Already in Use
```bash
# Find process using port 3000
Expand Down Expand Up @@ -162,11 +214,12 @@ All logs are stored in `Logs/` directory:

## Next Steps

1. ✅ Configure `.env` files
2. ✅ Run `bash start-all-phases.sh --all`
3. ✅ Test backend API at http://localhost:3000
4. ✅ Test mini-app on your device
5. ✅ Check `PHASE_STATUS.md` for development roadmap
1. ✅ Run `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`
4. ✅ Test backend API at http://localhost:3000/health
5. ✅ Test mini-app on your device
6. ✅ Check `PHASE_STATUS.md` for development roadmap

## Getting Help

Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,12 @@ Create a `.env` file in both `mini-app/` and `server/` directories:
The easiest way to start all components at once:

```bash
# First-time setup: Validate configuration
bash start-all-phases.sh --check

# Install dependencies only
bash start-all-phases.sh --install

# Start all services (backend + frontend)
bash start-all-phases.sh --all

Expand All @@ -252,8 +258,23 @@ bash start-all-phases.sh --stop # Stop all services
bash start-all-phases.sh --help # Show help
```

**Environment Setup (First Time):**

Before starting services, create your environment configuration files:

```bash
# Copy example files
cp server/.env.example server/.env
cp mini-app/.env.example mini-app/.env

# Edit the files with your actual configuration
nano server/.env
nano mini-app/.env
```

The script will:
- ✅ Check prerequisites (Node.js, npm)
- ✅ Validate environment configuration
- ✅ Install dependencies if needed
- ✅ Start backend verifier service
- ✅ Start mini-app with Expo
Expand Down
21 changes: 21 additions & 0 deletions mini-app/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# =============================================================================
# ZeaZDev Mini App - Environment Configuration
# =============================================================================
# Copy this file to .env and fill in your actual values
# =============================================================================

# World ID Configuration
# Get App ID from https://developer.worldcoin.org/
WORLD_APP_ID=app_staging_your_app_id_here
WORLD_ACTION_ID=verify-humanity

# API Configuration
# URL of your backend verifier service
API_URL=http://localhost:3000

# Blockchain Configuration
# RPC endpoint for reading blockchain data
RPC_URL=https://worldchain-mainnet.g.alchemy.com/v2/your-key

# Optional: Environment
ENVIRONMENT=development
Loading