= 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 == All demo accounts use the password: '''demo1234''' * '''Admin:''' admin@ecore.mk — full access: create/assign tasks, issue invoices, manage clients and domains. * '''Workers:''' bojan@ecore.mk, marija@ecore.mk, ivana@ecore.mk — execute assigned tasks, log time, upload files. * '''Clients:''' goran@acme.mk, elena@nova.mk, stefan@bluewave.mk — view their own projects, tasks, and invoices. Suggested accounts for the demo: * Log in as '''admin@ecore.mk''' to demonstrate UC0001 (create + assign task) and UC0003 (issue invoice). * Log in as '''goran@acme.mk''' to demonstrate UC0002 (client views project and task status). == 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.