How a-oirgari/croise1 works
1. Project type and runtime
- This is a client-side only personnel management app.
- It runs entirely in the browser from index.html; no backend, database, or server API is part of the architecture.
- Persistence is done with browser localStorage.
2. Primary user-facing surface
- The main UI lives in index.html.
- It uses Tailwind CSS via CDN for the page layout and controls.
- The floor plan image prov.jpg is the visual canvas on which employee overlays are placed.
3. Visual layer / presentation boundary
- assets/style.css contains the custom styling that Tailwind does not cover.
- Its main role is to position and style the overlay boxes / semi-transparent zones on top of the floor plan.
- This file is purely presentational; it does not own business rules or persistence.
4. Core state and persistence subsystem
- js/storage.js is the persistence boundary.
- It loads and saves app state to localStorage, so employee data and assignments survive page reloads.
- The rest of the app should treat this module as the single source of truth for read/write storage operations.
5. Employee management subsystem
- js/staff.js appears to own the employee CRUD flow:
- add employees
- remove employees
- update employee state
- display employee profiles / assignment state
- This module likely mediates between the UI and storage, translating user actions into persisted staff records.
6. Room / zone rules subsystem
- js/zones.js contains the business rules for zone assignment.
- The README indicates configurable capacities and role-based constraints for areas such as:
- Réception
- Serveurs
- Sécurité
- Archives
- Manager
- Nettoyage
- This is the main domain logic boundary: it decides whether an employee can be assigned to a zone and how capacity is enforced.
7. Modal / interaction subsystem
- js/modal.js handles popups / modal dialogs.
- These dialogs are used for user interactions such as assignment, confirmation, or viewing details.
- It is an interaction layer rather than a data layer; it likely triggers actions in staff.js / zones.js and updates the visible UI.
8. Data flow through the app
- User actions start in the browser UI (index.html).
- Interaction events open modals (modal.js) or trigger employee/zone operations (staff.js, zones.js).
- Those modules update application state and persist it via storage.js.
- The UI is then re-rendered to reflect current assignments on the floor plan.
9. Domain model boundary
- The app’s core model is centered on employees, zones, and assignments.
- The floor plan image is only the spatial representation; the real logic is the mapping of employees to zones and the enforcement of zone constraints.
- This means the diagram should show business rules separate from presentation.
10. External assets and dependencies
- The only notable external dependency is Tailwind CSS CDN.
- The floor plan image prov.jpg is a local static asset that must exist at the project root.
- No third-party backend services are involved.
11. Deployment / delivery
- The repository includes GitHub Actions workflow files under .github/workflows, suggesting static-site automation for publishing.
- The README states deployment is intended via GitHub Pages.
- Architecturally, this means the app is packaged as a static artifact and deployed as-is, without server-side compilation or runtime services.
12. How to draw the architecture
- Show a single browser application container with:
- Presentation/UI: index.html, Tailwind, assets/style.css, prov.jpg
- Interaction layer: modal.js
- Domain logic: staff.js, zones.js
- Persistence: storage.js → localStorage
- The main arrows should flow from user input → UI/modals → business logic → storage → UI refresh.
Main entry points: index.html App UI · storage.js Storage · modal.js Modal layer · staff.js Staff logic
Components 15
Browser app
Static client-side personnel management app running entirely in the browser.
- App UI · Main browser entry point and user-facing surface.
index.html - Tailwind CDN · External utility CSS used for layout and controls.
- Floor plan · Local floor plan image used as the visual canvas for overlays.
- Custom styles · Project-specific styling for overlay boxes and zones.
assets/style.css - Modal layer · Popup and dialog interactions for assignment and confirmation flows.
js/modal.js - Staff logic · Add, remove, update, and display employee assignment state.
js/staff.js - Zone rules · Capacity and role-based constraints for room and zone assignment.
js/zones.js - Storage · Single read/write boundary for app state persisted in localStorage.
js/storage.js - localStorage · Built-in browser persistence used to retain app state across reloads.
- Assignments · Employee-to-zone mappings that drive rendering and validation.
- Employees · Personnel records managed by the application.
- Zones · Configured areas with role and capacity constraints.
Deployment
Static-site automation for publishing the app to GitHub Pages.
- Static deploy · GitHub Actions workflows for publishing the static site.
.github/workflows/static.yml - Static deploy 2 · Additional workflow variant for static-site automation.
.github/workflows/static1.yml - Static deploy 3 · Additional workflow variant for static-site automation.
.github/workflows/projetcstatic.yml
Connections 18
- App UI → Tailwind CDN: uses · Browser page loads Tailwind for layout and controls.
- App UI → Custom styles: styles · Page uses project-specific styling for overlays and zones.
- App UI → Floor plan: shows · Floor plan image is the visual canvas beneath overlays.
- App UI → Modal layer: opens · User actions trigger modal dialogs and popups.
- Modal layer → Staff logic: triggers · Modal interactions lead to staff CRUD and profile actions.
- Modal layer → Zone rules: triggers · Dialogs invoke zone assignment and validation logic.
- Staff logic → Assignments: updates · Staff operations mutate employee assignments and state.
- Zone rules → Assignments: validates · Zone rules decide whether assignments are allowed.
- Assignments → Storage: persisted by · Domain state is saved through the storage boundary.
- Storage → localStorage: writes · Storage module reads and writes browser localStorage.
- Storage → Employees: loads · Persistent state includes employee records.
- Storage → Zones: loads · Persistent state includes zone configuration.
- Storage → Assignments: loads · Persistent state includes current assignments.
- Employees → Staff logic: managed by · Employee records are owned by staff management.
- Zones → Zone rules: governed by · Zones are governed by capacity and role rules.
- Static deploy → App UI: deploys · Workflow publishes the static browser app.
- Static deploy 2 → App UI: deploys · Workflow publishes the static browser app.
- Static deploy 3 → App UI: deploys · Workflow publishes the static browser app.