Logo Lanfrica

SOTECHA/Afriquote-backend

Domaine:

digital infrastructure

Type de record:

software
Créateur:
SOT
Hôte:
The AfriQuote backend is a **zero-dependency** Node.js HTTP API that powers the AfriQuote platform — the all-in-one business tool for African professionals. # AfriQuote — Backend API The AfriQuote backend is a **zero-dependency** Node.js HTTP API that powers the AfriQuote platform — the all-in-one business tool for African professionals. ## Quick start ```bash # 1. Clone / download cd afriquote-backend # 2. Configure environment cp .env.example .env # Edit .env — set JWT_SECRET to a long random string # 3. Seed demo data node scripts/seed.js # 4. Start node server.js # → 0.0.0.0 # 5. Test node tests/test_runner.js ``` No `npm install` needed. All code uses Node.js built-in modules only. --- ## Architecture ``` afriquote-backend/ ├── server.js Entry point — HTTP server ├── .env Environment variables ├── data/ JSON data store (auto-created) │ ├── users.json │ ├── quotes.json │ └── ... ├── src/ │ ├── routes/ │ │ ├── router.js Master dispatcher — all 58 routes │ │ ├── auth.routes.js Auth handlers │ │ └── api.routes.js All other handlers │ ├── services/ │ │ ├── quote.service.js Quote business logic │ │ ├── invoice.service.js Invoice + payment logic │ │ ├── contract.service.js Contracts + scope + change orders │ │ ├── site.service.js Site monitoring + tasks + check-in │ │ ├── time.service.js Time tracking + rate calculator │ │ ├── tax.service.js VAT/WHT for NG/GH/KE/ZA/RW │ │ └── cashflow.service.js Cash flow + expenses + health score │ ├── utils/ │ │ ├── auth.js HMAC-SHA256 JWT, PBKDF2 passwords │ │ ├── db.js File-backed JSON store │ │ └── http.js Request/response helpers │ └── middleware/ │ └── auth.js Bearer token authentication ├── scripts/ │ ├── migrate.js PostgreSQL schema (production upgrade) │ └── seed.js Demo data loader └── tests/ └── test_runner.js 58 tests, zero dependencies ``` ### Data layer The default store is **file-backed JSON** (`/data/*.js …