ETECHNOSOFT INC's website is a full-stack web application serving two purposes: a public marketing site for IT services and staffing, and an internal employee portal for timesheets, status reports, documents, and ID cards.
Built on the GoDaddy Airo v8 template — a Vite + React 19 + Express SSR stack with MySQL, deployed on GoDaddy's Airo hosting platform at etechnosoft.com.
Frontend
| Layer | Technology | Version |
|---|---|---|
| Framework | React | 19 |
| Language | TypeScript | ~5.x |
| Build Tool | Vite | ~6.x |
| Routing | React Router | v8 (data router) |
| Styling | Tailwind CSS | v3 |
| UI Components | shadcn/ui (Radix UI) | 40+ components |
| Animation | Motion (Framer Motion) | ~12.x |
| Forms | React Hook Form + Zod | v7 + v4.6.7 |
| SEO | @dr.pogodin/react-helmet | ~3.1.1 |
Backend
| Layer | Technology | Notes |
|---|---|---|
| Server | Express | ~5.x, SSR + API routes |
| ORM | Drizzle ORM | MySQL adapter |
| Database | MySQL 8 | Platform-managed |
| Auth | BetterAuth | Drizzle adapter, scrypt |
| File Uploads | busboy | Multipart streaming |
| PDF Generation | html-pdf-node | ID cards, reports |
| Airo Email Gateway | No SMTP config needed |
src/
├── components/
│ ├── ui/ # shadcn/ui library (40+ components)
│ ├── ContactModal.tsx # Shared contact inquiry modal
│ └── SplashScreen.tsx # Animated session splash screen
├── content/pages/home.json # Inline-editable homepage content
├── layouts/
│ ├── RootLayout.tsx # Wraps all public pages
│ └── parts/
│ ├── Header.tsx # Sticky nav (desktop + mobile)
│ └── Footer.tsx # Footer with contact modal
├── pages/
│ ├── index.tsx # Homepage
│ ├── it-services.tsx # IT Services
│ ├── staffing.tsx # Staffing & Consulting
│ ├── careers.tsx # Careers / job listings
│ ├── contact.tsx # Contact page
│ ├── login.tsx # Employee login
│ ├── portal.tsx # Employee portal
│ ├── admin.tsx # Admin panel
│ └── docs.tsx # This page
├── server/
│ ├── entry.ts # Express server entry
│ ├── db/
│ │ ├── client.ts # Drizzle MySQL connection
│ │ └── schema.ts # All table definitions
│ └── api/ # API handler files
│ ├── admin/ # Admin endpoints
│ ├── auth/ # BetterAuth passthrough
│ ├── careers/ # Job applications
│ ├── contact/ # Contact forms
│ └── portal/ # Employee portal
├── styles/globals.css # Tailwind + CSS variables
├── routes.tsx # Route definitions
└── entry-server.tsx # SSR render entry
/shared-storage/public/assets/ # Persistent file storage
└── uploads/
├── photos/ # Employee profile photos
├── timesheets/ # Submitted PDFs
├── documents/ # HR documents
└── applications/ # Job application resumesServer-Side Rendering (SSR) Flow
Splash Screen
- Shown once per browser session using sessionStorage
- Animated globe MP4 rises and scales, tagline fades in, red progress bar fills
- Fades out after ~3.5 seconds
- Uses a
<video>tag — never swap to a static image
Content Layer
Homepage copy is stored in src/content/pages/home.json and imported via virtual:content. This makes text inline-editable from the Airo canvas without touching code.
Express Server
The server (src/server/entry.ts) handles three categories of requests in order:
- Static assets — files from dist/client/ via express.static
- API routes — all /api/* paths handled by imported handler modules
- SSR catch-all — everything else rendered by entry-server.tsx
API Handler Pattern
// src/server/api/portal/timesheet/POST.ts
import type { Request, Response } from 'express';
export default async function handler(req: Request, res: Response) {
try {
// logic here
res.status(201).json({ ok: true });
} catch (error) {
res.status(500).json({ error: 'Failed', message: String(error) });
}
}
// Then registered in src/server/entry.ts:
import timesheetPost from './api/portal/timesheet/POST';
app.post('/api/portal/timesheet', timesheetPost);Every handler is manually imported and registered in entry.ts — there is no auto-discovery.
File Uploads
Multipart uploads use busboy. Files are streamed directly to /shared-storage/public/assets/uploads/ for persistence across deployments.
MySQL 8 accessed via Drizzle ORM. Migrations managed with drizzle-kit.
| Column | Type | Notes |
|---|---|---|
| id | varchar(36) | UUID primary key |
| varchar(255) | Format: ETSXXX@etechnosoft.internal | |
| isAdmin | boolean | Legacy flag; role on employee table |
| Column | Type | Notes |
|---|---|---|
| accountId | varchar(255) | Same as userId for credential auth |
| providerId | varchar(255) | Always 'credential' |
| password | varchar(255) | scrypt hash via @better-auth/utils/password |
| Column | Type | Notes |
|---|---|---|
| employeeId | varchar(50) | e.g. ETS-001 |
| role | varchar(20) | superAdmin | admin | employee |
| personalEmail | varchar(255) | For reminder emails |
| timesheetReminders | boolean | Email reminder toggle |
| statusReportReminders | boolean | Email reminder toggle |
| Column | Type | Notes |
|---|---|---|
| periodStart / periodEnd | varchar(10) | ISO date YYYY-MM-DD |
| approvedHours | decimal(6,2) | Manager-approved hours |
| filePath | varchar(500) | Path under /shared-storage/ |
| Column | Type | Notes |
|---|---|---|
| projectName | varchar(255) | Current project |
| tasksCompleted | text | Work summary |
| blockers | text | Impediments |
| hoursWorked | decimal(6,2) | Hours for period |
| Column | Type | Notes |
|---|---|---|
| documentType | varchar(100) | offer_letter | agreement | nda | onboarding | other |
| isActive | boolean | Soft delete flag |
| Column | Type | Notes |
|---|---|---|
| changeType | varchar(50) | profile | photo | document_delete |
| fieldChanges | text | JSON: { field: { from, to } } |
| status | varchar(20) | pending | approved | rejected |
Authentication is handled by BetterAuth with the Drizzle adapter connecting to MySQL.
Login Flow
Role System
| Role | Access |
|---|---|
| superAdmin | Full access — approves pending changes, sees all admin tabs, direct employee edits |
| admin | Employee edits go to pending queue for superAdmin approval |
| employee | Portal only — timesheets, status reports, documents, ID card |
Important Config Notes
- baseURL must be explicitly set to
https://etechnosoft.com - trustedOrigins must include
etechnosoft.com— missing this causes MISSING_OR_NULL_ORIGIN errors on the live site - BetterAuth additionalFields (e.g. isAdmin) must have a matching DB column or auth breaks entirely
- Employees created before the scrypt fix have unusable hashes — use admin panel password reset
Public Pages
| Path | Page | Key Features |
|---|---|---|
| / | Homepage | Parallax hero, scroll story, Who We Are, Why Clients Choose Us |
| /it-services | IT Services | Service cards, How We Work, CTA |
| /staffing | Staffing & Consulting | Service cards, process, inquiry form |
| /careers | Careers | 6 job listings, apply modal with resume upload |
| /contact | Contact | Full inquiry form → HR email |
| /login | Employee Login | Employee ID + password, BetterAuth |
Authenticated Pages
| Path | Page | Tabs / Features |
|---|---|---|
| /portal | Employee Portal | Timesheets | Status Reports | My Documents + ID Card |
| /admin | Admin Panel | Employees | Pending Approvals* | Timesheets | Status Reports | Documents (*superAdmin only) |
| /docs | Architecture Docs | This page (noindex — not indexed by search engines) |
Public / Contact
| Method | Path | Description |
|---|---|---|
| POST | /api/contact/inquiry | General contact form → HR@ETECHNOSOFT.COM |
| POST | /api/contact/staffing-inquiry | Staffing inquiry form |
| POST | /api/careers/apply | Job application with resume upload |
Employee Portal (auth required)
| Method | Path | Description |
|---|---|---|
| GET | /api/portal/me | Current employee profile |
| POST | /api/portal/timesheet | Submit timesheet PDF |
| GET | /api/portal/timesheets | List own timesheets |
| GET | /api/portal/timesheets/:tsId | Download timesheet PDF |
| POST | /api/portal/status-report | Submit status report |
| GET | /api/portal/status-reports | List own status reports |
| GET | /api/portal/status-reports/:srId | View/download status report PDF |
| GET | /api/portal/documents | List own HR documents |
| GET | /api/portal/id-card | Generate + download ID card PDF |
Admin (admin/superAdmin required)
| Method | Path | Description |
|---|---|---|
| GET | /api/admin/employees | List all employees |
| POST | /api/admin/employees | Create employee + user account |
| PUT | /api/admin/employees/:id | Update employee (direct or pending queue) |
| DELETE | /api/admin/employees/:id | Deactivate employee |
| POST | /api/admin/employees/:id/reset-password | Reset employee password |
| PATCH | /api/admin/employees/:id/reminders | Toggle reminder email flags |
| GET | /api/admin/pending-changes | List pending change requests |
| POST | /api/admin/pending-changes/:id/review | Approve or reject a change |
| GET | /api/admin/timesheets | List all timesheets |
| GET | /api/admin/status-reports | List all status reports |
Emails are sent via the Airo Email Gateway — no SMTP credentials required.
import { sendEmail } from '../../../email.js';
// Note: relative import path, NOT '#airo/email'Email Flows
| Trigger | From | To | Notes |
|---|---|---|---|
| Contact inquiry | info@etechnosoft.com | HR@ETECHNOSOFT.COM | Reply-to set to sender |
| Staffing inquiry | info@etechnosoft.com | HR@ETECHNOSOFT.COM | |
| Job application | careers@etechnosoft.com | CAREERS_EMAIL secret | Includes resume attachment |
| Timesheet submission | TIMESHEETS@ETECHNOSOFT.COM | hr@ + timesheets@ | |
| Timesheet reminder | TIMESHEETS@ETECHNOSOFT.COM | employee personalEmail | Days 1–5 of month |
| Status report reminder | HR@ETECHNOSOFT.COM | employee personalEmail | Days 1–5 of month |
Automated Reminders
- Run on an hourly cron inside the Express server
- Fire only on days 1–5 of each month
- Stop automatically once the employee submits for the current month
- Per-employee enable/disable via admin panel reminder toggles
| Location | Purpose | Web URL | Persists? |
|---|---|---|---|
| /shared-storage/public/assets/uploads/ | Employee photos, timesheets, documents, resumes | /airo-assets/uploads/<path> | Yes — survives deploys |
| /private/ | Private files (not web-accessible) | None — requires auth | Yes |
| /tmp/ | Temporary processing files | None | No |
| dist/client/ | Built React SPA + static assets | Served by express.static | Rebuilt on each deploy |
Media Slots (Airo Asset System)
| Slot | Type | Content |
|---|---|---|
| logo/horizontal | Image | ETECHNOSOFT PNG logo |
| pages/home/hero-video | Video | Animated globe MP4 (header + splash) |
| pages/home/hero-bg | Image | Dark circuit board background |
| pages/it-services/hero-bg | Image | Data center photo |
| pages/staffing/hero-bg | Image | Recruitment handshake photo |
Brand Colors
| Token | Value | Usage |
|---|---|---|
| --primary | hsl(0 100% 50%) — Red | CTAs, accents, active borders |
| --secondary | hsl(210 100% 40%) — Blue | Icons, highlights, links |
| --background | hsl(0 0% 0%) — Black | Page background |
| --foreground | hsl(0 0% 96%) — Near white | Primary text |
| --card | hsl(0 0% 5%) — Dark grey | Card surfaces |
| --muted-foreground | hsl(0 0% 50%) — Mid grey | Secondary text |
Typography
| Role | Font | Weights |
|---|---|---|
| Headings (h1–h6) | Rajdhani | 600, 700 |
| Body / UI | Inter | 400, 500, 600 |
Rules
- All colors defined as CSS custom properties — no hardcoded hex values anywhere
- Logo in UI uses
<video>(animated MP4); in PDFs uses static PNG absolute URL - Mobile header: Logo + Login + hamburger only; dropdown reveals nav links
htmlandbodyhaveoverflow-x: hiddenglobally to prevent horizontal scroll
| Area | Implementation |
|---|---|
| Password hashing | scrypt via @better-auth/utils/password — never bcrypt |
| Sessions | httpOnly cookies, BetterAuth session management |
| CORS | trustedOrigins: ['etechnosoft.com'] in BetterAuth config |
| Input validation | Zod schemas on all API inputs |
| File uploads | busboy stream-to-disk, no temp files in memory |
| Secrets | Airo Secrets Manager — never in source code |
| XSS | React's built-in escaping + eslint-plugin-no-unsanitized |
| Dependency audit | better-npm-audit at high severity level |
Patched Vulnerabilities (Dec 2026)
- Critical BetterAuth: Account takeover via pre-account hijacking
- Critical cross-spawn: Command injection on Windows
- High React Router: DoS via unbounded route-manifest expansion
- High Zod: Memory exhaustion on oversized collections
Build Process
npm run build
# Runs two Vite builds in sequence:
# 1. vite build → dist/client/ (React SPA + static assets)
# 2. vite build --ssr → dist/server.bundle.mjs (Express + SSR)Publishing Flow
Environment Secrets
| Secret | Purpose |
|---|---|
| BETTER_AUTH_SECRET | BetterAuth session encryption key (auto-generated) |
| CAREERS_EMAIL | Destination email for job applications |
Runtime Notes
- Runtime: Node.js on Alpine Linux (musl)
- No glibc native addons — use pure-JS alternatives (bcryptjs not bcrypt, jimp not sharp)
- Persistent storage at
/shared-storage/and/private/ - Database credentials are platform-managed — not exposed as secrets
ETECHNOSOFT INC — Architecture Documentation v1.0 — December 2026
Built with GoDaddy Airo · React 19 · TypeScript · Express · MySQL · BetterAuth