fix: vite server hotfix

This commit is contained in:
2026-06-16 12:15:25 +03:00
parent 1022b7e5f1
commit 9df80dd4e1
6 changed files with 146 additions and 8 deletions

View File

@@ -21,11 +21,6 @@ services:
frontend:
build: ./frontend
container_name: bellsystems-frontend
volumes:
- ./frontend:/app
- /app/node_modules
ports:
- "5173:5174"
networks:
- internal

View File

@@ -1,4 +1,5 @@
FROM node:20-alpine
# Stage 1: build
FROM node:20-alpine AS builder
WORKDIR /app
@@ -6,5 +7,12 @@ COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
CMD ["npm", "run", "dev"]
# Stage 2: serve with nginx
FROM nginx:alpine
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.prod.conf /etc/nginx/conf.d/default.conf
EXPOSE 80

17
frontend/nginx.prod.conf Normal file
View File

@@ -0,0 +1,17 @@
server {
listen 80;
root /usr/share/nginx/html;
index index.html;
# SPA fallback — all unknown routes serve index.html
location / {
try_files $uri $uri/ /index.html;
}
# Cache static assets
location ~* \.(js|css|png|svg|ico|woff2?)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
}

View File

@@ -11,7 +11,7 @@ http {
resolver 127.0.0.11 valid=5s;
set $backend_upstream http://backend:8000;
set $frontend_upstream http://frontend:5174;
set $frontend_upstream http://frontend:80;
location /ota/ {
root /srv;

42
strategies/PROMPT.txt Normal file
View File

@@ -0,0 +1,42 @@
frontend\src\pages\bellcloud\devices\notes
frontend\src\pages\bellcloud\devices\DeviceForm.jsx
frontend\src\pages\bellcloud\mqtt
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
Read CLAUDE.md and DESIGN.md and use your /frontend-design for this task !
Build PAGE at PAGEURL
REFERENCE (logic only — do not copy styling):
- Archive: ARCHIVEPAGEURL
- Use this ONLY to understand: API endpoints, data fields, user actions
DESIGN REFERENCE:
- Style guide: frontend/src/pages/dev/StyleGuide.jsx
- Match components, spacing, and patterns exactly as shown there
- Use only components from frontend/src/components/ui/
- Use only CSS token variables — no hardcoded values
When done, replace the <ComingSoon /> for this route in frontend/src/router/index.jsx
STITCH REFERENCE:
- frontend/src/_archive/stitch-references/PageName.html
- Use this as visual/layout inspiration for this specific page
- Translate the layout and visual structure into React using our design system
- Do not copy Stitch's inline styles — use our tokens instead
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
Apply the same glass effect as the DataTable and Card components to [component/page name].
Replace any solid background: var(--color-bg-*) with rgba(28, 32, 38, 0.30) (or 0.40 for elevated/nested surfaces)
Add backdrop-filter: var(--blur-modal) and -webkit-backdrop-filter: var(--blur-modal)
Replace any solid hover/active/selected background colors with their semi-transparent equivalents (rgba(49, 53, 60, 0.50))
Keep borders and shadows unchanged

View File

@@ -0,0 +1,76 @@
TODO FEATURES AND FIXES
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
// CONSOLE:
- Add an option to view all melodies for a user, delete them (one by one or flush), and edit them / reorder them.
- Automate the adding of a device on the cloud after it has been sold. Not necessarily claim it, but add it on the cloud with Subscription settings in place.
- Device Subscription Start (subscrStart) value on Firestore should be timestamp not string.
- Automate the whole 'device settings' process with a step-menu modal.
- On the Firmware Release Upload modal, do not close when clicking outside. Only with CLOSE button or ESC key.
- Implement a system to allow only approved users, to register an account on our app or automate the user creation from the console, and in turn:
- Automate (properly) the device assignment to the users.
- When editing a location allow to show the map even withour coordinates, and add them when I first CLICK on the map.
- On the Quotations page, add "Add Legacy" option.
- Add Uptime Indicator per device
- Add "Retired" option for Melodies
- On the MAIL modal add option to "Seach for Customer" on the email field. When searching and selecting a customer, allow us to choose WHICH email, if they have multiple.
## Customer/FinanceTab:
- The overall Financial Status should be smaller, more compact and differentiated than the active order statuses.
- When an order is complete in terms of finance, make it really obvious (maybe make the whole payment container green)
- Do not allow negative numbers in Amount fields.
## Device Inventory Page:
- Add a button somewhere to "Send APP Link via mail"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
// FIRMWARE:
- When Resetting Settings, via the S1 Key, if on AP Mode, switch back to STA Mode.
- On the /{deviceip}/settings page, add basic auth with pass: "bsvspr8998"
- Add AutoDST switch (figure out the system behind it)
- Add
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
// FLUTTER APP:
- Add a post to firestore each time the app LOGS IN, or Loads the Playback Menu
- Add a option/system to allow the Console to REFRESH the melodies list with the new Titles/Descriptions/Info
- Add option to DELETE melodies
- Add option in the Settings to Test Fire a bell