refactor: convert repository to monorepo with npm workspaces

Restructured the repository into a monorepo to better organize application code
and maintenance scripts.

## Workspace Structure
- web-app: Next.js application (all app code moved from root)
- housekeeping: Database backup and maintenance scripts

## Key Changes
- Moved all application code to web-app/ using git mv
- Moved database scripts to housekeeping/ workspace
- Updated Dockerfile for monorepo build process
- Updated docker-compose files (volume paths: ./web-app/etc/hosts/)
- Updated .gitignore for workspace-level node_modules
- Updated documentation (README.md, CLAUDE.md, CHANGELOG.md)

## Migration Impact
- Root package.json now manages workspaces
- Build commands delegate to web-app workspace
- All file history preserved via git mv
- Docker build process updated for workspace structure

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Knee Cola
2025-12-25 12:13:04 +01:00
parent 321267a848
commit 57dcebd640
170 changed files with 9027 additions and 137 deletions

View File

@@ -20,7 +20,10 @@
"mcp__context7__resolve-library-id", "mcp__context7__resolve-library-id",
"mcp__context7__get-library-docs", "mcp__context7__get-library-docs",
"mcp__serena__create_text_file", "mcp__serena__create_text_file",
"Bash(curl:*)" "Bash(curl:*)",
"Bash(git mv:*)",
"Bash(rmdir:*)",
"Bash(mkdir:*)"
] ]
}, },
"enableAllProjectMcpServers": true, "enableAllProjectMcpServers": true,

6
.gitignore vendored
View File

@@ -1,14 +1,16 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies # dependencies
/node_modules node_modules
/.pnp /.pnp
.pnp.js .pnp.js
# testing # testing
/coverage /coverage
# next.js # next.js (in web-app workspace)
web-app/.next/
web-app/out/
/.next/ /.next/
/out/ /out/

View File

@@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Changed
- **Monorepo Architecture**: Converted repository to monorepo structure with npm workspaces
- `web-app/` - Main Next.js application (formerly root directory)
- `housekeeping/` - Database backup and maintenance scripts
- **Docker Configuration**: Updated Dockerfile and docker-compose files for monorepo build process
- **Build Process**: Updated to use workspace-aware npm commands
- **Documentation**: Updated README.md and CLAUDE.md to reflect new structure
### Migration Notes
- All application code moved to `web-app/` workspace using `git mv` to preserve history
- All database backup scripts moved to `housekeeping/` workspace
- Docker builds now install dependencies at root level and build from `web-app/` workspace
- Volume mounts in docker-compose updated to reference `web-app/etc/hosts/`
- `.gitignore` updated to handle `node_modules` at any workspace level
- Root `package.json` now manages workspaces and delegates commands to appropriate workspace
## [2.17.0] - 2025-12-21 ## [2.17.0] - 2025-12-21
### Changed ### Changed

View File

@@ -2,15 +2,33 @@
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Monorepo Structure
This is a monorepo with the following workspaces:
- **web-app**: Next.js 14 utility bills tracking application
- **housekeeping**: Database backup and maintenance scripts
## Development Commands ## Development Commands
- `npm run dev` - Start development server (Next.js) From the monorepo root:
- `npm run dev` - Start development server (runs web-app workspace)
- `npm run build` - Build production version (builds web-app workspace)
- `npm start` - Start production server (runs web-app workspace)
- `npm run prettier` - Format code with Prettier (entire monorepo)
- `npm run prettier:check` - Check code formatting (entire monorepo)
From the web-app workspace (`cd web-app`):
- `npm run dev` - Start development server
- `npm run build` - Build production version - `npm run build` - Build production version
- `npm start` - Start production server - `npm start` - Start production server
- `npm run prettier` - Format code with Prettier
- `npm run prettier:check` - Check code formatting
- `npm run seed` - Seed database with initial data - `npm run seed` - Seed database with initial data
From the housekeeping workspace (`cd housekeeping`):
- `npm run backup:standalone` - Run standalone database backup
- `npm run backup:swarm` - Run swarm database backup
- `npm run dump:standalone` - Run standalone database dump
- See housekeeping/README.md for more details
## Deployment Commands ## Deployment Commands
- `./build.sh` - Build Docker image for deployment - `./build.sh` - Build Docker image for deployment
@@ -31,25 +49,26 @@ This is a Next.js 14 utility bills tracking application ("Evidencija Režija") w
### Core Architecture Patterns ### Core Architecture Patterns
**Multi-user Data Isolation**: All database operations use the `withUser` higher-order function from `app/lib/auth.ts:102` to automatically inject authenticated user ID into queries, ensuring data isolation between users. **Multi-user Data Isolation**: All database operations use the `withUser` higher-order function from `web-app/app/lib/auth.ts:102` to automatically inject authenticated user ID into queries, ensuring data isolation between users.
**Server Actions Pattern**: Form handling uses Next.js Server Actions with Zod validation. Actions are defined in `app/lib/actions/` and follow the pattern: **Server Actions Pattern**: Form handling uses Next.js Server Actions with Zod validation. Actions are defined in `web-app/app/lib/actions/` and follow the pattern:
```typescript ```typescript
export const actionName = withUser(async (user: AuthenticatedUser, ...args) => { export const actionName = withUser(async (user: AuthenticatedUser, ...args) => {
// Server action implementation with automatic user context // Server action implementation with automatic user context
}); });
``` ```
**Internationalization**: Uses next-intl with locale-based routing. Messages are in `messages/` directory. The middleware handles both auth and i18n routing. **Internationalization**: Uses next-intl with locale-based routing. Messages are in `web-app/messages/` directory. The middleware handles both auth and i18n routing.
### Key Files & Responsibilities ### Key Files & Responsibilities
- `middleware.ts` - Handles authentication and i18n routing, defines public pages - `web-app/middleware.ts` - Handles authentication and i18n routing, defines public pages
- `app/lib/auth.ts` - NextAuth configuration, `withUser` HOF for user context - `web-app/app/lib/auth.ts` - NextAuth configuration, `withUser` HOF for user context
- `app/lib/dbClient.ts` - MongoDB connection with development/production handling - `web-app/app/lib/dbClient.ts` - MongoDB connection with development/production handling
- `app/lib/actions/` - Server actions for data mutations (locations, bills, months) - `web-app/app/lib/actions/` - Server actions for data mutations (locations, bills, months)
- `app/i18n.ts` - Internationalization configuration (Croatian default) - `web-app/app/i18n.ts` - Internationalization configuration (Croatian default)
- `next.config.js` - Standalone build config with `serverActions.allowedOrigins` for Docker deployment - `web-app/next.config.js` - Standalone build config with `serverActions.allowedOrigins` for Docker deployment
- `housekeeping/` - Database backup and maintenance scripts
### Database Schema ### Database Schema
- **Collections**: Locations, Bills, Months (year-month periods) - **Collections**: Locations, Bills, Months (year-month periods)

View File

@@ -12,17 +12,20 @@ RUN apk add --no-cache libc6-compat
WORKDIR /app WORKDIR /app
# package.json and package-lock.json # Copy monorepo root package files
COPY ./package.json ./package-lock.json ./ COPY ./package.json ./package-lock.json ./
# installing dependencies # Copy workspace package files
COPY ./web-app/package.json ./web-app/package-lock.json ./web-app/
# Install dependencies (workspaces)
RUN npm i && npm cache clean --force RUN npm i && npm cache clean --force
# copy all the soruce code # Copy web-app source code
COPY . . COPY ./web-app ./web-app
# building app # Build web-app workspace
RUN npm run build RUN npm run build --workspace=web-app
#----------------------------------------- #-----------------------------------------
# STAGE 3: Run the Next.js server # STAGE 3: Run the Next.js server
@@ -34,14 +37,14 @@ WORKDIR /app
# making sure the production server does not use mock auth # making sure the production server does not use mock auth
ENV NODE_ENV=production ENV NODE_ENV=production
COPY --from=builder /app/public/* /app/public/ COPY --from=builder /app/web-app/public/* /app/public/
# this file is required for the pdfjs-dist package # this file is required for the pdfjs-dist package
COPY --from=builder /app/node_modules/pdfjs-dist/build/pdf.worker.min.mjs /app/public/pdf.worker.min.mjs COPY --from=builder /app/node_modules/pdfjs-dist/build/pdf.worker.min.mjs /app/public/pdf.worker.min.mjs
# Automatically leverage output traces to reduce image size # Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing # https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder --chown=nonroot:nonroot /app/.next/standalone ./ COPY --from=builder --chown=nonroot:nonroot /app/web-app/.next/standalone ./
COPY --from=builder --chown=nonroot:nonroot /app/.next/static ./.next/static COPY --from=builder --chown=nonroot:nonroot /app/web-app/.next/static ./.next/static
USER nonroot USER nonroot

View File

@@ -17,46 +17,69 @@ Each location record is marked with a user ID.
All the actions user `withUser` to fetch user ID, which is then used in all the DB operations. All the actions user `withUser` to fetch user ID, which is then used in all the DB operations.
# Monorepo Structure
This project is organized as a monorepo with multiple workspaces:
- **web-app**: The main Next.js application for tracking utility bills
- **housekeeping**: Database backup and maintenance scripts
## Working with Workspaces
From the monorepo root:
```bash
# Run dev server
npm run dev
# Build the web app
npm run build
# Run database backup (standalone)
npm run backup:standalone --workspace=housekeeping
```
# Database Backup & Restore # Database Backup & Restore
The project includes multiple backup strategies for different deployment scenarios and requirements. The project includes multiple backup strategies for different deployment scenarios and requirements.
All backup scripts are located in the `housekeeping/` workspace.
## Backup Scripts Overview ## Backup Scripts Overview
### Standalone Docker Deployments ### Standalone Docker Deployments
**Online Backups (No Downtime):** **Online Backups (No Downtime):**
- `db-dump--standalone.sh` - Creates online backup of the 'utility-bills' database using mongodump - `housekeeping/db-dump--standalone.sh` - Creates online backup of the 'utility-bills' database using mongodump
- Database stays running during backup - Database stays running during backup
- Only backs up the database content, not the full volume - Only backs up the database content, not the full volume
- Output: `./mongo-backup/utility-bills-dump-YYYY-MM-DD_HH-MM.tar.gz` - Output: `./mongo-backup/utility-bills-dump-YYYY-MM-DD_HH-MM.tar.gz`
- Default retention: 7 backups (configurable via `KEEP` env var) - Default retention: 7 backups (configurable via `KEEP` env var)
- Usage: `./db-dump--standalone.sh` or `KEEP=10 ./db-dump--standalone.sh` - Usage: `cd housekeeping && ./db-dump--standalone.sh` or `KEEP=10 ./db-dump--standalone.sh`
- `db-restore-from-dump--standalone.sh` - Restores from mongodump archives - `housekeeping/db-restore-from-dump--standalone.sh` - Restores from mongodump archives
- Database stays running during restore - Database stays running during restore
- **WARNING**: Drops existing collections before restore - **WARNING**: Drops existing collections before restore
- Usage: `./db-restore-from-dump--standalone.sh utility-bills-dump-2025-11-26_14-30.tar.gz` - Usage: `cd housekeeping && ./db-restore-from-dump--standalone.sh utility-bills-dump-2025-11-26_14-30.tar.gz`
**Offline Backups (With Downtime):** **Offline Backups (With Downtime):**
- `db-backup--standalone.sh` - Creates offline backup of the complete mongo-volume directory - `housekeeping/db-backup--standalone.sh` - Creates offline backup of the complete mongo-volume directory
- Database container is stopped during backup for consistency - Database container is stopped during backup for consistency
- Backs up the entire MongoDB data directory - Backs up the entire MongoDB data directory
- Output: `./mongo-backup/mongo-volume-backup-YYYY-MM-DD-HH-MM.tar.gz` - Output: `./mongo-backup/mongo-volume-backup-YYYY-MM-DD-HH-MM.tar.gz`
- Default retention: 7 backups (configurable via `KEEP` env var) - Default retention: 7 backups (configurable via `KEEP` env var)
- Usage: `./db-backup--standalone.sh` or `KEEP=2 ./db-backup--standalone.sh` - Usage: `cd housekeeping && ./db-backup--standalone.sh` or `KEEP=2 ./db-backup--standalone.sh`
### Docker Swarm Deployments ### Docker Swarm Deployments
- `db-backup--swarm.sh` - Creates offline backup by scaling down the MongoDB service - `housekeeping/db-backup--swarm.sh` - Creates offline backup by scaling down the MongoDB service
- Service is scaled to 0 during backup - Service is scaled to 0 during backup
- Output: `./mongo-backup/mongo-volume-backup-YYYY-MM-DD-HH-MM.tar.gz` - Output: `./mongo-backup/mongo-volume-backup-YYYY-MM-DD-HH-MM.tar.gz`
- Usage: `./db-backup--swarm.sh` - Usage: `cd housekeeping && ./db-backup--swarm.sh`
- `db-restore-from-backup--swarm.sh` - Restores volume backup by scaling down the service - `housekeeping/db-restore-from-backup--swarm.sh` - Restores volume backup by scaling down the service
- Service is scaled to 0 during restore - Service is scaled to 0 during restore
- Optional `--pre-backup` flag for safety backup before restore - Optional `--pre-backup` flag for safety backup before restore
- Usage: `./db-restore-from-backup--swarm.sh mongo-volume-backup-2025-11-26-14-30.tar.gz` - Usage: `cd housekeeping && ./db-restore-from-backup--swarm.sh mongo-volume-backup-2025-11-26-14-30.tar.gz`
## Automated Backup Schedule ## Automated Backup Schedule
@@ -64,10 +87,10 @@ Backups run automatically via cron at 04:00 every day:
```cron ```cron
# Sunday: Full volume backup (offline), keep 2 backups # Sunday: Full volume backup (offline), keep 2 backups
0 4 * * 0 cd /home/knee-cola/web-pro/evidencija-rezija && KEEP=2 ./db-backup--standalone.sh 0 4 * * 0 cd /home/knee-cola/web-pro/evidencija-rezija/housekeeping && KEEP=2 ./db-backup--standalone.sh
# Monday-Saturday: Database dump (online), keep 6 backups # Monday-Saturday: Database dump (online), keep 6 backups
0 4 * * 1-6 cd /home/knee-cola/web-pro/evidencija-rezija && KEEP=6 ./db-dump--standalone.sh 0 4 * * 1-6 cd /home/knee-cola/web-pro/evidencija-rezija/housekeeping && KEEP=6 ./db-dump--standalone.sh
``` ```
**Backup Strategy:** **Backup Strategy:**

View File

@@ -18,7 +18,7 @@ services:
- traefik-network - traefik-network
- util-bills-mongo-network - util-bills-mongo-network
volumes: volumes:
- ./etc/hosts/:/etc/hosts - ./web-app/etc/hosts/:/etc/hosts
environment: environment:
MONGODB_URI: mongodb://rezije.app:w4z4piJBgCdAm4tpawqB@mongo:27017/utility-bills MONGODB_URI: mongodb://rezije.app:w4z4piJBgCdAm4tpawqB@mongo:27017/utility-bills
GOOGLE_ID: 355397364527-adjrokm6hromcaaar0qfhk050mfr35ou.apps.googleusercontent.com GOOGLE_ID: 355397364527-adjrokm6hromcaaar0qfhk050mfr35ou.apps.googleusercontent.com

View File

@@ -18,7 +18,7 @@ services:
- traefik-network - traefik-network
- util-bills-mongo-network - util-bills-mongo-network
volumes: volumes:
- ./etc/hosts/:/etc/hosts - ./web-app/etc/hosts/:/etc/hosts
environment: environment:
MONGODB_URI: mongodb://rezije.app:w4z4piJBgCdAm4tpawqB@mongo:27017/utility-bills MONGODB_URI: mongodb://rezije.app:w4z4piJBgCdAm4tpawqB@mongo:27017/utility-bills
GOOGLE_ID: 355397364527-adjrokm6hromcaaar0qfhk050mfr35ou.apps.googleusercontent.com GOOGLE_ID: 355397364527-adjrokm6hromcaaar0qfhk050mfr35ou.apps.googleusercontent.com

27
housekeeping/README.md Normal file
View File

@@ -0,0 +1,27 @@
# Housekeeping
Database backup and maintenance scripts for the Evidencija Režija application.
## Scripts
- `db-backup--standalone.sh` - Backup database in standalone deployment
- `db-backup--swarm.sh` - Backup database in Docker Swarm deployment
- `db-dump--standalone.sh` - Dump database in standalone deployment
- `db-restore-from-dump--standalone.sh` - Restore from dump in standalone deployment
- `db-restore-from-backup--swarm.sh` - Restore from backup in Docker Swarm deployment
## Usage
From the monorepo root:
```bash
npm run backup:standalone --workspace=housekeeping
npm run backup:swarm --workspace=housekeeping
```
Or directly from the housekeeping directory:
```bash
cd housekeeping
./db-backup--standalone.sh
```

13
housekeeping/package.json Normal file
View File

@@ -0,0 +1,13 @@
{
"name": "housekeeping",
"version": "2.20.0",
"private": true,
"description": "Database backup and maintenance scripts",
"scripts": {
"backup:standalone": "./db-backup--standalone.sh",
"backup:swarm": "./db-backup--swarm.sh",
"dump:standalone": "./db-dump--standalone.sh",
"restore:standalone": "./db-restore-from-dump--standalone.sh",
"restore:swarm": "./db-restore-from-backup--swarm.sh"
}
}

137
package-lock.json generated
View File

@@ -1,62 +1,26 @@
{ {
"name": "evidencija-rezija", "name": "evidencija-rezija-monorepo",
"version": "2.20.0", "version": "2.20.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "evidencija-rezija-monorepo",
"version": "2.20.0", "version": "2.20.0",
"dependencies": { "workspaces": [
"@emotion/react": "^11.14.0", "web-app",
"@emotion/styled": "^11.14.1", "housekeeping"
"@heroicons/react": "^2.0.18", ],
"@mui/icons-material": "^7.3.5",
"@mui/material": "^7.3.5",
"@tailwindcss/typography": "^0.5.10",
"@types/iban": "^0.0.35",
"@types/node": "20.5.7",
"autoprefixer": "10.4.15",
"bcrypt": "^5.1.1",
"clsx": "^2.0.0",
"daisyui": "^4.5.0",
"hub-3a-payment-encoder": "^1.1.0",
"iban": "^0.0.14",
"is-ua-webview": "^1.1.2",
"mongodb": "^6.3.0",
"next": "^14.0.2",
"next-auth": "^5.0.0-beta.4",
"next-intl": "^3.7.0",
"pdfjs-dist": "^4.10.38",
"pg": "^8.11.3",
"postcss": "8.4.31",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-infinite-scroll-component": "^6.1.0",
"react-qr-code": "^2.0.18",
"react-toastify": "^10.0.6",
"tailwindcss": "^3.4.0",
"typescript": "5.2.2",
"use-debounce": "^10.0.0",
"zod": "^3.22.2",
"zxing-wasm": "^2.2.4"
},
"devDependencies": { "devDependencies": {
"@types/bcrypt": "^5.0.1", "prettier": "^3.0.3"
"@types/pg": "^8.10.9",
"@types/react": "18.2.21",
"@types/react-dom": "18.2.14",
"@vercel/style-guide": "^5.0.1",
"dotenv": "^16.3.1",
"eslint": "^8.52.0",
"eslint-config-next": "^14.0.0",
"eslint-config-prettier": "9.0.0",
"prettier": "^3.0.3",
"prettier-plugin-tailwindcss": "0.5.4"
}, },
"engines": { "engines": {
"node": ">=18.17.0" "node": ">=18.17.0"
} }
}, },
"housekeeping": {
"version": "2.20.0"
},
"node_modules/@aashutoshrathi/word-wrap": { "node_modules/@aashutoshrathi/word-wrap": {
"version": "1.2.6", "version": "1.2.6",
"resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz",
@@ -147,6 +111,7 @@
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.9.tgz", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.9.tgz",
"integrity": "sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw==", "integrity": "sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw==",
"dev": true, "dev": true,
"peer": true,
"dependencies": { "dependencies": {
"@ampproject/remapping": "^2.2.0", "@ampproject/remapping": "^2.2.0",
"@babel/code-frame": "^7.23.5", "@babel/code-frame": "^7.23.5",
@@ -500,6 +465,7 @@
"resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.14.0.tgz", "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.14.0.tgz",
"integrity": "sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==", "integrity": "sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.3", "@babel/runtime": "^7.18.3",
"@emotion/babel-plugin": "^11.13.5", "@emotion/babel-plugin": "^11.13.5",
@@ -543,6 +509,7 @@
"resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.14.1.tgz", "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.14.1.tgz",
"integrity": "sha512-qEEJt42DuToa3gurlH4Qqc1kVpNq8wO8cJtDzU46TjlzWjDlsVyevtYCRijVq3SrHsROS+gVQ8Fnea108GnKzw==", "integrity": "sha512-qEEJt42DuToa3gurlH4Qqc1kVpNq8wO8cJtDzU46TjlzWjDlsVyevtYCRijVq3SrHsROS+gVQ8Fnea108GnKzw==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@babel/runtime": "^7.18.3", "@babel/runtime": "^7.18.3",
"@emotion/babel-plugin": "^11.13.5", "@emotion/babel-plugin": "^11.13.5",
@@ -1069,6 +1036,7 @@
"resolved": "https://registry.npmjs.org/@mui/material/-/material-7.3.5.tgz", "resolved": "https://registry.npmjs.org/@mui/material/-/material-7.3.5.tgz",
"integrity": "sha512-8VVxFmp1GIm9PpmnQoCoYo0UWHoOrdA57tDL62vkpzEgvb/d71Wsbv4FRg7r1Gyx7PuSo0tflH34cdl/NvfHNQ==", "integrity": "sha512-8VVxFmp1GIm9PpmnQoCoYo0UWHoOrdA57tDL62vkpzEgvb/d71Wsbv4FRg7r1Gyx7PuSo0tflH34cdl/NvfHNQ==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@babel/runtime": "^7.28.4", "@babel/runtime": "^7.28.4",
"@mui/core-downloads-tracker": "^7.3.5", "@mui/core-downloads-tracker": "^7.3.5",
@@ -1469,6 +1437,7 @@
"resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.1.0.tgz", "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.1.0.tgz",
"integrity": "sha512-x4FavbNEeXx/baD/zC/SdrvkjSby8nBn8KcCREqk6UuwvwoAPZmaV8TFCAuo/cpovBRTIY67mHhe86MQQm/68Q==", "integrity": "sha512-x4FavbNEeXx/baD/zC/SdrvkjSby8nBn8KcCREqk6UuwvwoAPZmaV8TFCAuo/cpovBRTIY67mHhe86MQQm/68Q==",
"dev": true, "dev": true,
"peer": true,
"dependencies": { "dependencies": {
"glob": "10.3.10" "glob": "10.3.10"
} }
@@ -1805,6 +1774,7 @@
"version": "18.2.21", "version": "18.2.21",
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.21.tgz", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.21.tgz",
"integrity": "sha512-neFKG/sBAwGxHgXiIxnbm3/AAVQ/cMRS93hvBpg8xYRbeQSPVABp9U2bRnPf0iI4+Ucdv3plSxKK+3CW2ENJxA==", "integrity": "sha512-neFKG/sBAwGxHgXiIxnbm3/AAVQ/cMRS93hvBpg8xYRbeQSPVABp9U2bRnPf0iI4+Ucdv3plSxKK+3CW2ENJxA==",
"peer": true,
"dependencies": { "dependencies": {
"@types/prop-types": "*", "@types/prop-types": "*",
"@types/scheduler": "*", "@types/scheduler": "*",
@@ -1926,6 +1896,7 @@
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz",
"integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==",
"dev": true, "dev": true,
"peer": true,
"dependencies": { "dependencies": {
"@typescript-eslint/scope-manager": "6.21.0", "@typescript-eslint/scope-manager": "6.21.0",
"@typescript-eslint/types": "6.21.0", "@typescript-eslint/types": "6.21.0",
@@ -2220,6 +2191,7 @@
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
"integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
"dev": true, "dev": true,
"peer": true,
"bin": { "bin": {
"acorn": "bin/acorn" "acorn": "bin/acorn"
}, },
@@ -2639,6 +2611,7 @@
"url": "https://github.com/sponsors/ai" "url": "https://github.com/sponsors/ai"
} }
], ],
"peer": true,
"dependencies": { "dependencies": {
"caniuse-lite": "^1.0.30001587", "caniuse-lite": "^1.0.30001587",
"electron-to-chromium": "^1.4.668", "electron-to-chromium": "^1.4.668",
@@ -3317,6 +3290,7 @@
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz",
"integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==",
"dev": true, "dev": true,
"peer": true,
"dependencies": { "dependencies": {
"@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1", "@eslint-community/regexpp": "^4.6.1",
@@ -3512,6 +3486,7 @@
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz",
"integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==",
"dev": true, "dev": true,
"peer": true,
"dependencies": { "dependencies": {
"array-includes": "^3.1.7", "array-includes": "^3.1.7",
"array.prototype.findlastindex": "^1.2.3", "array.prototype.findlastindex": "^1.2.3",
@@ -4973,6 +4948,10 @@
"integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
"dev": true "dev": true
}, },
"node_modules/housekeeping": {
"resolved": "housekeeping",
"link": true
},
"node_modules/https-proxy-agent": { "node_modules/https-proxy-agent": {
"version": "5.0.1", "version": "5.0.1",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
@@ -5951,6 +5930,7 @@
"resolved": "https://registry.npmjs.org/next/-/next-14.2.33.tgz", "resolved": "https://registry.npmjs.org/next/-/next-14.2.33.tgz",
"integrity": "sha512-GiKHLsD00t4ACm1p00VgrI0rUFAC9cRDGReKyERlM57aeEZkOQGcZTpIbsGn0b562FTPJWmYfKwplfO9EaT6ng==", "integrity": "sha512-GiKHLsD00t4ACm1p00VgrI0rUFAC9cRDGReKyERlM57aeEZkOQGcZTpIbsGn0b562FTPJWmYfKwplfO9EaT6ng==",
"license": "MIT", "license": "MIT",
"peer": true,
"dependencies": { "dependencies": {
"@next/env": "14.2.33", "@next/env": "14.2.33",
"@swc/helpers": "0.5.5", "@swc/helpers": "0.5.5",
@@ -6468,6 +6448,7 @@
"version": "8.11.3", "version": "8.11.3",
"resolved": "https://registry.npmjs.org/pg/-/pg-8.11.3.tgz", "resolved": "https://registry.npmjs.org/pg/-/pg-8.11.3.tgz",
"integrity": "sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g==", "integrity": "sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g==",
"peer": true,
"dependencies": { "dependencies": {
"buffer-writer": "2.0.0", "buffer-writer": "2.0.0",
"packet-reader": "1.0.0", "packet-reader": "1.0.0",
@@ -6669,6 +6650,7 @@
"url": "https://github.com/sponsors/ai" "url": "https://github.com/sponsors/ai"
} }
], ],
"peer": true,
"dependencies": { "dependencies": {
"nanoid": "^3.3.6", "nanoid": "^3.3.6",
"picocolors": "^1.0.0", "picocolors": "^1.0.0",
@@ -6854,6 +6836,7 @@
"resolved": "https://registry.npmjs.org/preact/-/preact-10.24.3.tgz", "resolved": "https://registry.npmjs.org/preact/-/preact-10.24.3.tgz",
"integrity": "sha512-Z2dPnBnMUfyQfSQ+GBdsGa16hz35YmLmtTLhM169uW944hYL6xzTYkJjC07j+Wosz733pMWx0fgON3JNw1jJQA==", "integrity": "sha512-Z2dPnBnMUfyQfSQ+GBdsGa16hz35YmLmtTLhM169uW944hYL6xzTYkJjC07j+Wosz733pMWx0fgON3JNw1jJQA==",
"license": "MIT", "license": "MIT",
"peer": true,
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",
"url": "https://opencollective.com/preact" "url": "https://opencollective.com/preact"
@@ -6882,6 +6865,7 @@
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz",
"integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==",
"dev": true, "dev": true,
"peer": true,
"bin": { "bin": {
"prettier": "bin/prettier.cjs" "prettier": "bin/prettier.cjs"
}, },
@@ -7028,6 +7012,7 @@
"version": "18.2.0", "version": "18.2.0",
"resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
"integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
"peer": true,
"dependencies": { "dependencies": {
"loose-envify": "^1.1.0" "loose-envify": "^1.1.0"
}, },
@@ -7039,6 +7024,7 @@
"version": "18.2.0", "version": "18.2.0",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
"integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
"peer": true,
"dependencies": { "dependencies": {
"loose-envify": "^1.1.0", "loose-envify": "^1.1.0",
"scheduler": "^0.23.0" "scheduler": "^0.23.0"
@@ -7987,6 +7973,7 @@
"version": "3.4.1", "version": "3.4.1",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.1.tgz", "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.1.tgz",
"integrity": "sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==", "integrity": "sha512-qAYmXRfk3ENzuPBakNK0SRrUDipP8NQnEY6772uDhflcQz5EhRdD7JNZxyrFHVQNCwULPBn6FNPp9brpO7ctcA==",
"peer": true,
"dependencies": { "dependencies": {
"@alloc/quick-lru": "^5.2.0", "@alloc/quick-lru": "^5.2.0",
"arg": "^5.0.2", "arg": "^5.0.2",
@@ -8284,6 +8271,7 @@
"version": "5.2.2", "version": "5.2.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
"integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==",
"peer": true,
"bin": { "bin": {
"tsc": "bin/tsc", "tsc": "bin/tsc",
"tsserver": "bin/tsserver" "tsserver": "bin/tsserver"
@@ -8383,6 +8371,10 @@
"spdx-expression-parse": "^3.0.0" "spdx-expression-parse": "^3.0.0"
} }
}, },
"node_modules/web-app": {
"resolved": "web-app",
"link": true
},
"node_modules/webidl-conversions": { "node_modules/webidl-conversions": {
"version": "7.0.0", "version": "7.0.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
@@ -8710,6 +8702,59 @@
"funding": { "funding": {
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
},
"web-app": {
"version": "2.20.0",
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@heroicons/react": "^2.0.18",
"@mui/icons-material": "^7.3.5",
"@mui/material": "^7.3.5",
"@tailwindcss/typography": "^0.5.10",
"@types/iban": "^0.0.35",
"@types/node": "20.5.7",
"autoprefixer": "10.4.15",
"bcrypt": "^5.1.1",
"clsx": "^2.0.0",
"daisyui": "^4.5.0",
"hub-3a-payment-encoder": "^1.1.0",
"iban": "^0.0.14",
"is-ua-webview": "^1.1.2",
"mongodb": "^6.3.0",
"next": "^14.0.2",
"next-auth": "^5.0.0-beta.4",
"next-intl": "^3.7.0",
"pdfjs-dist": "^4.10.38",
"pg": "^8.11.3",
"postcss": "8.4.31",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-infinite-scroll-component": "^6.1.0",
"react-qr-code": "^2.0.18",
"react-toastify": "^10.0.6",
"tailwindcss": "^3.4.0",
"typescript": "5.2.2",
"use-debounce": "^10.0.0",
"zod": "^3.22.2",
"zxing-wasm": "^2.2.4"
},
"devDependencies": {
"@types/bcrypt": "^5.0.1",
"@types/pg": "^8.10.9",
"@types/react": "18.2.21",
"@types/react-dom": "18.2.14",
"@vercel/style-guide": "^5.0.1",
"dotenv": "^16.3.1",
"eslint": "^8.52.0",
"eslint-config-next": "^14.0.0",
"eslint-config-prettier": "9.0.0",
"prettier": "^3.0.3",
"prettier-plugin-tailwindcss": "0.5.4"
},
"engines": {
"node": ">=18.17.0"
}
} }
} }
} }

View File

@@ -1,62 +1,22 @@
{ {
"name": "evidencija-rezija-monorepo",
"private": true, "private": true,
"version": "2.20.0",
"workspaces": [
"web-app",
"housekeeping"
],
"scripts": { "scripts": {
"build": "next build", "dev": "npm run dev --workspace=web-app",
"dev": "next dev", "build": "npm run build --workspace=web-app",
"start": "npm run start --workspace=web-app",
"prettier": "prettier --write --ignore-unknown .", "prettier": "prettier --write --ignore-unknown .",
"prettier:check": "prettier --check --ignore-unknown .", "prettier:check": "prettier --check --ignore-unknown ."
"start": "next start",
"seed": "node -r dotenv/config ./scripts/seed.js"
},
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",
"@heroicons/react": "^2.0.18",
"@mui/icons-material": "^7.3.5",
"@mui/material": "^7.3.5",
"@tailwindcss/typography": "^0.5.10",
"@types/iban": "^0.0.35",
"@types/node": "20.5.7",
"autoprefixer": "10.4.15",
"bcrypt": "^5.1.1",
"clsx": "^2.0.0",
"daisyui": "^4.5.0",
"hub-3a-payment-encoder": "^1.1.0",
"iban": "^0.0.14",
"is-ua-webview": "^1.1.2",
"mongodb": "^6.3.0",
"next": "^14.0.2",
"next-auth": "^5.0.0-beta.4",
"next-intl": "^3.7.0",
"pdfjs-dist": "^4.10.38",
"pg": "^8.11.3",
"postcss": "8.4.31",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-infinite-scroll-component": "^6.1.0",
"react-qr-code": "^2.0.18",
"react-toastify": "^10.0.6",
"tailwindcss": "^3.4.0",
"typescript": "5.2.2",
"use-debounce": "^10.0.0",
"zod": "^3.22.2",
"zxing-wasm": "^2.2.4"
}, },
"devDependencies": { "devDependencies": {
"@types/bcrypt": "^5.0.1", "prettier": "^3.0.3"
"@types/pg": "^8.10.9",
"@types/react": "18.2.21",
"@types/react-dom": "18.2.14",
"@vercel/style-guide": "^5.0.1",
"dotenv": "^16.3.1",
"eslint": "^8.52.0",
"eslint-config-next": "^14.0.0",
"eslint-config-prettier": "9.0.0",
"prettier": "^3.0.3",
"prettier-plugin-tailwindcss": "0.5.4"
}, },
"engines": { "engines": {
"node": ">=18.17.0" "node": ">=18.17.0"
}, }
"version": "2.20.0"
} }

View File

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Some files were not shown because too many files have changed in this diff Show More