Language / Idioma: English | Português (Brasil)
If you do not speak English and would prefer to read this documentation in Portuguese, please click here.
A responsive web platform engineered to eliminate paper-based floor workflows, prevent version redundancy, and centralize the lifecycle of industrial Quality Management documents.
- Flash Upload Server
This project was born out of an industrial challenge submitted through the SAGA SENAI de Inovação platform for a Steel Products Manufacturing Company.
In the factory under study, operators on the production line lacked digital access points to consult standard operating procedures and register inspection sheets. Consequently, the operational flow suffered from severe inefficiencies:
- Double Handling & Motion Waste: Operators recorded measurements and checks on paper sheets and routinely had to walk from the production floor to the administrative office to have them scanned.
- Version Divergence & Redundancy: Documents existed simultaneously in physical binders and disconnected network folders, creating duplicate records and the risk of operators working with obsolete revisions.
- Operational Waste (Lean Manufacturing): Excessive paper, printer toner consumption, loss of productive operator hours, and cluttered physical archives.
Flash is a lightweight, responsive Electronic Document Management System (EDMS) built to bridge the floor-to-office gap.
By deploying tablet devices directly on the production lines alongside administrative desktop stations, Flash provides an instantaneous channel to:
- Digitize physical records via mobile cameras/scanners directly at the workstation.
- Search and consult operational standards (POPs, technical drawings, inspection sheets) in real time.
- Eliminate duplicate files and enforce document retention and expiration policies.
- Single Source of Truth: Centralize all Quality Management documentation under a single digital repository.
- ISO 9001 Compliance: Meet the requirements for Documented Information (clause 7.5), ensuring standard distribution, traceability, access control, and revision management.
- Waste Reduction: Drastically minimize paper usage, physical storage needs, and administrative scanning bottlenecks.
Flash follows a full-stack architecture built on Next.js (Pages Router with Server-Side Rendering) coupled with MongoDB Atlas for document and metadata persistence.
flowchart TD
subgraph Clients["Clients / Access Devices"]
Op["📱 Floor Operator<br/>(Tablet / Mobile Device)"]
Adm["🖥️ Admin Staff<br/>(Desktop Workstation)"]
end
subgraph Platform["Flash EDMS Platform (Next.js 14)"]
Auth["🔒 Auth & Session Management<br/>(HTTP-Only Cookies & Bearer Tokens)"]
UI["🎨 Frontend Interface<br/>(React 18 + SCSS Modules + SWR)"]
API["⚙️ Next.js API Routes<br/>(/api/files, /api/login, /api/notifications, /api/search)"]
Crypto["🛡️ Cryptographic Engine<br/>(SHA-256 Payload Hash & Mime Validator)"]
end
subgraph Database["Data Layer (MongoDB Atlas)"]
ColFiles[("📁 Files Collection<br/>Payload Buffer, SHA-256, Expiry, Access")]
ColUsers[("👤 Users Collection<br/>Credentials & Access Roles")]
ColTokens[("🔑 UserTokens Collection<br/>Session Invalidation & Timers")]
end
Op -->|Public Floor Credential| Auth
Adm -->|Administrative Credential| Auth
Auth --> UI
UI --> API
API --> Crypto
Crypto --> ColFiles
API --> ColUsers
API --> ColTokens
To avoid storing identical files multiple times (a common issue when multiple shifts scan the same standard or duplicate files are uploaded), Flash hashes the raw file buffer using the SHA-256 algorithm before persisting:
const hash = Crypto.createHash("sha256").update(fileBuffer).digest("hex")
const fileDocument = await File.findOne({ hash })
if(fileDocument){
throw "Este arquivo já foi enviado para o servidor" // Duplicate detected
}This guarantees storage efficiency, referential integrity, and verifiable content authenticity.
Quality documentation (calibration reports, POPs, work safety protocols) must remain strictly up to date. The system periodically computes the time remaining until each file's expiration date (
When /api/notifications service automatically alerts users across the navigation bar, preventing operators from referencing expired standards.
Flash implements a two-tier permission system:
- Public (
public): Dedicated to floor tablets. Requires a collective password, allowing operators to consult published documents and submit production records without complex individual account overhead. - Administrative (
all): Granted to Quality Managers and Administrators. Allows access to both public and confidential/private files, editing document metadata, updating expiration dates, and managing system users.
Documents are organized into five industrial quality categories:
| ID | Document Type | Reduced Code | Industrial Description |
|---|---|---|---|
1 |
Ata | Ata |
Meeting minutes, internal audits, and quality committee notes. |
2 |
Procedimento Operacional Padrão | POP |
Standard Operating Procedures for machine handling and assembly. |
3 |
Inventário | Inventário |
Stock reports, raw material tracking, and finished goods counts. |
4 |
Ordem de Serviço | OS |
Maintenance logs, work requests, and production tasks. |
5 |
Nota Fiscal | NF |
Invoices, receipt records, and raw steel supplier certificates. |
Commercial enterprise EDMS solutions typically charge prohibitive recurring monthly software-as-a-service (SaaS) fees. As part of the technical-economic viability study conducted at SENAI, a cost-effective deployment package was engineered for industrial adoption.
The implementation was structured around minimal capital expenditure (CapEx) and operational expenditure (OpEx):
| Category | Component | Value (BRL) | Description |
|---|---|---|---|
| Costs (CapEx) | Software Engineering & Setup | R$ 300,00 | Deployment, database setup, and configuration. |
| Costs (CapEx) | Floor Hardware (Tablet Multilaser M7) | R$ 349,00 | Dedicated touch device for the factory workstation. |
| Subtotal Costs | R$ 649,00 | Initial implementation investment. | |
| Expenses (OpEx) | Industrial Broadband Access | R$ 99,90 | Plant floor network connectivity. |
| Expenses (OpEx) | Cloud Hosting & Infrastructure | R$ 13,99 | Server and database hosting tier. |
| Subtotal Expenses | R$ 113,89 | Monthly infrastructure expense. | |
| Total Cost ( |
R$ 762,89 | Base project investment cost. |
Following Brazilian industry profitability benchmarks (which advise between
-
Total Implementation Cost: $$C_{\text{total}} = \text{Costs} + \text{Expenses} = 649{,}00 + 113{,}89 = \text{R$ } 762{,}89$$
-
Net Profit Margin (
$12%$ ): $$\text{Profit} = C_{\text{total}} \times M = 762{,}89 \times 0{,}12 = \text{R$ } 91{,}94$$ -
Final Commercial Package Price: $$P_{\text{sale}} = C_{\text{total}} + \text{Profit} = 762{,}89 + 91{,}94 = \mathbf{\text{R$ } 854{,}33}$$
This initial investment offers a rapid payback period by cutting printing/paper expenses and eliminating hundreds of hours wasted on transit between factory floor and administrative offices.
- Next.js 14 – Hybrid Server-Side Rendering (SSR) and Client-Side Navigation for instant page transitions.
- React 18 – Component-driven modular UI architecture.
- TypeScript – Static type safety across client, models, and API boundaries.
- Sass (SCSS Modules) – Scoped component styling and design tokens.
- SWR – Client-side data fetching, caching, and revalidation.
- React-Toastify – Feedback notifications for user interactions.
- Next.js API Routes – Serverless endpoint architecture.
- MongoDB Atlas – Cloud NoSQL document database.
- Mongoose 8 – Schema definition, data validation, and model lifecycle management.
- Busboy – High-performance streaming multipart form data parser.
- Sharp – Fast image processing and optimization.
- Crypto (Node.js native) – Cryptographic SHA-256 hash calculation.
Simple login barrier offering separation between standard factory-floor profiles and administrative accounts.
Clean dashboard welcoming the operator, with instant access to the multi-file upload action and notifications displaying documents nearing their expiration date.
Organized folder structure grouping files by Quality categories (Ata, POP, Inventário, OS, NF).
Upload modal with drag-and-drop support, individual document naming, creation date, expiration date picker, category tag, and public/private privacy toggle.
Administrative interface for creating, editing, and supervising system operators, user roles, and system credentials.
- Node.js:
v20.19.0or higher - Package Manager: pnpm (recommended) or
npm - Database: A running MongoDB Atlas cluster or local MongoDB instance (
>= 6.0)
-
Clone the repository:
git clone https://github.com/Alphka/Flash-Upload-Server.git cd Flash-Upload-Server -
Install dependencies:
pnpm install
-
Configure environment variables: Create a
.env.localfile in the project root:cp .env.example .env.local
Edit .env.local and provide your MongoDB connection string:
| Variable | Description | Example |
|---|---|---|
MONGODB_URI |
MongoDB connection URI string with authentication and database name | mongodb+srv://user:pass@cluster.mongodb.net/flash?retryWrites=true&w=majority |
-
Development mode (with Hot Module Replacement):
pnpm dev
Open http://localhost:3000 in your browser.
-
Production build & execution:
pnpm build pnpm start
This project was conceived, designed, and presented at:
- Institution: SENAI – Serviço Nacional de Aprendizagem Industrial
- Campus: Centro de Formação Profissional Luiz de Paula (Montes Claros - MG, 2023)
- Course: Curso Técnico em Qualidade
- Discipline: Projeto de Inovação (Instrutora: Mariane Mota)
- Project Team:
- Kayo Felipe de Souza Melo
- Larissa Aparecida Silva de Oliveira
- Maria Eduarda Carreiro Lopes
- Vitória Ferreira Rocha
- Maria Eduarda Carvalho de Souza
This project is released under the terms of the MIT License.




