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
1 change: 1 addition & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ services:
- TENANT_ENCRYPTION_KEY=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
- AUTO_INIT_DB=true
- INIT_ADMIN_EMAIL=admin@demo.local
- INIT_ADMIN_PASSWORD=demo1234
- DEBUG=true
- PORT=8485
ports:
Expand Down
36 changes: 27 additions & 9 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,36 @@ for i in $(seq 1 30); do
sleep 2
done

# Initialize the database (creates schemas, seeds admin user)
echo "Initializing database..."
# Initialize master database (creates schema + platform admin user)
echo "Initializing master database..."
python -m app.scripts.init_db || echo "DB init skipped (may already exist)."

# Seed demo tenant with sample data
echo "Seeding demo tenant..."
python -m app.scripts.seed_demo || echo "Demo seed skipped (may already exist)."

echo ""
echo "=============================================="
echo " Setup complete!"
echo "=============================================="
echo ""
echo " Start the app:"
echo " uvicorn app.main:app --host 0.0.0.0 --port 8485 --reload"
echo ""
echo " Start frontend dev server (optional):"
echo " cd frontend && npm run dev -- --host 0.0.0.0 --port 3333"
echo ""
echo " ---- Demo Credentials ----"
echo ""
echo "=== Setup complete! ==="
echo " Admin Portal: http://localhost:8485/admin/"
echo " Email: admin@demo.local"
echo " Password: demo1234"
echo ""
echo "Start the app: uvicorn app.main:app --host 0.0.0.0 --port 8485 --reload"
echo "Start frontend: cd frontend && npm run dev -- --host 0.0.0.0 --port 3333"
echo "Run backend tests: pytest"
echo "Run frontend tests: cd frontend && npm test"
echo " Demo Tenant: http://localhost:8485/t/demo/"
echo " Email: admin@demo.local"
echo " Password: demo1234"
echo ""
echo "Admin portal: http://localhost:8485/admin/"
echo "Login: admin@demo.local (check logs for password)"
echo " The demo tenant includes 4 projects, 8 staff,"
echo " 8 equipment items, skills, and assignments."
echo "=============================================="
echo ""
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ A comprehensive R&D project management platform for multi-site organizations.

### Option 1: GitHub Codespaces (Recommended for Demo)

Click the button above or go to [codespaces.new/vincentmakes/milestone-planner](https://codespaces.new/vincentmakes/milestone-planner?quickstart=1) to launch a fully configured development environment with PostgreSQL, Python, Node.js, and VS Code extensions.
Click the badge above to launch a fully configured environment with PostgreSQL, Python, Node.js, and a pre-seeded demo tenant.

After the Codespace starts:
After the Codespace starts, run:

```bash
# Start the backend
Expand All @@ -40,6 +40,15 @@ uvicorn app.main:app --host 0.0.0.0 --port 8485 --reload
cd frontend && npm run dev -- --host 0.0.0.0 --port 3333
```

The Codespace automatically creates a demo tenant with sample data:

| Access | URL | Email | Password |
|--------|-----|-------|----------|
| **Admin Portal** | `/admin/` | `admin@demo.local` | `demo1234` |
| **Demo Tenant** | `/t/demo/` | `admin@demo.local` | `demo1234` |

The demo tenant includes 2 sites (Winterthur, Frankfurt), 4 projects with phases and assignments, 8 staff members with skills, and 8 equipment items. All staff accounts use password `demo1234`.

### Option 2: Docker Fresh Install

```bash
Expand Down
Loading
Loading