Complete and free Metrological Management System developed for B&F LaboratΓ³rio de Metrologia. Full-stack solution for measurement instrument control, automated calibrations, document management, certificates, and commercial proposals.
- Overview
- Monorepo Structure
- Technologies
- Features
- Getting Started
- Deployment
- Testing
- Architecture
- Contributing
KOMETROgo is a comprehensive platform that digitizes and automates metrological management processes, eliminating the use of spreadsheets and paper. The system offers:
- β Complete control of measuring instruments
- π Automatic calibration expiration alerts
- π Document management with versioning
- π PDF certificate and proposal generation
- π₯ Client and team management
- π Automated email notifications
kometro/
βββ bef-landing-page/ # Institutional landing page (Next.js)
βββ frontend/ # SPA web application (React + Vite)
βββ bef-backend/ # REST API + Workers (Django REST Framework)
βββ README.md # This file
Institutional landing page for KOMETRO built with Next.js and Tailwind CSS.
Stack:
- Next.js
- Tailwind CSS
- Bigspring Light Template
Main pages:
- Company history
- Calibration services
- Values and pillars
- Clients and testimonials
- Contact and LGPD (data privacy)
How to run:
cd bef-landing-page
npm install
npm run devAccess: http://localhost:3000
SPA web application for metrological management.
Stack:
- React 18
- Vite
- Material-UI (MUI)
- React Query (TanStack Query)
- React Router v6
- Recharts
- JWT Authentication
Module structure:
auth/- Authentication and password recoveryclients/- Client managementdocuments/- Document management and versioningassets/- Instrument managementproposals/- Commercial proposal generationdashboard/- Dashboards and metricscomponents/- Shared components
How to run:
cd frontend
npm install
npm run devAccess: http://localhost:5173
Configuration:
Copy public/env.js and configure:
window.VITE_API_URL = 'http://localhost:8000'Testing:
npm testREST API and asynchronous workers for task processing.
Stack:
- Django 4.x
- Django REST Framework
- Celery + Redis
- MySQL
- Docker + Docker Compose
- JWT Authentication
- WeasyPrint (PDF generation)
- AWS S3 / DigitalOcean Spaces
Main apps:
clientes/- User management and authenticationinstrumentos/- Instrument catalog and instancesdocumentos/- Documents with versioning and approvalspropostas/- Commercial proposals in PDFavaliacoes/- Evaluation systemequipamentos/- Auxiliary equipmentprocedimentos/- Technical proceduresblog/- Educational content
How to run (development):
cd bef-backend
docker-compose up --buildAPI will be available at: http://localhost:8000
Configuration (.env):
DEBUG=True
SECRET_KEY=your-secret-key
MYSQL_HOST=localhost
MYSQL_USER=kometro_user
MYSQL_PASSWORD=your-password
MYSQL_NAME=kometro_db
EMAIL_HOST=smtp.kinghost.net
EMAIL_HOST_USER=comercial@envios.rkp.com.br
EMAIL_HOST_PASSWORD=your-email-password
CELERY_BROKER_URL=redis://localhost:6379/0
CELERY_RESULT_BACKEND=redis://localhost:6379/0
DIGITAL_OCEAN_ACCESS_KEY_ID=your-key
DIGITAL_OCEAN_SECRET_ACCESS_KEY=your-secret
SITE=http://localhost:8000Services included:
web- Django + Gunicorncelery_worker- Asynchronous task processingcelery_beat- Periodic task schedulingredis- Message broker
Migrations:
docker exec web python manage.py migrateCreate superuser:
docker exec web python manage.py createsuperuser- React 18 - UI library
- Vite - Build tool and dev server
- Material-UI - UI components
- React Query - State management and caching
- React Router - Routing
- Recharts - Charts and visualizations
- Jest - Unit testing
- Django REST Framework - REST API
- Celery - Asynchronous processing
- Redis - Broker and cache
- MySQL - Database
- WeasyPrint - PDF generation
- Docker - Containerization
- JWT - Authentication
- Next.js - React framework
- Tailwind CSS - Styling
- Complete catalog of metrological instruments
- Instance control with unique tags
- Calibration history
- Expiration alerts (30 days, 15 days, expired)
- Certificate uploads
- Document versioning
- Multi-level approval workflow
- Automatic notifications to approvers
- Expiration control
- Secure upload and download
- Automatic PDF proposal generation
- Customizable templates
- Automatic email sending
- Proposal history
- Client and contact registration
- Access control by groups and permissions
- Addresses and contacts
- Interaction history
- Calibration expiration emails
- Document approval notifications
- Document expiration alerts
- Password recovery
- Proposal sending
- Instrument overview
- Calibration status
- Pending documents
- Charts and reports
- Node.js 18+ (for frontend and landing page)
- Python 3.10+ (for backend)
- Docker and Docker Compose (recommended for backend)
- MySQL 8+ (if running backend without Docker)
- Redis (if running backend without Docker)
git clone <repository-url>
cd kometrocd bef-backend
cp .env.example .env # Configure environment variables
docker-compose up --buildcd frontend
npm install
cp public/env.example.js public/env.js # Configure API URL
npm run devcd bef-landing-page
npm install
npm run dev- Landing Page: http://localhost:3000
- Frontend App: http://localhost:5173
- Backend API: http://localhost:8000
- Django Admin: http://localhost:8000/admin
Backend is deployed using Docker Compose with:
- Nginx as reverse proxy
- Certbot for SSL (Let's Encrypt)
- Gunicorn as WSGI server
- Celery workers for asynchronous tasks
- Redis for broker
cd bef-backend
docker-compose -f docker-compose.prod.yml up -dProduction build:
cd frontend
npm run buildFiles will be in dist/ ready for deployment to static servers (Netlify, Vercel, etc.)
Production build:
cd bef-landing-page
npm run buildIntegration tests for all email-sending tasks:
cd bef-backend
docker exec web python manage.py test --keepdb --verbosity=2Specific tests:
# Client email task tests
docker exec web python manage.py test clientes.tests.test_tasks
# Document task tests
docker exec web python manage.py test documentos.tests.test_tasks
# Instrument task tests
docker exec web python manage.py test instrumentos.tests.test_tasksSee TESTING_EMAIL_TASKS.md for details.
cd frontend
npm test- Frontend sends credentials β Backend
- Backend validates and returns JWT tokens (access + refresh)
- Frontend stores tokens in localStorage
- Requests include token in
Authorization: Bearer <token>header - Token expired? Frontend uses refresh token to renew
- API receives request (e.g., send email)
- API enqueues task in Celery via Redis
- Celery Worker processes task
- Result is stored in Redis
- Logs are recorded for monitoring
- Frontend uploads β Backend
- Backend validates and saves to DigitalOcean Spaces (S3-compatible)
- Public URL is returned
- Metadata is saved in MySQL
This is a proprietary project developed for B&F LaboratΓ³rio de Metrologia / KOMETRO.
Proprietary - All rights reserved Β© 2024-2025 B&F LaboratΓ³rio de Metrologia
Laisa Rioverde - Full Stack Developer
- Frontend (React + Vite)
- Backend (Django REST Framework)
- Infrastructure (Docker + AWS)
- DevOps (CI/CD + Monitoring)
π Links
- Landing Page: https://www.kometro.com.br
- App: https://app.kometro.com.br
- LinkedIn: KOMETRO on LinkedIn