Aplikacija za upravljanje inventarom opreme i zaduženjima ("zaduživanjima") za Gorsku službu spašavanja Zenica (GSS Zenica). Omogućava potpuno vođenje inventara spasilačke opreme (CRUD), evidenciju članova i kreiranje zaduženja opreme s rokom za povrat. Prilikom kreiranja zaduženja oprema se automatski oduzima sa stanja, a mobilno prilagođena kontrolna tabla prikazuje sva aktivna i istekla zaduženja.
The project is a full-stack application built with React, Spring Boot, and PostgreSQL.
The repository is structured as a small monorepo:
frontend/: React 19 + Vite UI (na bosanskom jeziku)backend/: Spring Boot 4 APIdocker-compose.yml: local PostgreSQL for developmentdocker-compose.prod.yml: production stack with PostgreSQL, app, and NginxMakefile: common local and production commands
- Inventar (
/inventar): potpuni CRUD nad opremom (karabineri, koloture, spuštalice, užad, lavinska oprema, medicinska oprema itd.) s praćenjem ukupne i dostupne količine. - Članovi (
/clanovi): registar članova službe kojima se dodjeljuju zaduženja. - Zaduženja (
/zaduzenja): kreiranje zaduženja za određenog člana s više stavki opreme i rokom za povrat. Oprema se pri kreiranju oduzima sa stanja, a pri povratu vraća na stanje. - Kontrolna tabla: mobilno prilagođen pregled svih zaduženja s isticanjem aktivnih, zaduženja kojima rok uskoro ističe i onih kojima je rok već istekao.
- Frontend: React, TypeScript, Vite, Vitest
- Backend: Spring Boot 4, Java 17, Maven, JPA
- Database: PostgreSQL 16
- Production runtime: Docker Compose + Nginx
For local development you will typically want:
- Java 17
- Node.js 22
- Docker Desktop or Docker Engine
From the repository root:
make dbThis starts the local PostgreSQL container from docker-compose.yml.
Default local database settings:
- database:
gss_inventory - user:
gss_inventory - password:
gss_inventory - port:
5432
cd backend
./mvnw spring-boot:runOn Windows:
cd backend
.\mvnw.cmd spring-boot:runOn first start the backend seeds a realistic GSS equipment catalogue, members, and example orders (including overdue ones).
In a second terminal:
cd frontend
npm install
npm run devThe Vite dev server proxies /api requests to the backend on localhost:8080.
cd backend
./mvnw testcd frontend
npm ci
npm testcd frontend
npm run buildFrom the repository root:
make help
make db
make build
make up
make down
make restart
make deploy
make logs
make ps
make backupFor production, copy .env.example to .env and set real values:
cp .env.example .envImportant rules:
POSTGRES_PASSWORDandSPRING_DATASOURCE_PASSWORDmust matchSPRING_DATASOURCE_URLmust usepostgresas the host inside Docker Compose
Production deployment uses Docker Compose with three services:
postgresappnginx
Short version:
- Prepare a VM with Docker and Git.
- Clone this repository on the server, usually into
/opt/gss-inventory. - Create a server-side
.envfrom.env.example. - Build and start the stack with:
make build
make up- Verify the stack:
make ps
curl http://localhost/api/inventory- For updates:
make deploy- Production Nginx configuration is selected automatically depending on whether Let's Encrypt certificates exist for
PUBLIC_DOMAIN. - The backend health endpoint is
/actuator/health. - PostgreSQL and the Spring datasource passwords must stay in sync.