Client: Tubos Fernandes
Tubos Fernandes — Website, online orders and management panel
See the project live
A paper-tube and food-container-lid factory in Juiz de Fora, Brazil. A complete project: corporate website, online quote requests, an internal panel for the team (orders, quotes, catalog and prices) and a cost spreadsheet.
- Client: Tubos Fernandes — paper cores for toilet paper, paper towels, aluminum foil, PVC and stretch film and the textile industry, plus lids for food containers.
- Timeline: October 6–23, 2026, from first commit to the full system in production.
- Deliverables: website · orders API · team panel · automatic catalog publishing · pricing and cost spreadsheet.
The challenge
Tubos Fernandes needed an online presence that matched the factory, and a single place to organize orders, build quotes and control prices. Each tube’s price came from a hand calculation (paper weight × price per kg), redone for every customer.
The brief was:
- a website that conveyed the trust of an industrial company, showed the product line and received quote requests;
- a panel for the team to answer those requests, build the sales proposal and also serve customers who arrive by phone, WhatsApp or in person;
- the tube price calculation automated, with an adjustable price per kg;
- all of it secure, fast and easy to maintain.
The solution
1. Corporate website
- A visual identity of a “measuring instrument”: a design grid, crosshairs and technical-drawing dimensions, concentric rings that recall the cross-section of a paper tube. Industrial in tone, with no template feel.
- A catalog with a page for each product, manufacturing lines (light and heavy tube, with their diameter and wall ranges) and finishes (natural, white tape, printed with the customer’s brand).
- A quote form with multiple items, measurements, line and finish per item, a tracking number and bot protection.
- Technical SEO: static HTML, structured data (schema.org) for the company, products and breadcrumbs, a sitemap and clean URLs.
- Privacy (LGPD): privacy policy, cookie policy and a defined retention period for orders.
- Product photos with their own art direction, labeled as illustrative until the factory has its own photos.

A catalog with one page per product, on desktop and mobile.

One quote request for several products at once. Whatever the customer doesn’t know can be left blank.
2. Orders API
- Receives the website’s orders and writes them to SQL Server only through stored procedures: the API’s database user can neither read nor change tables directly.
- Strict validation shared with the form (the same schema runs in the browser and on the server), rate limiting per IP, origin checks and a random tracking number.
3. Team panel
Access
- Sign-in with Tubinho, the brand’s 3D mascot: he follows the cursor and covers his eyes when the password field gets focus (video clips with transparency, animated in layers over the original illustration).
- An invisible, in-house captcha (proof of work in the browser, no third-party service and no “click the traffic lights”).
- “Forgot my password” with a single-use link, per-device sessions (a lost phone can be signed out), lockout after failed attempts and admin and staff roles.

Tubinho covers his eyes when the password field gets focus.
Operations
- Orders: a list with search, filters, indicators and a direct reply through WhatsApp.
- Quotes: from a website order or standalone (a customer who called or came to the factory), duplicate a quote, status (issued, sent, approved, declined, expired), default commercial terms and an A4 sales proposal ready for PDF.
- No required fields in a quote: the team generates the proposal with what it has and fills in the rest later.
Pricing by weight
The calculation the factory did by hand became part of the system:
tube weight (g) = (wall + inner Ø) × wall × length × 2.3 ÷ 1000
price per tube = price per kg × weight ÷ 1000
- A price per kg for each finish (natural, white tape, printed), changed only by an administrator and kept with its history.
- In a quote, each tube’s measurements already show weight, tubes per kg and price per tube, per hundred and per thousand. The price is suggested and stays editable.
- A warning when a measurement falls outside the ranges the factory produces.
- The math runs on integers (cents and hundredths of a millimeter) so there are no rounding differences between the screen, the API and the database.
Editable catalog and automatic publishing
- The team creates and edits products, uploads photos (converted and optimized on the server) and flags them as “New” or “Coming soon”.
- The “Publish to website” button triggers a service that regenerates the static site and swaps the files at once: the website stays static and fast and is now updated by the team itself, in seconds, with no developer.
4. Pricing and cost spreadsheet
An Excel spreadsheet that complements the panel, at the client’s request:
- a tube calculator with the same formula as the panel (weight, tubes per kg, price per tube, per hundred, per thousand, total, cost and margin);
- the factory’s monthly costs (rent, water, power, staff with payroll charges, taxes and raw material), with the monthly total, the cost per kg and a suggested price per kg for the desired margin.
Technical highlights
| Area | Choice |
|---|---|
| Front end | Astro 7 (static HTML) + React 19 only where there is interaction (form, panel) |
| Back end | Node.js, Fastify 5, TypeScript |
| Database | SQL Server, 100% access through stored procedures with typed parameters |
| Shared code | Monorepo (npm workspaces) with a shared package for rules and validation (Zod) |
| Images | sharp: photos converted to WebP and thumbnails generated on the server |
| Infrastructure | Windows server, Caddy (automatic HTTPS) and Windows services for the API, panel and publisher |
| Quality | Strict TypeScript, ESLint, Prettier and 121 automated tests; full validation before every release |
| Releases | A safe order (database → API → screens); migrations rehearsed on a copy of the production database before running for real |
Security
- A website with a hash-based Content-Security-Policy for every script and style: an injected script does not run.
- HTTPS with HSTS, clickjacking protection, security headers, and APIs listening only locally behind Caddy.
- A panel with sessions in
HttpOnly/Secure/SameSite=Strictcookies, sessions checked against the database on every request, bcrypt passwords, origin checks against CSRF and an audit trail of actions. - A security audit of the code at the end: no SQL injection found (all access goes through parameterized procedures) and authentication reviewed point by point.
Performance
- Static pages, with no framework loaded where there is no interaction.
- Light visual effects in CSS that respect the system’s “reduce motion” preference; the mouse-following effect at the top was replaced by a static version at the client’s request.
Numbers
| Indicator | Result |
|---|---|
| From first commit to the full system live | 17 days |
| Commits | 26 |
| Lines of code (TypeScript, Astro, SQL, CSS) | ~26 thousand |
| Automated tests | 121 |
| Versioned SQL scripts (tables, procedures, permissions) | 18 |
| Services in production | 3 (website API, panel API, catalog publisher) |