= Build Instructions = == Development environment == * Node.js 20+ and npm * PostgreSQL client (psql) for running the SQL scripts * SSH access to the faculty database server (credentials in EPRMS → Databases) * Operating system: macOS / Linux / Windows == Required software == * Node.js and npm (frontend + backend) * An SSH client (built into macOS/Linux; on Windows use OpenSSH or PuTTY) == Build instructions == 1. Install dependencies: {{{ cd server && npm install cd ../client && npm install }}} 2. Create `server/.env` with the faculty database connection (values from EPRMS → Databases): {{{ DATABASE_URL="postgresql://:@localhost:5433/?schema=project" SSH_HOST= SSH_USER= SSH_PASSWORD= }}} 3. Generate the Prisma client: {{{ cd server && npx prisma generate }}} 4. (First time only) create the schema and load sample data through the tunnel: {{{ psql "" -f database/schema_creation.sql psql "" -f database/data_load.sql }}} == Testing instructions == 1. Open the SSH tunnel to the faculty database (keep this terminal open): {{{ ./tunnel.sh }}} The tunnel forwards local port 5433 to the faculty database's PostgreSQL port. 2. Start the backend (second terminal): {{{ cd server && npm run dev }}} 3. Start the frontend (third terminal): {{{ cd client && npm run dev }}} 4. Open the application at '''http://localhost:5174''' == Demo login == * '''Admin:''' admin@ecore.mk / demo1234 * The Admin account can create and assign tasks, and issue invoices. * Client and Worker accounts are also seeded in project.users to demonstrate the client-view and worker flows. == Main features to test == * '''Create + assign a task (UC0001):''' Tasks → New Task → choose client, project, worker → Add Task. * '''Client project view (UC0002):''' log in as a client to see their own projects and task status. * '''Issue an invoice (UC0003):''' Invoices → pick a client, add line items → the system computes subtotal, tax, and total.