How andrefan1406/stroy-hub works
This is an internal construction-operations portal: employees submit specialized requests and use workforce, concrete, equipment, and project reports; administrators manage access and reporting data. The React router is the visible entry point, while an Express backend provides concrete request/report APIs, administrative checks, and an AI chat. The backend also synchronizes several operational datasets into SQLite. The README describes only Create React App setup, so product capabilities are inferred from the source tree and sampled comments; unsampled route and subsystem wiring is shown only where the excerpts establish it.
Main entry points: App.js App router · index.js Express API · db.js SQLite database · chatHandler.js Text-to-SQL chat
Components 20
Employee portal
- App router
src/App.js - Request forms
src/RequestPage.js - Concrete requests
src/ConcreteRequestPage.js - Specialist requests
src/ElectricansRequestPage.js
Operations reporting
- Reports and dashboards
src/ReportsDashboardPage.js - Concrete reports
src/pages/ConcreteDashboardPage.jsx - People reports
src/PeopleReportPage.js - Admin pages
src/pages/AdminDashboardPage.jsx - Pending requests
src/components/ConcretePendingRequestsTable.jsx
Backend services
- Express API
server/index.js - Text-to-SQL chat
server/chatHandler.js - SQL safety
server/sqlGuard.js - Concrete sync
server/syncConcrete.js - People sync
server/syncPeople.js - Object sync
server/syncObjects.js - Defect sync
server/syncDefectActs.js
Data and integrations
- SQLite database
server/db.js - Ollama Cloud
- Google Sheets
Other components
- Employee
Connections 25
- Employee → App router: uses
- App router → Request forms: routes to
- App router → Concrete requests: routes to
- App router → Specialist requests: routes to
- App router → Reports and dashboards: routes to
- App router → Concrete reports: routes to
- App router → People reports: routes to
- App router → Admin pages: routes to
- Concrete requests → Pending requests: displays
- Pending requests → Express API: fetches pending
- Pending requests → Express API: posts hide
- Express API → Text-to-SQL chat: dispatches chat
- Text-to-SQL chat → SQL safety: validates SQL
- Text-to-SQL chat → SQLite database: queries
- Text-to-SQL chat → Ollama Cloud: requests model
- Express API → SQLite database: initializes schema
- Express API → Concrete sync: starts sync
- Express API → People sync: starts sync
- Express API → Object sync: starts sync
- Express API → Defect sync: starts sync
- Concrete sync → SQLite database: stores records
- People sync → SQLite database: stores records
- Object sync → SQLite database: stores records
- Defect sync → SQLite database: stores records
- People sync → Google Sheets: imports data