Commit Graph

78 Commits

Author SHA1 Message Date
marco370
acc1939f44 Add automated deployment with versioning and database backup
Introduces a new deployment script (push-gitlab.sh) and documentation (GITLAB-DEPLOY.md) to automate pushing code to GitLab. The system supports semantic versioning (patch, minor, major) for releases and automatically backs up the database before each deployment. It also includes instructions for configuring GitLab credentials via a `git.env` file.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/Z1LDqzu
2025-10-17 06:38:57 +00:00
Marco Lanzara
743ec4261f Deploy: 2025-10-17 06:25:23 2025-10-17 06:25:27 +00:00
marco370
b81f1253ac Add system parameters configuration for contract rules
Introduce a new section in the application for managing contract parameters. This includes backend API endpoints for fetching and updating contract parameters, schema definitions for these parameters, and a frontend page to display and edit them. Admins and coordinators can now configure various aspects of contract rules and shift planning.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/Z1LDqzu
2025-10-16 17:56:46 +00:00
marco370
b5008a9dc8 Fix login redirect and server error handling for admin users
Introduces a GET route for /api/login to redirect to /api/auto-login-admin, and enhances error handling and logging within the local authentication module, particularly for admin user retrieval.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/EAVbbe1
2025-10-16 16:50:17 +00:00
marco370
51a2eec68b Add local authentication for external deployments
Introduce a local authentication system using Passport.js for deployments outside of Replit, including session management and a default admin user setup.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/EAVbbe1
2025-10-16 16:43:55 +00:00
marco370
50adb0ed9a Improve deployment process and external server compatibility
Updates deployment scripts and documentation, making external server integration more flexible by making REPLIT_DOMAINS optional and providing automatic fallback.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/AwjfjCW
2025-10-16 16:17:05 +00:00
marco370
c82fafd438 Improve authentication by supporting external servers
Update Replit authentication to use environment variables for domains and REPL ID.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/AwjfjCW
2025-10-16 16:05:48 +00:00
marco370
088ec72ddc Improve deployment script to handle database backups and application restarts
Update deploy.sh to include database backup, dependency installation, Vite build, Drizzle schema push, and PM2 application restart with rollback functionality.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/AwjfjCW
2025-10-16 15:31:17 +00:00
marco370
0f0311d214 Fix deployment issues related to environment variables and tool configuration
Updates the deployment script to correctly handle PM2 environment variables and the npx command for drizzle-kit.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/AwjfjCW
2025-10-16 15:23:24 +00:00
marco370
0fe3a51887 Improve application restart process by robustly locating PM2
Add logic to reliably find and use the PM2 executable for application restarts, ensuring consistency across different environments.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/eg9yHD6
2025-10-16 14:21:26 +00:00
marco370
729850fbc6 Improve database backup and restore process for deployment
Update deploy script to correctly source .env file, handle missing DB variables, and use --dbname for pg_dump/psql commands.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/eg9yHD6
2025-10-16 14:08:47 +00:00
marco370
22ce619ca5 Add script to push code to GitLab repository
Add push-to-gitlab.sh script to facilitate code pushing to the GitLab repository.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/aazyBOE
2025-10-16 11:04:28 +00:00
marco370
a40b945c84 Update deployment to securely manage database passwords
Securely manage PostgreSQL credentials by storing them in a dedicated file and updating deployment scripts to reference this file, removing hardcoded passwords from configuration and documentation.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/42d8028a-fa71-4ec2-938c-e43eedf7df01/aazyBOE
2025-10-16 11:00:27 +00:00
marco370
a7df004348 Update deployment scripts and server setup for automatic deployment and database backup
Update deploy scripts to include database backup and restore functionality, configure Nginx for vt.alfacom.it, and modify server setup to use the provided database password.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-10-16 10:54:16 +00:00
Marco Lanzara
598b893308 Iniziale 2025-10-16 07:36:56 +00:00
marco370
02e3fb66aa Add initial deployment infrastructure and documentation
Adds CI/CD pipeline, server setup scripts, Nginx configuration, environment templates, and deployment documentation.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 42d8028a-fa71-4ec2-938c-e43eedf7df01
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-10-16 07:31:56 +00:00
marco370
bd85c1257d Add automatic deployment system for production environments
Implement a full CI/CD pipeline using GitLab for automatic deployment to AlmaLinux 9 servers, including server setup scripts, Nginx configuration with SSL, and automated PostgreSQL password generation.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 99f0fce6-9386-489a-9632-1d81223cab44
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/99f0fce6-9386-489a-9632-1d81223cab44/3WCtEVl
2025-10-16 07:17:26 +00:00
marco370
4ed700daee Add system for managing guard preferences and site assignments
Introduce new schema definitions for guard constraints, site preferences, contract parameters, and training/absence tracking.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 99f0fce6-9386-489a-9632-1d81223cab44
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/99f0fce6-9386-489a-9632-1d81223cab44/H8Wilyj
2025-10-11 19:10:09 +00:00
marco370
a300d18489 Add editing capabilities for guards, sites, and shifts
Implement PATCH endpoints for updating guards, sites, and shifts, along with UI elements and form handling for editing existing records across the application.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 99f0fce6-9386-489a-9632-1d81223cab44
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/99f0fce6-9386-489a-9632-1d81223cab44/Iga2bds
2025-10-11 15:58:34 +00:00
marco370
6212b6b634 Add functionality for editing specific items on various pages
Update UI to include edit icons where appropriate.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 99f0fce6-9386-489a-9632-1d81223cab44
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/99f0fce6-9386-489a-9632-1d81223cab44/TRdpk3a
2025-10-11 15:43:16 +00:00
marco370
0332eb5481 Restrict user management operations to administrators
Enhance user management routes (`/api/users`) to enforce admin-only access for viewing and patching user data, and modify `upsertUser` in `DatabaseStorage` to handle existing users by email.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 99f0fce6-9386-489a-9632-1d81223cab44
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/99f0fce6-9386-489a-9632-1d81223cab44/TRdpk3a
2025-10-11 15:26:17 +00:00
marco370
4443773040 Add ability for administrators to manage user roles and permissions
Introduce a new user management interface for viewing and updating user roles, including API endpoints and backend storage logic for role management.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 99f0fce6-9386-489a-9632-1d81223cab44
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/99f0fce6-9386-489a-9632-1d81223cab44/TRdpk3a
2025-10-11 15:16:47 +00:00
marco370
26ff61c947 Add logout button to the sidebar menu for user session termination
Add a new 'LogOut' icon and a button to the sidebar navigation. The button, when clicked, triggers a redirect to the '/api/logout' endpoint, effectively ending the user's session. This is implemented in `client/src/components/app-sidebar.tsx`.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 99f0fce6-9386-489a-9632-1d81223cab44
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/99f0fce6-9386-489a-9632-1d81223cab44/c7A8nZc
2025-10-11 14:52:57 +00:00
marco370
06c03be97c Add and update guard, site, and shift management functionality
Implement CRUD operations for guards, sites, and shifts, including PATCH and DELETE endpoints, and enhance shift assignment logic with skill validation and real-time synchronization.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 99f0fce6-9386-489a-9632-1d81223cab44
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/99f0fce6-9386-489a-9632-1d81223cab44/9lvKVew
2025-10-11 11:09:25 +00:00
marco370
b3d0441306 Add functionality to assign and remove guards from shifts
Implement API endpoints and UI components for managing shift assignments, including guard certifications and a new assignment removal mutation.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 99f0fce6-9386-489a-9632-1d81223cab44
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/99f0fce6-9386-489a-9632-1d81223cab44/9lvKVew
2025-10-11 11:03:43 +00:00
marco370
cbae8222cf Implement secure access control and user authentication system
Add authentication middleware and user role management to secure API endpoints and restrict access based on user roles.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 99f0fce6-9386-489a-9632-1d81223cab44
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/99f0fce6-9386-489a-9632-1d81223cab44/cpTvSfP
2025-10-11 10:34:04 +00:00
marco370
177ad892f0 Update shift creation to use a new form schema and improve validation
Refactor shift creation endpoint to use `insertShiftFormSchema` for validation and data transformation, and update client-side components to handle datetime strings.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 99f0fce6-9386-489a-9632-1d81223cab44
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/99f0fce6-9386-489a-9632-1d81223cab44/cpTvSfP
2025-10-11 10:31:19 +00:00
marco370
abe4041cd1 Add basic UI components and structure for the application
Initial commit adds core UI components, including layout elements, form controls, and navigation elements, along with the main application structure and routing.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 99f0fce6-9386-489a-9632-1d81223cab44
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/99f0fce6-9386-489a-9632-1d81223cab44/nGJAldO
2025-10-11 09:36:55 +00:00