Web system for legal office operations, combining client management, case workflow, legal calendar, finance, role-based access, and a SQLite API with encrypted data at rest.
NeXi Sistema Jurídico is a legal-office platform focused on client lifecycle, attendance pipeline, calendar deadlines, financial tracking, and admin permissions. It runs as a React + Vite frontend and an Express + SQLite backend with authenticated API access.
- Manages client records with detailed personal/contact/address fields.
- Tracks attendance workflow (pipeline-style statuses, logs, responsible users).
- Organizes legal events in multiple calendar views (month/week/day/list), with deadline calculator support.
- Controls financial movements (income/expense, status, installments, classifications, account).
- Provides user/role administration with customizable permissions.
- Persists data through a backend API in SQLite with AES-256-GCM encrypted payloads for clients and app state.
Legal offices often split work across spreadsheets, chat history, and disconnected tools. This project centralizes operational, legal, and financial workflows in one system with permission control and authenticated data access.
- Authentication and session bootstrap via backend token.
- Role and permission checks before page/module access.
- Dashboard with metrics and charts from real application state.
- Client import/export (CSV/XLS/XLSX), filtering, and detailed record handling.
- Attendance list and kanban views with status transitions.
- Calendar filtering by type/status/client/process/responsible and event detail panels.
- Financial tab segmentation (all/open/paid), grouped balances per day, movement presets, and entry modal.
- Reports page with chart-based analytics and PDF export.
- Sensitive data pre-check script for CPF/CNPJ/RG patterns before build/commit.
Dependencies and versions were taken from package.json.
| Package | Version |
|---|---|
| @emotion/react | ^11.13.3 |
| bcryptjs | ^3.0.3 |
| better-sqlite3 | ^12.8.0 |
| cors | ^2.8.6 |
| dotenv | ^17.4.1 |
| express | ^5.2.1 |
| helmet | ^8.1.0 |
| jspdf | ^2.5.1 |
| lucide-react | 0.522.0 |
| react | ^18.3.1 |
| react-dom | ^18.3.1 |
| recharts | ^2.12.7 |
| xlsx | ^0.18.5 |
| Package | Version |
|---|---|
| @types/node | ^20.11.18 |
| @types/react | ^18.3.1 |
| @types/react-dom | ^18.3.1 |
| @typescript-eslint/eslint-plugin | ^5.54.0 |
| @typescript-eslint/parser | ^5.54.0 |
| @vitejs/plugin-react | ^4.2.1 |
| autoprefixer | latest |
| eslint | ^8.50.0 |
| eslint-plugin-react-hooks | ^4.6.0 |
| eslint-plugin-react-refresh | ^0.4.1 |
| gif-encoder-2 | ^1.0.5 |
| gifenc | ^1.0.3 |
| playwright | ^1.58.2 |
| pngjs | ^7.0.0 |
| postcss | latest |
| tailwindcss | 3.4.17 |
| typescript | ^5.5.4 |
| vite | ^5.2.0 |
- Node.js
- npm
No Python runtime is required by this codebase.
- Install dependencies:
npm install- Create local env file from the template:
cp .env.example .envPowerShell alternative:
Copy-Item .env.example .env- Fill required environment variables.
- PORT
- SQLITE_DATA_KEY
- ALLOWED_ORIGINS
- SEED_ADMIN_EMAIL
- SEED_ADMIN_NAME
- SEED_ADMIN_PASSWORD
- VITE_API_BASE_URL
- VITE_REQUIRE_DATABASE
- VITE_VIA_CEP_API_BASE_URL
- SCREENSHOT_LOGIN
- SCREENSHOT_PASSWORD
Important:
- SQLITE_DATA_KEY is required for API startup.
- Variables with VITE_ prefix are embedded into frontend bundles.
Frontend only:
npm run devBackend only:
npm run apiFrontend + backend together:
npm run dev:fullBuild:
npm run buildProduction start (serves API and dist when available):
npm run start- Start API and frontend.
- Log in using a seeded or existing user.
- Manage clients, attendances, processes, calendar events, and financial movements.
- Access reports for chart analytics and PDF export.
- Admin users can manage users/roles and permission toggles.
- GET /api/health
- POST /api/auth/login
- POST /api/auth/logout
- GET /api/users
- POST /api/users
- PUT /api/users/:id/password
- PUT /api/users/:id/active
- POST /api/users/sync
- GET /api/clients
- POST /api/clients/sync
- GET /api/state
- POST /api/state/sync
Current repository already contains visual assets in docs/screenshots:
- docs/screenshots/dashboard-real.png
- docs/screenshots/calendario-real.png
- docs/screenshots/navegacao.gif
If you want to add more screenshots, place them under docs/screenshots and reference them in this README.
.
├─ assets/ # Static image assets used by the UI
├─ docs/
│ └─ screenshots/ # README/demo images and GIF frames
├─ scripts/
│ ├─ check-sensitive-data.mjs # CPF/CNPJ/RG scan in source files
│ ├─ dev-full.mjs # Runs API + frontend together
│ ├─ import-contatos-xlsx.mjs # Helper for spreadsheet import workflow
│ ├─ capture-readme-assets.mjs # Capture utility for README assets
│ └─ build-readme-gif.mjs # Generates navigation GIF
├─ server/
│ ├─ index.js # Express API, auth, SQLite persistence, static serving
│ └─ data/ # SQLite database directory (runtime)
├─ src/
│ ├─ App.tsx # App bootstrap, DB readiness gate, provider composition
│ ├─ components/ # Reusable UI and domain-specific components
│ ├─ config/
│ │ └─ env.ts # Environment assertions/guards
│ ├─ context/ # Auth, data, theme, language providers
│ ├─ data/ # Seed/mock datasets and auth data access helpers
│ ├─ locales/ # i18n dictionaries (pt/en)
│ ├─ pages/ # Feature pages (dashboard, clients, attendances, etc.)
│ ├─ services/
│ │ └─ sqliteApi.ts # Frontend API client layer
│ ├─ types/ # Shared domain types
│ └─ utils/ # Auth, masks, legal deadlines, crypto utilities
├─ .githooks/
│ └─ pre-commit # Runs npm run check:sensitive before commit
├─ .env.example # Environment template
├─ package.json # Scripts and dependency declarations
├─ tailwind.config.js # Tailwind config
├─ postcss.config.js # PostCSS config
└─ vite.config.ts # Vite config
- Fork the repository.
- Create a feature branch.
- Commit your changes with clear messages.
- Run lint and build locally.
- Open a Pull Request describing scope and impact.
Recommended local checks before PR:
npm run lint
npm run check:sensitive
npm run buildNeXi Sistema Jurídico é uma plataforma para operação de escritório jurídico, unificando gestão de clientes, atendimentos, agenda jurídica, financeiro e administração de permissões. O projeto executa com frontend React + Vite e backend Express + SQLite com API autenticada.
- Gerencia cadastro de clientes com dados pessoais, contato e endereço.
- Controla funil de atendimentos com histórico e responsáveis.
- Organiza eventos jurídicos em visões mensal/semanal/diária/lista, com calculadora de prazos.
- Controla lançamentos financeiros (entrada/saída, status, parcelamento, classificação, conta).
- Permite administração de usuários, cargos e permissões customizadas.
- Persiste dados via API no SQLite com payloads criptografados em repouso.
Reduz a fragmentação operacional do escritório (planilhas, controles manuais e ferramentas desconectadas), centralizando fluxo jurídico, comercial e financeiro com autenticação e controle de acesso.
- Login autenticado com token e restauração de sessão.
- Controle de acesso por papel/permissão antes de liberar módulos.
- Dashboard com métricas e gráficos baseados no estado real do sistema.
- Clientes com importação/exportação e formulários detalhados.
- Atendimentos em lista e kanban com transição de status.
- Calendário com filtros por tipo/status/cliente/processo/responsável.
- Financeiro com abas de status, agrupamento diário e modal de lançamento.
- Relatórios com exportação em PDF.
- Verificação automática de padrões sensíveis (CPF/CNPJ/RG) no pipeline local.
As dependências e versões estão listadas na seção em inglês deste README, extraídas diretamente de package.json.
- Node.js
- npm
- Instale dependências:
npm install- Crie o arquivo de ambiente:
cp .env.example .envPowerShell:
Copy-Item .env.example .env- Preencha as variáveis necessárias.
Backend:
- PORT
- SQLITE_DATA_KEY
- ALLOWED_ORIGINS
- SEED_ADMIN_EMAIL
- SEED_ADMIN_NAME
- SEED_ADMIN_PASSWORD
Frontend:
- VITE_API_BASE_URL
- VITE_REQUIRE_DATABASE
- VITE_VIA_CEP_API_BASE_URL
Opcional para scripts locais:
- SCREENSHOT_LOGIN
- SCREENSHOT_PASSWORD
- Inicie API e frontend.
- Faça login com usuário existente/seed.
- Use os módulos de clientes, atendimentos, processos, calendário e financeiro.
- Gere análises na página de relatórios.
- Se for admin, gerencie usuários, cargos e permissões.
As rotas disponíveis estão listadas na seção em inglês, todas extraídas de server/index.js.
Arquivos já presentes para documentação visual:
- docs/screenshots/dashboard-real.png
- docs/screenshots/calendario-real.png
- docs/screenshots/navegacao.gif
A árvore comentada está na seção em inglês e representa a estrutura real atual do repositório.
- Faça fork do projeto.
- Crie uma branch de feature.
- Commit suas alterações.
- Execute lint/check/build localmente.
- Abra um Pull Request com descrição objetiva.
MIT License. See LICENSE.