Diagram 1 — Full Request / Response Flow
End-to-End Request Lifecycle
Browser
etechnosoft.com
HTTPS→
GoDaddy Airo
Hosting Platform
routes to→
Express Server
dist/server.bundle.mjs
→
/api/*
API handlers
Static files
dist/client/
SSR catch-all
renderToString
SSR Render Path (non-API requests)
entry-server.tsx
renderToString
runs loaders→
Route Loaders
fetch data server-side
collects→
HelmetProvider
head tags
fills→
index.html
<!--app-head--> <!--app-html-->
→ browser→
React Hydration
main.tsx
Diagram 2 — System Architecture Layers
Layered Architecture
Client Layer — Browser
React 19
UI framework
React Router v8
client routing
Tailwind CSS
styling
shadcn/ui
components
Motion
animations
React Hook Form
+ Zod v4
TanStack Query
client data
↕ SSR hydration
Server Layer — Node.js / Alpine Linux
Express ~5.x
HTTP server
entry-server.tsx
SSR render
BetterAuth
sessions + scrypt
Drizzle ORM
MySQL adapter
busboy
file uploads
html-pdf-node
PDF generation
Airo Email
gateway
↕ Drizzle ORM queries
Data Layer — Persistent Storage
MySQL 8
platform-managed
/shared-storage/
uploads (public)
/private/
private files
Airo Secrets
env vars
↕ platform services
Platform Layer — GoDaddy Airo
Airo Hosting
etechnosoft.com
Custom Domain
DNS + SSL
IndexNow
Bing/Yandex ping
Media Slots
images + video
Git / Versions
auto-commit
Diagram 3 — Authentication Flow
Login Flow
Employee enters ID + Password
↓
POST /api/auth/sign-in/email
email: ETSXXX@etechnosoft.internal
↓
BetterAuth
looks up user table
↓
scrypt verify
@better-auth/utils/password
↓
Session created
httpOnly cookie
↓
/portal
employee
/admin
admin / superAdmin
Role System
superAdmin
- Full employee CRUD
- Approve/reject pending changes
- All admin tabs
- Direct edits (no queue)
admin
- Employee edits → pending queue
- View all timesheets
- View all status reports
- Upload documents
employee
- Portal only
- Submit timesheets
- Submit status reports
- View own documents + ID card
Diagram 4 — Database Schema Relationships
Entity Relationship Overview
user
id (PK)
name
email
isAdmin
1:1
account
id (PK)
userId (FK)
providerId
password (scrypt)
1:1
session
id (PK)
userId (FK)
token
expiresAt
→
employee ★
id (PK)
userId (FK→user)
employeeId
role
firstName / lastName
personalEmail
designation
timesheetReminders
statusReportReminders
→
timesheet
id (PK)
employeeId (FK)
periodStart/End
approvedHours
filePath
statusReport
id (PK)
employeeId (FK)
periodStart/End
projectName
hoursWorked
employeeDocument
id (PK)
employeeId (FK)
documentType
label
filePath
pendingChange
id (PK)
targetEmployeeId (FK)
changeType
fieldChanges (JSON)
status
Diagram 5 — API Route Map
Public / Contact
POST/api/contact/inquiry→ HR email
POST/api/contact/staffing-inquiry→ HR email
POST/api/careers/apply→ careers email + upload
Auth (BetterAuth)
POST/api/auth/sign-in/emaillogin
POST/api/auth/sign-outlogout
GET/api/auth/get-sessionsession check
Employee Portal
GET/api/portal/meprofile
POST/api/portal/timesheetsubmit PDF
GET/api/portal/timesheetslist own
POST/api/portal/status-reportsubmit
GET/api/portal/status-reportslist own
GET/api/portal/id-cardgenerate PDF
Admin Panel
GET/POST/api/admin/employeeslist / create
PUT/DELETE/api/admin/employees/:idupdate / deactivate
PATCH/api/admin/employees/:id/reminderstoggle reminders
GET/POST/api/admin/pending-changesqueue
POST/api/admin/pending-changes/:id/reviewapprove/reject
GET/api/admin/timesheetsall timesheets
GET/api/admin/status-reportsall reports
Diagram 6 — Email & Notification System
Email Flows + Automated Reminder Cron
Transactional Emails
Contact inquiry→info@→HR@reply-to sender
Staffing inquiry→info@→HR@
Job application→careers@→CAREERS_EMAIL+ resume
Timesheet submit→TIMESHEETS@→hr@ + timesheets@
Automated Reminder Cron
Hourly cron
inside Express server
↓
Days 1–5 of month?
check current date
↓
Query employees
timesheetReminders = true
↓
Already submitted?
check timesheet table
↓
No → send reminder
TIMESHEETS@ → personalEmail
Yes → skip
Diagram 7 — File Storage Architecture
Storage Locations & Access Paths
/shared-storage/public/assets/uploads/
Web: /airo-assets/uploads/<path>
Persists across deploys- Employee photos
- Timesheet PDFs
- HR documents
- Job application resumes
/private/
Web: None (auth required)
Persists across deploys- Private sensitive files
- Not web-accessible
/tmp/
Web: None
Ephemeral- Temp processing
- Cleared on restart
dist/client/
Web: express.static
Ephemeral- Built React SPA
- Hashed JS/CSS bundles
- Static assets
Diagram 8 — Page & Route Map
All Routes — Public & Authenticated
/
Homepage
public/it-services
IT Services
public/staffing
Staffing & Consulting
public/careers
Careers
public/contact
Contact
public/login
Employee Login
public/portal
Employee Portal
auth required/admin
Admin Panel
admin role/docs
Architecture Docs
noindex/diagram
Architecture Diagram
noindexDiagram 9 — Full Tech Stack Summary
All Technologies Used
Frontend Framework
· React 19
· TypeScript ~5.x
· Vite ~6.x
· React Router v8
UI & Styling
· Tailwind CSS v3
· shadcn/ui (Radix UI)
· Motion (animations)
· Rajdhani + Inter fonts
Forms & Validation
· React Hook Form v7
· Zod v4.6.7
· @hookform/resolvers v5
Server
· Express ~5.x
· Node.js (Alpine/musl)
· SSR via renderToString
· @dr.pogodin/react-helmet
Database & ORM
· MySQL 8 (platform)
· Drizzle ORM
· drizzle-kit (migrations)
Authentication
· BetterAuth
· scrypt (not bcrypt)
· httpOnly sessions
· Drizzle adapter
File Handling
· busboy (multipart)
· html-pdf-node (PDFs)
· /shared-storage/ (persist)
Email
· Airo Email Gateway
· sendEmail() from email.js
· Hourly reminder cron
Platform / Infra
· GoDaddy Airo hosting
· Custom domain + SSL
· IndexNow (SEO pings)
· Airo Secrets Manager
ETECHNOSOFT INC — Architecture Diagrams v1.0 — December 2026
React 19 · TypeScript · Express · MySQL · BetterAuth · GoDaddy Airo