Overview
This guide walks you through setting up PhotoFlow on your local machine. This setup is ideal for:- Development and testing
- Single-user installations
- Evaluating PhotoFlow before production deployment
- Learning how PhotoFlow works
For production multi-PC deployments, see the Docker deployment guide or network setup guide.
Prerequisites
Before you begin, ensure you have:- Node.js 20+ installed (check requirements)
- PostgreSQL 15+ installed and running
- Git (optional, for cloning the repository)
- Terminal/Command Prompt access
Installation Steps
Clone the Repository
Download PhotoFlow from GitHub:
Alternative: Download ZIP
Alternative: Download ZIP
If you don’t have Git installed:
- Go to github.com/DomenicWalther/PhotoFlow
- Click the green “Code” button
- Select “Download ZIP”
- Extract the ZIP file
- Open terminal in the extracted folder
Install Dependencies
Install all required npm packages:This installs:
- SvelteKit - Web framework
- Prisma - Database ORM
- Socket.io - Real-time communication
- TailwindCSS - Styling framework
- All other dependencies defined in
package.json
Configure Environment Variables
Create a Add your database configuration:Connection string format:Replace with your PostgreSQL credentials:
.env file in the project root directory:.env
photoflow- your database usernamephotoflow_password- your database passwordlocalhost- database host (uselocalhostfor local setup)5432- PostgreSQL port (default is 5432)photoflow- database name
Create Database User and Database
Set up PostgreSQL for PhotoFlow:In the PostgreSQL shell:
Windows PostgreSQL Setup
Windows PostgreSQL Setup
On Windows, access PostgreSQL differently:Then run the same SQL commands above.
Generate Prisma Client
Generate the Prisma client for type-safe database access:This creates the
@prisma/client package based on your schema.Run Database Migrations
Create the database schema:This command:
- Creates the database if it doesn’t exist
- Generates migration files in
prisma/migrations/ - Creates the
Tasksandtask_commentstables - Applies all migrations to your database
Build the Application
Compile PhotoFlow for production:This:
- Compiles SvelteKit components
- Bundles JavaScript and CSS
- Optimizes assets for production
- Generates the
build/directory
Start PhotoFlow
Launch the application:You should see:
The
--host flag enables network access, allowing other PCs to connect. Omit this flag for localhost-only access.Development Mode
For development with hot module replacement:- Hot Module Replacement (HMR) - See changes instantly
- Source maps - Better debugging
- Fast refresh - No full page reloads
http://localhost:5173 by default.
Database Management
View Database with Prisma Studio
Prisma Studio provides a GUI for your database:http://localhost:5555 to:
- View all tasks and comments
- Edit data directly
- Test queries
- Explore relationships
Reset Database
- Drop the database
- Recreate it
- Apply all migrations
- Run seed scripts (if configured)
Create New Migrations
After modifyingprisma/schema.prisma:
Project Structure
Understand PhotoFlow’s directory layout:Useful Commands
Package Management
Development
Code Quality
Database
Verification
Verify your installation is working:Create a Test Task
- Click ”+ Neue Aufgabe hinzufügen” in any column
- Fill in task details
- Save and verify it appears on the board
Next Steps
Network Setup
Configure multi-PC access for your team
Environment Variables
Learn about all configuration options
Kanban Board
Explore the Kanban workflow features
Docker Deployment
Deploy for production use
Troubleshooting
Error: Cannot find module '@prisma/client'
Error: Cannot find module '@prisma/client'
Run:
Error: P1001 - Can't reach database server
Error: P1001 - Can't reach database server
- Ensure PostgreSQL is running:
- Check your
DATABASE_URLin.env - Verify database credentials are correct
Error: Port 4173 already in use
Error: Port 4173 already in use
Use a different port:
Error: Migration failed
Error: Migration failed
Reset and recreate migrations:
Build errors after npm install
Build errors after npm install
Clear cache and reinstall:
Socket.io connection errors
Socket.io connection errors
If real-time sync isn’t working:
- Check browser console for errors
- Ensure VITE_SOCKET_URL is correct (optional, defaults to window.location)
- Verify no proxy or firewall is blocking WebSocket connections