// Evidence Dossier
Occupational Risk Prevention Website
An owned website that presents occupational risk prevention services and makes it easy to enquire. The consultant maintains the homepage from her phone, and each service or industry has a dedicated page.
Clear services and a homepage the consultant can edit from her phone
A company can understand the occupational risk prevention offering and choose how to get in touch. The consultant keeps the homepage current through the panel.
- Update homepage text and photos from her phone.
- Present services and make enquiries easier through a form or WhatsApp.
The author confirmed both benefits from observed use.
- Who it serves
Soledad Barrera, an occupational risk prevention consultant in Atacama, and companies looking to understand her services and contact her.
- My responsibility
Individual end-to-end development: public interface, content panel, Firebase integration, technical SEO and deployment.
- Current status
The author reports the website and admin panel in production, with phone-based editing. Technical checks ran in a local lab.
- What it enables
The consultant can maintain the homepage from her phone and present her services on her own website. The author confirms both benefits from observed use.
Context
A professional services website should help a company understand what it can commission, where the service is provided and how to start a conversation. Here the audience is companies in Atacama looking for occupational risk prevention advice; the administrator is the professional responsible for that offering.
The code presents services, sectors, experience, FAQ and contact. Statements about professional experience and testimonials are commercial content from the source website; this software review does not audit those statements or certify regulatory compliance.
Problem
The problem addressed is maintaining an owned, understandable digital presence, with a clear service-to-enquiry path and editing without code changes. The panel prevents every content update from depending on another developer delivery.
There is no measurement of the previous process or before-and-after commercial comparison. The outcome is therefore stated as delivered capability and reported use, without attributing increased sales or a quantified workload reduction.
My role
I completed the project end to end as sole developer: website design and programming, panel, content and image integration, SEO preparation and production delivery.
Version history explains changes in authentication, Firebase compatibility, mobile administration and indexable pages, documenting implementation decisions and code evolution.
Constraints & mobile autonomy
Phone-based editing needed to fit the work of a professional who does not administer infrastructure. The panel organises sections into forms, provides links to the public view and offers a mobile save control. The interface preserves the consultant’s identity.
Managed services reduce server work but do not establish zero cost: quotas, billing and provider terms were not reviewed. Firebase, email and external channels retain their own dependencies. Validation used an isolated copy without operational credentials or data.
Solution
The website brings services, industries, frequently asked questions and contact options together. For example, the consultant can change a homepage sentence and replace a photograph from the panel. The server validates the fields and saves the section. A company can open a service page directly and reach the contact form from there.
The browser checked the journey from a service to the form, including validation, a network failure and a successful retry with intercepted responses. Real modules exercised saving a section, reading it back and supplying it to the public content reader with simulated storage.
Architecture & diagrams
Next.js 16.3.2 uses App Router, React 19.2.3 and TypeScript, with Tailwind CSS v4 for the interface. The server obtains sections from Firestore and merges fields with default content; remote data is validated before delivery to components. Firebase Auth, Firebase Admin and Storage support identity, server operations and images.
The 13 sections are read in parallel. The homepage configures regeneration every 300 seconds and saving requests its invalidation. Service and sector pages read their specific copy and shared configuration from code files rather than the CMS. Panel edits do not update that configuration in these views. The diagram describes implementation rather than measured cloud availability.
Read the diagram and its limits
Visitors reach the public website and contact channels. The consultant edits the panel using Firebase Auth. The Next.js server saves sections to Firestore and images to Storage. The public website reads sections; defaults are available when a read rejects.
WhatsApp is a separate contact channel; form data goes to Web3Forms. Images are public resources. Default content is not a copy of the latest edit.
The author reports production use. Local checks used test doubles for identity, storage and contact.
Concurrency, integrity & recovery
Default content supports rendering without Firebase configuration and recovering from rejected reads or invalid stored content. This was checked with the real reader and simulated failures. It does not retain the latest valid edit or impose its own maximum wait for a pending remote read.
Saves replace a complete section. Two overlapping requests reached a barrier in the storage double and were both accepted; no version conflict detection exists in that flow. This tests application control, not concurrency against real Firestore.
A simulated failure after persistence returned an error while content remained saved. Image uploads also contain separate steps, so an object can remain stored if publication fails. Automatic recovery, version history and orphan-file removal were not established.
Decisions & tradeoffs
The panel organizes frequent edits by section. Structural changes, service configuration and dedicated page copy follow a development workflow.
Section-based editor
- Benefit
- Forms group text, images and visibility controls so the consultant can edit the homepage from her phone.
- Cost and limits
- Editing follows the available fields. Adding a new structure requires development.
- In plain terms
- A photo or text can be changed in the panel. A new kind of section requires code.
Managed identity and storage
- Benefit
- Firebase provides sign-in, documents and images. The server checks permissions and validates changes before saving.
- Cost and limits
- The panel depends on the configuration, availability and quotas of those services.
- In plain terms
- An authorized account can edit. Managed services keep the data and photographs.
Homepage with default content
- Benefit
- The server delivers the homepage, and saving requests an update. If a data read fails, the site can show default content.
- Cost and limits
- Default content may be older than the latest edit. Saving and invalidating the cache are separate steps.
- In plain terms
- Text can be saved even when updating the public page fails.
Dedicated service and industry pages
- Benefit
- Each page has its own copy and metadata. A company can open the topic it needs directly.
- Cost and limits
- Detailed pages are maintained in code and changes follow the deployment process.
- In plain terms
- The consultant edits the homepage. Individual service details have a separate maintenance workflow.
Security & privacy
Administrative identity and authorisation are checked on the server before saving. The code includes content structure validation, input limits and image checks. Included rules separate public content reads from writes. Their effective Firebase deployment was not checked.
Denied responses and state preservation for invalid input were tested with identity and storage doubles. This does not replace independent provider review or establish absolute protection. Published images are public resources; their validation is not comprehensive file analysis.
The form sends enquiry data to Web3Forms. WhatsApp is a different provider and conversation. Browser checks intercepted submission and responded locally without real email. The case study excludes credentials, account data and reserved operational details.
Testing & verification scope
The review ran again in an isolated Windows copy with Node.js 22.23.2 and npm 10.9.8. The application files, configuration and tests were matched against the original project. The lab used the lockfile and default content with operational configuration excluded.
The original suite passed 13/13 tests across four files. It covers content validation, cursor removal, imports, headers and SEO. Twelve additional checks ran the real modules with simulated identity, storage and cache invalidation.
TypeScript and the build passed, with 22 static entries and four ESLint warnings. Browser checks covered a service, the mobile contact form, intercepted network failure and retry, Escape closing the menu, the login redirect, and a desktop industry page. The compiled API rejected administrative operations without a session. A signed-in panel journey with a real account and inbox delivery remain operational checks.
| Check | Result | Scope |
|---|---|---|
| Original suite | 13/13 · 4 files | 6 content; 1 removed cursor; 2 imports/headers; 4 SEO. Includes source inspection. |
| Additional checks | 12/12 | Real modules; simulated identity, storage and cache. Includes scenarios reproducing limitations. |
| Static analysis and types | 0 errors · 4 warnings | Two unused imports, internal navigation and native image usage. TypeScript passed. |
| Build and startup | Passed · 22 static entries | Next.js 16.3.2. No Firebase credentials: default content rather than production data. |
| Public flow | Checked in browser | Service → mobile contact; native validation; intercepted success and network failure; menu and login. |
| Published sample | 4/4 per language | Exact displayed code and test executed. Educational adaptation, no network. |
| Production and results | In production / no metrics | Website and panel in active use with phone editing. No conversion, availability or Lighthouse measurement. |
Deployment & operation
The author reports the website and panel in production, with phone-based editing. Vercel and Firebase are part of the documented delivery. The current review covers a local build with default content and simulated identity and storage flows.
The compiled API rejected administrative requests without a session, and the browser reached the sign-in page. The homepage configures a five-minute regeneration interval and requests invalidation after saving. Dedicated pages have their own content and update cycles.
Outcome & professional impact
The delivery lets the consultant maintain the homepage from her phone and gives companies an organized view of services with a way to enquire. The author confirmed both observed benefits. I connected the editing workflow to the public website and prepared it for production.
The reported outcome is qualitative. Visits, enquiries, contracts, time saved and commercial return remain metrics to measure.
Evidence & limits
The reviewed code implements the public website, editable panel, validation, technical SEO and image uploads. The lab passed 13 original tests, 12 additional checks, types, build and the public journeys. The displayed sample ran separately in both languages.
Editing checks used identity, persistence and cache doubles. The browser intercepted the contact provider to exercise a network failure and a retry. Operational access to the panel and inbox delivery require separate checks.
The author reports production use of the website and panel and confirms the benefits of phone-based editing and presenting services to facilitate enquiries. Time savings, conversion, availability and a complete accessibility assessment remain pending.
Failure and concurrency checks
The two saves overlapped inside the test process, but storage was a double. Both saves were accepted. Simulated failures exposed persisted state and retry behaviour; they do not establish provider capacity, availability or transaction behaviour.
Operational observations & mobile autonomy
The author reports production use of the website and panel. He also confirmed phone-based editing and value in presenting services and facilitating enquiries. The lab browser checked the public website and form with default content. Reviewing the panel with an operational account requires a separate journey.
Software quality & mobile UX
Editing groups content by section, displays save confirmation and errors, and provides mobile controls. The public site organises services and FAQ through links and labelled forms; mobile navigation closed with Escape. On simulated contact failure, the form retained the entered data and displayed an error.
Lenis avoids animated scrolling when reduced motion is requested; that does not establish that every animation respects the preference. At 1280 px a word break was observed in the source website’s animated heading, while it was fully readable at 1440 px. Product repairs fall outside this request. No WCAG certification or accessibility score is assigned from this partial review.
The case study separates decisions, checks and limits, with an index, mobile-readable diagram, independently scrolling table and wrapping code. Technical documentation is not offered as page downloads.
Code sample & engineering test
The function receives a read operation and a set of defaults. When the read returns a stored section, its heading replaces the default and any missing fields keep their default values. The catch block returns a shallow copy of the defaults if the read fails.
The sample uses flat, synthetic and previously validated content. The code and its four tests run together in Node.js 22 or later with an injected read operation and no external connections.
// Node.js 22+. Synthetic, already validated content. |
async function readPublicSection(read, defaults) { |
try { |
const stored = await read(); |
return { ...defaults, ...(stored ?? {}) }; |
} catch { |
return { ...defaults }; |
} |
} |
Isolated sample test
import assert from 'node:assert/strict'; |
import { test } from 'node:test'; |
|
const defaults = { heading: 'Services', visible: true }; |
test('stored content retains missing defaults', async () => { |
const read = async () => ({ heading: 'Training' }); |
assert.deepEqual(await readPublicSection(read, defaults), |
{ heading: 'Training', visible: true }); |
}); |
test('missing document uses defaults', async () => { |
assert.deepEqual(await readPublicSection(async () => null, defaults), defaults); |
}); |
test('rejected read uses defaults', async () => { |
const read = async () => { throw new Error('Simulated outage'); }; |
assert.deepEqual(await readPublicSection(read, defaults), defaults); |
}); |
test('inputs remain unchanged', async () => { |
const stored = { heading: 'Training' }; |
const result = await readPublicSection(async () => stored, defaults); |
result.heading = 'Edited'; |
assert.equal(stored.heading, 'Training'); |
assert.equal(defaults.heading, 'Services'); |
}); |
4/4 cases passed: missing fields, missing document, rejected read and preserved inputs. Spanish and English use the same sample. This verifies the example; additional project checks use its real modules and are recorded separately.