Commit Graph

125 Commits

Author SHA1 Message Date
DaX
b18d91df99 Update pause notice date to April 1st
All checks were successful
Deploy / detect (push) Successful in 6s
Deploy / deploy-api (push) Has been skipped
Deploy / tag-deploy (push) Successful in 4s
Deploy / deploy-frontend (push) Successful in 2m25s
deploy-20260320-144204
2026-03-20 15:39:10 +01:00
DaX
f982ae3410 Update filament catalog: add new materials, finishes, and colors
All checks were successful
Deploy / detect (push) Successful in 6s
Deploy / deploy-api (push) Has been skipped
Deploy / deploy-frontend (push) Successful in 2m18s
Deploy / tag-deploy (push) Successful in 4s
- Add PLA Translucent, PLA Aero, TPU for AMS as new material/finish entries
- Add PA6 CF finish, expand PA6-GF, PC Basic, PC FR color lists
- Move 7 colors from PLA Basic Gradient to PLA Silk Multi-Color
- Add colors to PLA Basic, Silk+, Tough+, Galaxy, Wood, PETG HF, ABS-GF,
  TPU 85A, TPU 95A HF
- Remove Jade White from PETG HF, White from TPU 85A
- Fix Translucent Tea typo to Translucent Teal in PETG catalog
- Remove "Druga boja..." custom option from dashboard color picker
- Add missing hex entries to color lookup table
deploy-20260305-124403
2026-03-05 13:41:20 +01:00
DaX
2a3bc5fdd8 Add migration 024: fix colors cleanup for partial 023 state
All checks were successful
Deploy / detect (push) Successful in 7s
Deploy / deploy-frontend (push) Has been skipped
Deploy / deploy-api (push) Successful in 30s
Deploy / tag-deploy (push) Successful in 4s
deploy-20260305-022737
2026-03-05 03:26:42 +01:00
DaX
063ef4f096 Fix all color hex codes to match spreadsheet source of truth
All checks were successful
Deploy / detect (push) Successful in 4s
Deploy / deploy-api (push) Successful in 43s
Deploy / deploy-frontend (push) Successful in 3m11s
Deploy / tag-deploy (push) Successful in 6s
- Update 121 hex codes in bambuLabColors.ts from spreadsheet
- Update 118 hex codes in bambuLabColorsComplete.ts
- Add 118 hex UPDATE statements to migration 023
- Remove ABS GF and TPU 95A HF entries from complete colors
deploy-20260305-022523
2026-03-05 03:21:44 +01:00
DaX
d55d0e5e02 Clean up fake colors and add missing Bambu Lab colors
All checks were successful
Deploy / detect (push) Successful in 4s
Deploy / deploy-api (push) Successful in 34s
Deploy / deploy-frontend (push) Successful in 2m4s
Deploy / tag-deploy (push) Successful in 4s
- Add migration 023: delete 67 fake colors, rename IronGray typo, add 16 missing real colors from spreadsheet
- Fix frontend color mappings: remove typo duplicates, rename Silk prefixed colors to match catalog
- Add Translucent Teal, Phantom Blue, Mystic Magenta mappings
- Remove non-existent ABS GF, TPU 95A HF entries
- Update tests for corrected color names
deploy-20260305-020647
2026-03-05 03:04:19 +01:00
DaX
cff73c1381 Add manual customer creation and fix color edit modal
All checks were successful
Deploy / detect (push) Successful in 4s
Deploy / deploy-frontend (push) Successful in 2m24s
Deploy / tag-deploy (push) Successful in 5s
Deploy / deploy-api (push) Has been skipped
- Add "Dodaj kupca" button and modal form to customers page
- Fix color edit modal dark mode styling and add backdrop blur
deploy-20260305-013800
2026-03-05 02:35:13 +01:00
DaX
f564f944f7 Fix migration: clean /database/ before docker cp to prevent nesting
All checks were successful
Deploy / deploy-api (push) Successful in 40s
Deploy / deploy-frontend (push) Successful in 3m6s
Deploy / tag-deploy (push) Successful in 5s
Deploy / detect (push) Successful in 6s
deploy-20260305-011612
2026-03-05 02:12:41 +01:00
DaX
629b9c1756 Make schema.sql idempotent for CI/CD migrations
Some checks failed
Deploy / detect (push) Successful in 4s
Deploy / deploy-api (push) Failing after 22s
Deploy / deploy-frontend (push) Successful in 2m20s
Deploy / tag-deploy (push) Has been skipped
Add IF NOT EXISTS to CREATE TABLE and CREATE INDEX statements.
Drop and recreate triggers to avoid errors on existing databases.
2026-03-05 02:09:45 +01:00
DaX
c5a7666ce6 Fix migration path: copy database/ to /database/ matching migrate.js path resolution
Some checks failed
Deploy / detect (push) Successful in 5s
Deploy / deploy-api (push) Failing after 22s
Deploy / deploy-frontend (push) Successful in 2m5s
Deploy / tag-deploy (push) Has been skipped
2026-03-05 02:07:13 +01:00
DaX
70b7713f2e Fix deploy: API runs in Docker container, use docker cp/exec/restart
Some checks failed
Deploy / detect (push) Successful in 5s
Deploy / deploy-api (push) Failing after 22s
Deploy / tag-deploy (push) Has been cancelled
Deploy / deploy-frontend (push) Has been cancelled
EC2 runs the API in a Docker container named filamenteka-api.
Use docker cp for file transfer, docker exec for migrations,
and docker restart to apply changes.
2026-03-05 02:04:55 +01:00
DaX
da79307461 Diagnostic: inspect Docker container and compose setup on EC2
Some checks failed
Deploy / detect (push) Successful in 4s
Deploy / deploy-frontend (push) Has been cancelled
Deploy / deploy-api (push) Failing after 29s
Deploy / tag-deploy (push) Has been cancelled
2026-03-05 02:03:08 +01:00
DaX
3e4f576fd5 Fix all EC2 paths: server.js at /app/, node at /usr/local/bin/node
Some checks failed
Deploy / detect (push) Successful in 7s
Deploy / deploy-api (push) Failing after 24s
Deploy / deploy-frontend (push) Has been cancelled
Deploy / tag-deploy (push) Has been cancelled
EC2 runs node from /app/ directory (not /home/ubuntu/filamenteka-api).
No systemd service exists - restart by killing and re-launching node.
Use absolute path /usr/local/bin/node for all node invocations.
2026-03-05 02:00:59 +01:00
DaX
b24a1fea27 Diagnostic: find node binary path and working directory from running process
Some checks failed
Deploy / tag-deploy (push) Has been cancelled
Deploy / deploy-frontend (push) Has been cancelled
Deploy / detect (push) Successful in 4s
Deploy / deploy-api (push) Failing after 28s
2026-03-05 01:59:18 +01:00
DaX
93df263214 Diagnostic: check Docker, running services, and OS on EC2
Some checks failed
Deploy / detect (push) Successful in 6s
Deploy / deploy-api (push) Failing after 30s
Deploy / tag-deploy (push) Has been cancelled
Deploy / deploy-frontend (push) Has been cancelled
2026-03-05 01:57:57 +01:00
DaX
e50f361b07 Diagnostic: comprehensive node binary search without set -e
Some checks failed
Deploy / detect (push) Successful in 6s
Deploy / deploy-api (push) Failing after 36s
Deploy / tag-deploy (push) Has been cancelled
Deploy / deploy-frontend (push) Has been cancelled
2026-03-05 01:56:30 +01:00
DaX
9594ce56cb Diagnostic: find node binary and systemd service config on EC2
Some checks failed
Deploy / detect (push) Successful in 8s
Deploy / deploy-api (push) Failing after 27s
Deploy / tag-deploy (push) Has been cancelled
Deploy / deploy-frontend (push) Has been cancelled
2026-03-05 01:55:05 +01:00
DaX
11dbea3536 Fix migration: use find to locate node binary on EC2
Some checks failed
Deploy / detect (push) Successful in 7s
Deploy / deploy-api (push) Failing after 26s
Deploy / tag-deploy (push) Has been cancelled
Deploy / deploy-frontend (push) Has been cancelled
2026-03-05 01:53:17 +01:00
DaX
6d04e16cf6 Fix migration: use login shell to find node binary in SSM context
Some checks failed
Deploy / detect (push) Successful in 4s
Deploy / deploy-api (push) Failing after 21s
Deploy / tag-deploy (push) Has been cancelled
Deploy / deploy-frontend (push) Has been cancelled
2026-03-05 01:51:10 +01:00
DaX
85481512c8 Fix SSM parameter passing: use JSON files instead of inline parameters
Some checks failed
Deploy / detect (push) Successful in 4s
Deploy / deploy-api (push) Failing after 22s
Deploy / deploy-frontend (push) Successful in 2m3s
Deploy / tag-deploy (push) Has been skipped
AWS CLI was misinterpreting inline --parameters with embedded paths.
Use file:// JSON parameters for all SSM commands to avoid shell quoting issues.
2026-03-05 01:48:40 +01:00
DaX
1e95455139 Fix migration step: run node as ubuntu user for correct PATH
Some checks failed
Deploy / detect (push) Successful in 4s
Deploy / deploy-api (push) Failing after 14s
Deploy / deploy-frontend (push) Successful in 2m6s
Deploy / tag-deploy (push) Has been skipped
SSM runs as root with minimal PATH. Use sudo -iu ubuntu to get the
ubuntu user's login shell environment where node is available.
2026-03-05 01:46:16 +01:00
DaX
f929c384c1 Fix migration step: source nvm before running node on EC2
Some checks failed
Deploy / deploy-frontend (push) Successful in 2m5s
Deploy / tag-deploy (push) Has been skipped
Deploy / detect (push) Successful in 5s
Deploy / deploy-api (push) Failing after 22s
SSM runs with minimal PATH that doesn't include nvm-managed node.
Source nvm.sh before executing migrate.js.
2026-03-05 01:43:41 +01:00
DaX
291997caa5 Fix migration step: create api/ subdirectory and run migrate from project root
Some checks failed
Deploy / detect (push) Successful in 9s
Deploy / tag-deploy (push) Has been cancelled
Deploy / deploy-api (push) Failing after 26s
Deploy / deploy-frontend (push) Has been cancelled
mkdir -p the api/ and database/ directories before copying files since EC2
only has server.js at the project root. Run migrate.js from project root
so dotenv picks up the .env file correctly.
2026-03-05 01:42:01 +01:00
DaX
0741bd0d0e Fix tag-deploy condition to properly check individual job results
Some checks failed
Deploy / detect (push) Successful in 5s
Deploy / deploy-api (push) Failing after 29s
Deploy / tag-deploy (push) Has been cancelled
Deploy / deploy-frontend (push) Has been cancelled
Use explicit job result checks instead of needs.*.result wildcard which
does not work in Gitea Actions. Prevent tagging when any deploy job fails.
2026-03-05 01:40:03 +01:00
DaX
746f0925d0 Fix CI/CD pipeline: use archive download for migrations, inline SSM paths
All checks were successful
Deploy / tag-deploy (push) Successful in 4s
Deploy / detect (push) Successful in 4s
Deploy / deploy-api (push) Has been skipped
Deploy / deploy-frontend (push) Successful in 2m5s
Replace complex Gitea API + python parsing in SSM with simple repo archive
download and extraction. Inline hardcoded paths in SSM commands instead of
shell variable expansion through single quotes to avoid quoting issues.
2026-03-05 01:33:19 +01:00
DaX
2985ea4457 Rewrite CI/CD pipeline with deploy-tag change detection and verified deployments
Some checks failed
Deploy / detect (push) Successful in 4s
Deploy / deploy-api (push) Failing after 22s
Deploy / deploy-frontend (push) Successful in 2m5s
Deploy / tag-deploy (push) Successful in 3s
Replace HEAD~1 diff with git tag-based change detection to catch all changes
since last successful deploy. Split into 4 parallel jobs: detect, frontend,
API (with migrations, health check, and rollback), and deploy tagging.
2026-03-05 01:19:13 +01:00
DaX
f2ae608b01 Trigger API redeploy for customers and sales endpoints
All checks were successful
Deploy / deploy (push) Successful in 15s
2026-03-05 01:09:09 +01:00
DaX
65ae493d54 Align catalog with Bambu Lab product line, add conditional filters and admin sidebar
All checks were successful
Deploy / deploy (push) Successful in 2m24s
- Add master catalog (bambuLabCatalog.ts) as single source of truth for materials, finishes, colors, and refill/spool availability
- Fix incorrect finish-per-material mappings (remove PLA: 85A/90A/95A HF/FR/GF/HF, add ASA: Basic/CF/Aero, fix PETG/PC)
- Implement cascading filters on public site: material restricts finish, finish restricts color
- Add AdminSidebar component across all admin pages
- Redirect /upadaj to /dashboard when already authenticated
- Update color hex mappings and tests to match official Bambu Lab names
2026-03-05 01:04:06 +01:00
DaX
ff6abdeef0 Add sales tracking system with customers, analytics, and inventory management
All checks were successful
Deploy / deploy (push) Successful in 2m26s
- Add customers table (021) and sales/sale_items tables (022) migrations
- Add customer CRUD, sale CRUD (transactional with auto inventory decrement/restore),
  and analytics API endpoints (overview, top sellers, revenue chart, inventory alerts)
- Add sales page with NewSaleModal (customer autocomplete, multi-item form,
  color-based pricing, stock validation) and SaleDetailModal
- Add customers page with search, inline editing, and purchase history
- Add analytics dashboard with recharts (revenue line chart, top sellers bar,
  refill vs spulna pie chart, inventory alerts table with stockout estimates)
- Add customerService, saleService, analyticsService to frontend API layer
- Update sidebar navigation on all admin pages
2026-03-04 23:58:57 +01:00
DaX
e9afe8bc35 Add temporary sales pause overlay until March 8
All checks were successful
Deploy / deploy (push) Successful in 1m58s
2026-02-27 20:09:53 +01:00
DaX
a854fd5524 Upgrade to Next.js 16.1.6, React 19.2.4, and update all dependencies
All checks were successful
Deploy / deploy (push) Successful in 59s
- Next.js 15.5 → 16.1.6 (Turbopack default, faster builds)
- React/React-DOM 19.1 → 19.2.4
- @types/react 18 → 19, @types/react-dom 18 → 19
- TypeScript 5.2 → 5.9
- CI Node.js 18 → 20 (required by Next.js 16)
- Replace removed next lint with standalone ESLint config
- Auto-updated tsconfig.json (jsx: react-jsx, dev types)
2026-02-16 02:39:22 +01:00
DaX
eff60436eb Clean up repo: remove amplify.yml, update gitignore
All checks were successful
Deploy / deploy (push) Successful in 1m29s
Delete deprecated Amplify config leftover from Gitea migration.
Update next-env.d.ts for Next.js 15.5 route types.
Add .mcp.json and *.png to gitignore.
2026-02-16 02:33:35 +01:00
DaX
6dda083ee9 Streamline CLAUDE.md: remove redundancy, fix inaccuracies
All checks were successful
Deploy / deploy (push) Successful in 1m22s
Remove exhaustive component/test/terraform listings that are easily
discoverable. Fix non-existent typecheck script reference. Consolidate
deployment info into single table. Add missing Matomo env vars and
single-test-file command.
2026-02-16 02:16:37 +01:00
DaX
bd27f7a9e4 Fix pip3 install on Ubuntu runner with --break-system-packages flag
All checks were successful
Deploy / deploy (push) Successful in 1m18s
2026-02-16 02:08:08 +01:00
DaX
145c2d4781 Optimize CI/CD pipeline for faster deploys
Some checks failed
Deploy / deploy (push) Failing after 1m12s
- Remove broken npm cache (was timing out ~5min per run)
- Replace AWS CLI v2 installer with pip3 install (~50MB less)
- Inline AWS credential config instead of separate action
- Merge steps to reduce overhead
2026-02-16 02:04:38 +01:00
DaX
28ba314404 Add missing filament colors and fix naming issues
All checks were successful
Deploy / deploy (push) Successful in 10m43s
- Add Silk Multi-Color gradients: Aurora Purple, Phantom Blue, Mystic Magenta
- Add Iron Gray Metallic alias (with space)
- Add Matte Latte Brown
2026-02-16 01:51:42 +01:00
DaX
0cfee1bda7 Update all dependencies to latest stable versions
All checks were successful
Deploy / deploy (push) Successful in 10m52s
Frontend: react 19.2.4, next 15.5.12, axios 1.13.5, jest 30.2.0,
typescript 5.9.3, tailwindcss 3.4.19, autoprefixer 10.4.24
API: cors 2.8.6, dotenv 16.6.1, express 4.22.1, pg 8.18.0,
jsonwebtoken 9.0.3, nodemon 3.1.11
2026-02-16 01:02:59 +01:00
DaX
7cd2058613 Add AWS CLI install step to deploy workflow
All checks were successful
Deploy / deploy (push) Successful in 10m52s
Runner image doesn't include AWS CLI by default.
2026-02-16 00:49:52 +01:00
DaX
c837af6015 Fix workflow: use env block instead of vars context
Some checks failed
Deploy / deploy (push) Failing after 5m59s
Gitea act runner doesn't resolve vars context properly.
Move all non-sensitive config to workflow-level env block.
2026-02-16 00:43:13 +01:00
DaX
58c165749d Migrate from GitHub to Gitea with CI/CD
Some checks failed
Deploy / deploy (push) Failing after 6m11s
- Add Gitea Actions workflow for automated frontend and API deployment
- Update all raw download URLs from GitHub to Gitea
- Remove deprecated Amplify config and GitHub-specific Terraform variables
- Clean up commented-out Amplify resources from Terraform
- Update documentation to reflect new repository and CI/CD setup
2026-02-16 00:35:08 +01:00
DaX
b7f5417e23 Move dashboard to root level route
- Dashboard now accessible at /dashboard instead of /upadaj/dashboard
- Updated all navigation links to use new /dashboard route
- Login page still at /upadaj, redirects to /dashboard on success
- Colors and requests remain under /upadaj prefix
- Updated test files to reference new dashboard path
2025-11-19 19:13:48 +01:00
DaX
17edfc8794 Fix CloudFront routing and TypeScript type safety
- Update CloudFront Function to handle Next.js static export .html files
- Fix TypeScript interface for color request service (add required user_phone field)
- Update ColorRequestForm component to include phone field
2025-11-19 18:56:08 +01:00
DaX
f6f9da9c5b Add bulk price editing features and fix quantity update price preservation
- Fix FilamentForm to preserve prices when updating quantities
  - Add isInitialLoad flag to prevent price override on form load
  - Only update prices when color is actively changed, not on initial render

- Add bulk filament price editor to dashboard
  - Filter by material and finish
  - Set refill and/or spool prices for multiple filaments
  - Preview changes before applying
  - Update all filtered filaments at once

- Add bulk color price editor to colors page
  - Edit prices for all colors in one interface
  - Global price application with search filtering
  - Individual price editing with change tracking

- Add auto-kill script for dev server
  - Kill existing processes on ports 3000/3001 before starting
  - Prevent "port already in use" errors
  - Clean start every time npm run dev is executed
2025-11-18 19:14:01 +01:00
DaX
b1dfa2352a Add 76 missing Bambu Lab colors and expand filament type support
- Added comprehensive color migration with 76 new Bambu Lab colors
- Includes glow, metallic, sparkle, gradient, ABS, and translucent variants
- Added PAHT material type with CF and Bez Finisha finish support
- Added Tough+ finish option for PLA filaments
- Fixed refill/spulna restrictions for specific combinations:
  - ABS GF Yellow/Orange now refill-only
  - TPU 95A HF now refill-only
  - Removed spool restrictions for Galaxy and Basic finishes
- Updated frontend color mappings with all new colors
- All colors now available in admin panel for inventory management
2025-11-13 07:02:06 +01:00
DaX
987039b0f7 Optimize frontend deployment with proper cache headers
Update deployment script to set appropriate cache-control headers:
- HTML files: no-cache to prevent stale content
- Next.js static assets: 1 year cache with immutable flag
- Other assets: 1 day cache for optimal performance

This resolves chronic caching issues with admin panel updates.
2025-10-31 03:39:25 +01:00
DaX
6bc1c8d16d Add CloudFront Function for directory index routing
- Create CloudFront Function to rewrite directory requests to index.html
- Fix admin login page routing issue (/upadaj -> /upadaj/index.html)
- Attach function to CloudFront distribution default cache behavior
- Enables proper routing for all admin pages without .html extension
2025-10-31 02:54:46 +01:00
DaX
d3e001707b Fix admin panel authentication and navigation for static export
- Replace router.push with window.location.href for reliable redirects
- Fix auth check to wait for component mount before accessing localStorage
- Ensure proper redirect after successful login
- Fix redirect behavior on all admin pages (dashboard, colors, requests)
2025-10-31 02:45:47 +01:00
DaX
c0ca1e4bb3 Fix CloudFront domain configuration and add missing color definitions
- Configure CloudFront to accept filamenteka.rs with ACM SSL certificate
- Add Cloudflare Transform Rule for Host header rewriting
- Fix Matte Grass Green hex code (#7CB342 -> #61C680)
- Add PLA Wood colors: Ochre Yellow, White Oak, Clay Brown
- Add script for managing color definitions in database
2025-10-31 02:40:03 +01:00
DaX
1ce127c51c Remove deprecated Amplify resources after CloudFront migration
- Comment out Amplify app, branches, and domain association
- Remove Amplify-related outputs
- Add migration notes for reference
- Amplify app deleted from AWS (dd6qls201bf9n)
2025-10-31 02:07:14 +01:00
DaX
fc95dc4ed2 Migrate frontend from Amplify to CloudFront + S3
- Add CloudFront distribution with S3 origin
- Configure S3 bucket with website hosting
- Add Origin Access Control (OAC) for security
- Configure SPA error handling (404/403 -> index.html)
- Add Cloudflare DNS records (commented out due to invalid token)
- Add deployment script for future updates
- Update outputs to include CloudFront info
2025-10-31 02:04:47 +01:00
DaX
543e51cc3c Add 19 new Bambu Lab colors and fix sale banner display
Added 16 new PLA Matte refill-only colors and 3 PLA Wood spool-only colors.
Updated admin panel to automatically handle Matte prefix and Wood finish.
Fixed sale banner not displaying due to expired sale dates.
Updated all active sales to expire in 7 days (November 7, 2025).
2025-10-31 00:55:43 +01:00