Skip to main content

Overview

PhotoFlow is designed to work in offline network environments where multiple PCs need to access the same photography order management system. This guide explains how to set up the server-client architecture for your team.

The Problem PhotoFlow Solves

Many photography studios face these challenges:
  • No internet access - Working in environments without internet connectivity
  • Multiple workstations - Team members working from different PCs
  • Synchronization issues - Excel/spreadsheet conflicts when multiple users edit simultaneously
  • Real-time updates - Need to see changes immediately without manual refreshing
PhotoFlow solves this using a client-server architecture with Socket.io for real-time sync.

Architecture

1

Server PC

One PC runs the PhotoFlow server:
  • Hosts the application
  • Runs the PostgreSQL database
  • Handles all data operations
  • Broadcasts updates via Socket.io
2

Client PCs

Other PCs connect as clients:
  • Access via web browser
  • Send requests to server
  • Receive real-time updates
  • No local database needed
3

Real-Time Sync

Socket.io keeps all PCs synchronized:
  • Changes made on any PC
  • Saved to central database
  • Broadcast to all clients
  • All PCs update automatically
┌───────────────────────────┐
│     Local Network (Offline)    │
│                                │
│  ┌────────────────────┐  │
│  │   Server PC          │  │
│  │   - PhotoFlow App    │  │
│  │   - PostgreSQL       │  │
│  │   - Socket.io        │  │
│  │   192.168.1.100      │  │
│  └────────────────────┘  │
│           │                   │
│           │                   │
│  ┌────────┼───────────┐  │
│  │        │           │  │
│  v        v           v  │
│ PC 1    PC 2       PC 3  │
│ (Web Browser Access)      │
└───────────────────────────┘
No internet connection required! All communication happens within your local network.

Server Setup

Configure the PC that will act as the server:
1

Choose Server PC

Select a PC that:
  • Will remain powered on during work hours
  • Has adequate resources (see Requirements)
  • Is accessible to all team PCs on the network
  • Has a static or consistent IP address (recommended)
2

Find Server IP Address

Determine the server’s IP address:
ipconfig
Look for “IPv4 Address” under your active network adapter.
Your server IP will typically be in one of these ranges:
  • 192.168.x.x (most common for home/office networks)
  • 10.x.x.x
  • 172.16.x.x - 172.31.x.x
3

Configure Static IP (Recommended)

Set a static IP to prevent the server address from changing:Router method (preferred):
  1. Access your router’s admin interface
  2. Find DHCP settings
  3. Reserve the IP for your server’s MAC address
OS method: Configure static IP in network settings:
  • Windows: Network Settings → Change adapter options
  • Linux: Edit /etc/netplan/ or /etc/network/interfaces
  • macOS: System Preferences → Network → Advanced
4

Configure Firewall

Allow incoming connections on PhotoFlow’s port:
netsh advfirewall firewall add rule name="PhotoFlow" dir=in action=allow protocol=TCP localport=4173
Or use Windows Firewall GUI:
  1. Open Windows Defender Firewall
  2. Advanced Settings → Inbound Rules
  3. New Rule → Port → TCP 4173
Default port is 4173 for production build. Use 5173 for development mode, or 3000 if configured in Docker.
5

Start PhotoFlow with Network Access

Launch PhotoFlow with the --host flag:
npm run preview -- --host
You should see:
➜  Local:   http://localhost:4173/
➜  Network: http://192.168.1.100:4173/
The --host flag is REQUIRED for network access. Without it, only the server PC can access PhotoFlow.
6

Configure Socket.io URL

Set the Socket.io connection URL in .env:
.env
VITE_SOCKET_URL="http://192.168.1.100:4173"
Replace 192.168.1.100 with your actual server IP.Then rebuild:
npm run build
npm run preview -- --host

Client Setup

Configure PCs that will access PhotoFlow as clients:
1

Verify Network Connection

Ensure the client PC is on the same network as the server.Test connectivity:
ping 192.168.1.100
You should see successful ping responses.
2

Access PhotoFlow

Open a web browser and navigate to:
http://192.168.1.100:4173
Replace 192.168.1.100 with your server’s IP.
3

Bookmark the URL

Save the URL as a bookmark for easy access.
Create a desktop shortcut:
  • Chrome/Edge: More Tools → Create Shortcut
  • Firefox: Drag URL to desktop
4

Verify Real-Time Sync

Test that updates sync correctly:
  1. Create a task on the client PC
  2. Check the server PC - task should appear immediately
  3. Move a task on the server PC
  4. Check the client PC - it should update without refresh

Network Requirements

Same Network

All PCs must be connected to the same local network (same router/switch).

TCP/IP

PCs must be able to communicate via TCP/IP (standard for all networks).

No Internet Required

PhotoFlow works completely offline - no internet connection needed.

Port Access

Port 4173 (or configured port) must be accessible on the server PC.

Testing Network Setup

Connectivity Test

From a client PC:
# Test if server is reachable
ping 192.168.1.100

# Test if port is open (requires telnet)
telnet 192.168.1.100 4173

# Or use curl
curl http://192.168.1.100:4173

Browser Test

  1. Open browser on client PC
  2. Navigate to http://[server-ip]:4173
  3. Should see PhotoFlow dashboard
  4. Check browser console (F12) for errors

Real-Time Sync Test

1

Open Two Windows

Open PhotoFlow in two different browsers or PCs.
2

Create Task

Create a new task in one window.
3

Verify Sync

The task should appear in the other window within 1-2 seconds without refreshing.
4

Test Drag-Drop

Drag a task to a different column in one window. Verify it moves in the other window automatically.
If sync doesn’t work, check Socket.io connection in browser console.

Troubleshooting

  1. Verify server PC IP address hasn’t changed
  2. Check server PC is running PhotoFlow with --host
  3. Test connectivity: ping [server-ip]
  4. Verify firewall allows port 4173
  5. Ensure both PCs are on same network/subnet
  6. Try accessing from server PC first: http://localhost:4173
  1. Check VITE_SOCKET_URL in .env on server
  2. Verify URL uses server IP, not “localhost”
  3. Rebuild after changing .env: npm run build
  4. Check browser console for Socket.io errors
  5. Test WebSocket connection isn’t blocked by proxy/firewall
  1. Check network stability (weak WiFi signal?)
  2. Verify no network equipment is blocking WebSocket
  3. Check server PC isn’t going to sleep
  4. Review server logs for errors
  1. Check network bandwidth/speed
  2. Verify server PC has adequate resources
  3. Reduce number of concurrent users
  4. Consider upgrading server hardware
  5. Check for network congestion
If PCs are on different subnets (e.g., 192.168.1.x and 192.168.2.x):
  1. Configure router to allow inter-subnet routing
  2. Or connect all PCs to same subnet
  3. Verify firewall rules allow cross-subnet traffic

Security Considerations

Trusted Network Only

Only deploy on trusted internal networks. PhotoFlow doesn’t include authentication by default.

Firewall Configuration

Restrict port access to your local network only. Don’t expose to the internet.

Database Security

Use strong database passwords. Don’t use defaults in production.

Physical Security

Secure physical access to the server PC. It contains all business data.
PhotoFlow is designed for trusted internal networks. Don’t expose it to the internet without adding proper authentication and HTTPS.

Advanced Configuration

Using a Different Port

Change the port in package.json or use the flag:
npm run preview -- --port 3000 --host
Update firewall and VITE_SOCKET_URL accordingly.

Multiple Server Instances

For redundancy, you could run multiple instances:
  • Primary server on PC 1
  • Backup server on PC 2
  • Switch DNS/hosts file if primary fails
This requires additional configuration for database replication, which is beyond PhotoFlow’s default setup.

Load Balancing

For very large teams (20+ users):
  • Use a reverse proxy (nginx/HAProxy)
  • Balance load across multiple app instances
  • Use a shared PostgreSQL database
  • Configure Socket.io for clustering

Network Diagram Example

Office Network: 192.168.1.0/24

┌──────────────────────────────────────┐
│  Router (192.168.1.1)                    │
│  - No internet connection                │
│  - DHCP: 192.168.1.100-200               │
└──────────────────────────────────────┘

     ┌────────┼────────────┐
     │        │             │
     v        v             v

  Server   Client 1    Client 2
   PC       PC          PC

.100:4173  Browser     Browser
PhotoFlow  Access      Access
+ Database

Next Steps

Environment Variables

Configure VITE_SOCKET_URL and other settings

Production Checklist

Security and performance best practices

Kanban Board

Learn about real-time synchronization features

Docker Deployment

Deploy with containers for easier management

Build docs developers (and LLMs) love