Skip to content

Latest commit

Β 

History

220 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CresceBR Logo
EnglishΒ Β |Β Β PortuguΓͺs

CresceBR β€” B2B Marketplace

Structured procurement for the Brazilian industrial market.
Verified companies. Volume-based quotations. Full order lifecycle.

React 19 Express 5 TypeScript PostgreSQL 15 Docker License: AGPL v3 or Commercial


CresceBR Dashboard

Why CresceBR

Brazilian B2B procurement runs on phone calls, spreadsheets, and informal channels. CresceBR replaces that friction with a structured workflow: every company is CNPJ-verified before it can transact, quotations follow tier-based volume pricing, and orders are tracked from request through delivery.

The result is a transparent, auditable procurement platform where buyers find verified suppliers, suppliers manage quotations at scale, and administrators maintain full visibility over every transaction.


Key Features

  • CNPJ Verification β€” Real-time company validation via Brasil API; only legitimate businesses participate
  • Role-based Access Control β€” Granular permissions for Buyer, Supplier, and Admin roles enforced at the middleware level
  • Quotation Engine β€” Tier-based volume pricing with automated tax and shipping calculations
  • Order Lifecycle β€” Full status tracking from pending through confirmed, shipped, and delivered
  • Bulk CSV Import β€” Suppliers onboard large product catalogs in a single operation
  • Admin Dashboard β€” Company verification queue, platform analytics, and user management
  • Security Hardened β€” JWT authentication, Helmet headers, rate limiting, and bcrypt hashing

Tech Stack

Layer Technology
Frontend React 19, TypeScript, MUI, Vite
Backend Node.js, Express 5, TypeScript
Database PostgreSQL 15, Sequelize ORM
Auth JWT, bcrypt, Helmet
File handling Multer (CSV import, file uploads)
External API Brasil API (CNPJ validation)
DevOps Docker, Docker Compose

Getting Started

Docker (recommended)

git clone https://github.com/oguarni/CresceBR.git crescebr-b2b-marketplace
cd crescebr-b2b-marketplace

cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.env

docker-compose up --build

Open http://localhost:5173 for the frontend and http://localhost:3001/api/v1 for the API.

Local development

Prerequisites: Node.js 20+, PostgreSQL 15 running locally.

npm run setup   # install all workspace dependencies
npm run dev     # start frontend (port 5173) + backend (port 3001)

Project Structure

crescebr-b2b-marketplace/
β”œβ”€β”€ frontend/          # React 19 + TypeScript + Vite + MUI
β”œβ”€β”€ backend/           # Node.js + Express 5 + TypeScript + Sequelize
β”œβ”€β”€ shared/            # Shared TypeScript types
β”œβ”€β”€ docs/              # Design specs and operational docs
β”œβ”€β”€ docker-compose.yml
└── package.json       # npm workspace root

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  ROUTES + MIDDLEWARE                        β”‚
β”‚           (auth, rbac, validation, rate-limit)              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                     CONTROLLERS                             β”‚
β”‚              HTTP request/response handling                 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                      SERVICES                               β”‚
β”‚              Business logic and orchestration               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                    REPOSITORIES                             β”‚
β”‚              Data access patterns and queries               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                  MODELS (Sequelize ORM)                     β”‚
β”‚              Schema definitions and associations            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  React Frontend  β”‚    β”‚  Express Backend  β”‚    β”‚   PostgreSQL     β”‚
β”‚   (Port 5173)    │◄──►│   (Port 3001)     │◄──►│   (Port 5432)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚
                                β–Ό
                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚   Brasil API     β”‚
                        β”‚ CNPJ Validation  β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

API Overview

All endpoints are served under /api/v1.

Domain Endpoints Description
Auth 4 Register (buyer/supplier), login, profile
Companies 3 List, verify, and stats (admin-only)
Products 6 CRUD, bulk CSV import, template download
Quotations 5 Create, list, detail, update status, process
Orders 5 Create from quotation, list, history, status, stats
Admin 3 Analytics dashboard, company management

Development

npm run dev      # Start frontend + backend concurrently
npm run build    # Production build (shared β†’ backend β†’ frontend)
npm run test     # Run tests across all workspaces
npm run lint     # Lint all workspaces
npm run clean    # Remove node_modules and dist

Backend only:

cd backend
npm run dev      # Hot reload dev server
npm run test     # Jest test suite
npm run lint     # ESLint

Frontend only:

cd frontend
npm run dev      # Vite dev server
npm run build    # Production build
npm run test     # Vitest suite

Demo Credentials

These accounts are seeded into the local development database by backend/seeders/, and the same three are published on the hosted demo as one-click sign-in cards β€” the demo answers its own API in the browser, so there is no server to authenticate against. They are fixtures, not secrets. Do not use these credentials in any real environment.

Role Email Password CNPJ
Admin admin@crescebr.com admin123 00.000.000/0001-00
Supplier supplier@example.com supplier123 22.222.222/0001-22
Buyer buyer@example.com buyer123 33.333.333/0001-33

Documentation

Design specs, operational history, and tooling references live in docs/:

Document Purpose
Security Operations JWT incident record, remediation status, and deployment requirements
Maturity Improvements Security fixes, testing, and business logic enhancements
Prioritized Action Plan Current backlog ranked by priority
Frontend Design Spec Visual language and page layouts

Contributing

  1. Fork the repository
  2. Create a feature branch from main (git checkout -b feature/your-feature)
  3. Write tests for any new functionality
  4. Ensure all checks pass: npm run build && npm run lint && npm run test
  5. Commit with a clear, descriptive message in English
  6. Open a Pull Request against main

Follow the existing conventions: TypeScript strict mode, ESLint + Prettier formatting, and the layered architecture described above. Domain-specific guidance is available in backend/CLAUDE.md and frontend/CLAUDE.md.


License

Copyright (C) 2025-2026 Gabriel Felipe Guarnieri. All rights reserved.

This project is dual-licensed under the AGPL-3.0 + Commercial License model:

Retroactive clause: This license applies retroactively to all past commits and versions of this repository, superseding any previously stated license.

For commercial licensing inquiries, contact the author via LinkedIn.


PortuguΓͺs

CresceBR Γ© uma plataforma de marketplace B2B para o mercado industrial brasileiro. Conecta empresas compradoras e fornecedoras por meio de cotaΓ§Γ΅es estruturadas com precificaΓ§Γ£o por volume, verificaΓ§Γ£o de CNPJ em tempo real e rastreamento completo do ciclo de pedidos.

Destaques

  • VerificaΓ§Γ£o de CNPJ β€” ValidaΓ§Γ£o em tempo real via Brasil API
  • Controle de Acesso β€” PermissΓ΅es granulares para Comprador, Fornecedor e Administrador
  • Motor de CotaΓ§Γ£o β€” PrecificaΓ§Γ£o por volume com cΓ‘lculo automΓ‘tico de impostos e frete
  • Ciclo de Pedidos β€” Rastreamento completo do pedido atΓ© a entrega
  • ImportaΓ§Γ£o CSV β€” CatΓ‘logo de produtos em massa
  • Painel Administrativo β€” VerificaΓ§Γ£o de empresas, analytics e gestΓ£o de usuΓ‘rios

Como comeΓ§ar

git clone https://github.com/oguarni/CresceBR.git crescebr-b2b-marketplace
cd crescebr-b2b-marketplace
cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.env
docker-compose up --build

Acesso: http://localhost:5173 (frontend) | http://localhost:3001/api/v1 (API)

Para instruΓ§Γ΅es detalhadas de desenvolvimento, consulte as seΓ§Γ΅es em inglΓͺs acima.


CresceBR β€” Conectando empresas brasileiras.

About

🏒 Plataforma B2B Marketplace com sistema de cotaçáes, gestão de pedidos, validação de CNPJ via Brasil API, autenticação JWT e painel administrativo. Stack: React + TypeScript + MUI | Node.js + Express + Sequelize.

Topics

Resources

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages