Skip to content

Bini-2002/afri-verify

Repository files navigation

AfriVerify Logo

AfriVerify

Streamlining African Trade through AI-Powered Compliance.

React Tailwind FastAPI Python Gemini SQLAlchemy SQLite

1. Project Description πŸš€

AfriVerify represents a pioneering full-stack web application designed to empower African small and medium-sized enterprises (SMEs) in navigating the complexities of the African Continental Free Trade Area (AfCFTA) Rules of Origin (RoO). By leveraging AI-driven compliance tools, it enables users to efficiently evaluate RoO adherence and systematically organize evidentiary documentation essential for securing preferential tariffs.


Built with a modern stack:

  • Frontend: React (Vite + Tailwind CSS) πŸ“±
  • Backend: FastAPI + SQLite (SQLAlchemy) βš™οΈ

Users can manage compliance assessments, upload supporting documents, and interact with Zuri β€” an AI assistant powered by Google Gemini for trade guidance πŸ€–.


2. Key Features ✨

  • JWT Authentication (Email/Password) with secure token-based access πŸ”’
  • User Profile with Home Country & Target Market settings πŸ“
  • RoO Value-Added Engine with instant eligibility status πŸ“Š
  • Compliance Assessments tracking per product/shipment πŸ“‹
  • Document Repository for uploading and linking evidence πŸ“‚
  • Zuri AI Chat – context-aware trade assistant (Gemini) πŸ’¬

πŸ“Έ Project Demo

The following gallery showcases the core user interface and the end-to-end compliance journey within the application.

Main Dashboard
1. Main Dashboard: Real-time trade connectivity and activity overview.
RoO Calculator
2. Shipment details: Inputting costs for Ad Valorem eligibility.
Compliance Tracker
3. Compliance Tracker: Step-by-step document verification journey.
Zuri AI Consultant
4. Zuri AI: Context-aware trade consulting and support.
Document Repository
5. Document Repository: Professional management of verified evidence.

3. Tech Stack 🧰

  • React β€” UI screens and components.

  • Vite β€” Dev server + production build.

  • Tailwind CSS β€” Styling and layout.

  • React Router β€” Client-side routing.

  • Python β€” Backend language.

  • FastAPI β€” REST API framework.

  • Uvicorn β€” ASGI server.

  • SQLAlchemy β€” ORM for database access.

  • SQLite β€” Demo database.

  • JWT β€” Token-based sessions.

  • python-jose β€” JWT signing/verification.

  • bcrypt β€” Password hashing (via passlib).

  • Gemini β€” Powers the Zuri assistant endpoint.

  • httpx β€” HTTP client for integrations.


4. Getting Started 🏁

Prerequisites

  • Git
  • Node.js 18+ (npm included)
  • Python 3.11+

Installation

Clone the repository:

git clone https://github.com/Bini-2002/afri-verify.git
cd afri-verify

Backend Setup (FastAPI)

From the server/ folder:

cd server
python -m venv .venv
.
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -r requirements.txt --default-timeout=180

Create your environment file:

  • Copy server/.env.example β†’ server/.env
  • Set at least SECRET_KEY
  • (Optional) set GEMINI_API_KEY to enable the Zuri AI endpoint

Run the API:

python -m uvicorn app.main:app --reload --host 127.0.0.1 --port 8000

You can verify the server is up at:

  • http://127.0.0.1:8000/

Frontend Setup (React)

From the client/ folder:

cd ..\client
npm install
npm run dev

Open the app at:

  • http://localhost:5173/

Quick Auth Test (JWT)

With the API running:

cd ..\server
powershell -ExecutionPolicy Bypass -File .\scripts\smoke_auth.ps1

Notes

  • SQLite schema changes: the backend uses create_all() (no migrations). For a clean run after model changes, delete server/afriverify.db and restart the server.

5. Contributing & Issues 🀝

Contributions, bug reports, and feature ideas are welcome.

How to Contribute

  • Fork the repo and create a feature branch.
  • Keep PRs focused (one feature/fix per PR) and include a short description + screenshots if UI changes.
  • If your change affects the API contract, update the README/docs accordingly.

Suggested workflow:

  1. Open an issue describing what you want to change.
  2. Submit a Pull Request referencing the issue.

Reporting Issues / Requesting Features

  • Use GitHub Issues to report bugs, request features, or suggest improvements.
  • Include:
    • Steps to reproduce
    • Expected vs actual behavior
    • Screenshots/logs (if applicable)
    • Your OS, Node version, and Python version

Code of Conduct

This project aims to be welcoming and inclusive. Please be respectful in issues and PR discussions.


6. Conclusion πŸ™

Thanks for checking out AfriVerify. If you find this project useful for AfCFTA compliance workflows (or want to build on it), please consider starring the repository and sharing feedback via Issues.

7. License

This project is licensed under the MIT License β€” see LICENSE.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors