Full-Stack Web App

EquipTrack

Equipment inventory and rental management system for event companies. Tracks audio, video, lighting, and furniture across concurrent events — fully customizable per company via theme, logo, and favicon. Deployed on Cloudflare Workers + D1.

What is EquipTrack?

EquipTrack is a web-based inventory and rental control system for event companies. It manages the full equipment rental lifecycle: creating events, assigning equipment, checking items in and out, logging maintenance, and tracking damage. The customization features — swappable logo, favicon, and full color theming — are built in precisely so any company can adopt it as their own.

The system started as an internal tool by Arthur Perico, who designed and built the core platform and migrated it to Cloudflare Workers + D1 for edge deployment. I later joined the project and introduced a set of improvements ranging from UI/UX enhancements to CI/CD automation.

Technical Scope

  • Stack: JavaScript, Node.js, Express (local), Cloudflare Workers, Cloudflare D1 (SQLite-compatible), bcryptjs, GitHub Actions
  • System Type: Full-stack web app, serverless backend, inventory management SaaS-style system
  • Deployment: Cloudflare Workers (API + assets) + GitHub Pages (static front-end mirror via Actions)

System Overview

EquipTrack — Sistema de Estoque para Eventos

Backend: Cloudflare Workers Database: D1 Frontend: HTML + CSS + JS CI/CD: GitHub Actions License: MIT

A complete inventory and rental management system for event companies. Manages audio systems, cameras, lighting rigs, video boards, and event furniture across concurrent events — with full branding customization so any company can deploy it as their own tool.

Core Modules

ModuleDescription
EventsCreate, search, and manage events. Each event tracks its equipment assignments.
RentalCheck equipment in and out per event. Prevents overbooking across simultaneous events.
MaintenanceRegister damage, breakdowns, and repairs on equipment and cables. Tracks maintenance history.
Database (Banco)Full browse view of registered equipment, cables, and other items.
RegisterAdd new equipment by name, barcode, and category. Separate forms for equipment, cables, and generic items.
HistoryFull audit log of all rental movements and event operations.
Users (Admin)Admin-only panel for managing login accounts and permissions.

Architecture

Browser (Client)
  └─ public/
       ├─ login/index.html      ← Login + guest mode toggle
       ├─ index.html            ← Main SPA (all modules as sections)
       ├─ css/                  ← Modular styles: app.css, theme.css, login.css, event.css
       ├─ js/                   ← app.js, login.js, event.js, storage.js
       └─ assets/images/        ← Logo, favicon (WebP)

Cloudflare Worker (Edge)
  └─ src/worker.mjs
       ├─ Page routing          ← Redirects authenticated users away from login
       ├─ /api/login POST       ← bcrypt session authentication
       ├─ /api/logout POST      ← Session invalidation
       ├─ /api/auth/status GET  ← Auth check (guest detection)
       ├─ /api/events           ← CRUD for events
       ├─ /api/equipments       ← CRUD for equipment
       ├─ /api/cables           ← CRUD for cables
       ├─ /api/others           ← CRUD for generic items
       ├─ /api/rentals          ← Rental movements per event
       ├─ /api/maintenance      ← Damage and repair records
       ├─ /api/history          ← Full movement log
       └─ /api/users            ← Admin-only user management

Cloudflare D1 (SQLite)
  └─ migrations/0001_initial.sql
       ├─ users
       ├─ events
       ├─ equipments
       ├─ cables
       ├─ other_items
       ├─ rentals
       ├─ maintenance
       └─ history

Guest Mode

Users can enter as Convidado (Guest) without credentials. In guest mode, all data is persisted entirely in localStorage via the DataStorage class in js/storage.js, which transparently switches between the API and browser-local storage depending on authentication state. Guest data is scoped per browser session and requires no server interaction.

Theme Customization

All color values are driven by CSS custom properties (--primary, --primary-2, --primary-3, etc.) defined in css/theme.css. Users can pick a custom accent color via an in-app color picker, which writes to localStorage and applies immediately via document.documentElement.style.setProperty(). Custom logo images and favicons can also be set and are persisted to localStorage as base64 strings.

Inline SVG Icons

The original system used emoji characters as menu icons. These were replaced with custom inline SVGs whose stroke color inherits currentColor, allowing them to automatically adapt to the active theme color set via the CSS --primary variable. This makes the entire icon set theme-aware with zero JavaScript overhead.

Sidebar Toggle

A collapsible sidebar was added via a toggle button (#sidebarToggle). When collapsed, the sidebar slides out of view and the main content area expands — useful on smaller screens and for focused work sessions.

Automatic Versioning & Cache Busting (GitHub Actions)

Two GitHub Actions workflows automate the deployment pipeline:

  • deploy-pages.yml — On push to main, checks out the repo, injects the short Git commit SHA into all __BUILD_VERSION__ placeholders in HTML files (used in ?v=__BUILD_VERSION__ CSS/JS links), then deploys public/ to GitHub Pages.
  • sync-docs.yml — Whenever public/ changes, automatically copies it to docs/, injects the same build version token, commits, and pushes — keeping the docs/ folder in sync for alternative GitHub Pages hosting.

Cloudflare D1 Deployment

# Install dependencies
npm install

# Login to Cloudflare
npx wrangler login

# Create D1 database
npx wrangler d1 create sistema-estoque-24h

# Apply schema migrations
npx wrangler d1 migrations apply sistema-estoque-24h --remote

# Export local SQLite data to D1-compatible SQL
npm run export:d1
npx wrangler d1 execute sistema-estoque-24h --remote --file d1-export.sql

# Deploy worker
npm run deploy

Local Development

npm install
npm run dev           # Express server on localhost
# or
npm run dev:worker    # Wrangler local emulation

Authorship & Contributions

The original system was designed and built by Arthur Perico. I joined the project and introduced a set of targeted improvements — listed separately below to reflect accurate attribution.

◆ Original System — Arthur Perico

  • Core system design and full business logic
  • Equipment, event, cable, maintenance, and history modules
  • Login and session authentication (bcryptjs)
  • Admin user management panel
  • Backend migration from Express/SQLite to Cloudflare Workers + D1
  • Database schema and SQL migrations
  • Scripts for SQLite backup and D1 data export
  • Rental overbooking prevention logic
github.com/arthurperico

◆ My Contributions — Patrick Araujo

  • Full SEO refactor: meta description, Open Graph, Twitter Cards, JSON-LD structured data on all pages
  • Collapsible sidebar with toggle button and animated chevron icon
  • Custom color picker system — accent colors persisted to localStorage, applied via CSS variables
  • Custom logo and favicon upload, stored as base64 in localStorage
  • Replaced emoji menu icons with inline SVG icons — color-adaptive via CSS currentColor
  • Guest mode: DataStorage class transparently switches between API and localStorage
  • Button and visual bug fixes
  • Automatic versioning via GitHub Actions (deploy-pages + sync-docs workflows)
  • Cache busting with ?v=__BUILD_VERSION__ injected at deploy time
  • Project file reorganization: flat public/ → structured css/, js/, assets/ directories
  • Asset conversion: logo and favicon from PNG to WebP
github.com/PkLavc

Feature Attribution at a Glance

FeatureAuthor
Events, Rental, Maintenance, History modulesarthurperico
Cloudflare Workers + D1 backendarthurperico
bcryptjs session authenticationarthurperico
Admin user managementarthurperico
SEO: meta tags, OG, Twitter, JSON-LDPkLavc
Collapsible sidebar togglePkLavc
Color picker + theme persistencePkLavc
Logo + favicon customizationPkLavc
Inline SVG icons (color-adaptive)PkLavc
Guest mode (localStorage DataStorage)PkLavc
GitHub Actions CI/CD + cache bustingPkLavc
File structure reorganization + WebP assetsPkLavc

Technology Stack

JavaScript
Cloudflare Workers
Cloudflare D1
Node.js
Express
bcryptjs
GitHub Actions
SQLite
CSS Variables
localStorage API

View the Project