# Rwanda Export Intelligence Platform (REIP)
A production-ready R Shiny application delivering AI-powered export intelligence for Rwanda. This repository contains the source for the deployed app.
- Live demo: Rwanda Export Intelligence Platform
- Demo credentials: `demo` / `demo123`
## Features
- Secure authentication (login, account settings)
- Export dashboards: trends, performance, heatmaps, product/market views
- AI predictions: market demand scenarios and insights
- GIS mapping: production clusters, transport corridors, resources
- Made in Rwanda: supplier directory and marketplace
- Monitoring: export alerts, market monitoring, price tracking
- Policy & analysis: policy lab, impact analysis, regulatory updates
- Reports & analytics: export reports, market reports, custom analytics
## Project Structure
- `app.R` – Shiny app entrypoint
- `admin_ui.R`, `auth_ui.R`, `dashboard_ui.R` – UI modules
- `auth_server.R`, `dashboard_server.R`, `dashboard_server_with_db.R` – server logic
- `ai_prediction_engine.R` – ML/analytics helpers
- `database_helper.R` – database utilities
- `www/` – static assets (CSS, JS, images, CSVs)
- `rsconnect/` – deployment metadata for shinyapps.io
## Getting Started (Local)
1. Install R (>= 4.2) and RStudio.
2. Install required packages:
```r
install.packages(c(
"shiny", "shinydashboard", "shinyWidgets", "dplyr", "tidyr", "ggplot2",
"plotly", "DT", "sf", "leaflet", "httr", "jsonlite", "lubridate",
"stringr", "readr", "readxl"
))
```
3. Open `Re-Desgn.Rproj` or the folder in RStudio.
4. Run `main.R`.
## Deployment
- The app is configured for shinyapps.io. See `deploy_script.R` and `rsconnect/` content.
- To deploy from RStudio: `rsconnect::deployApp()`.
## 📊 Data Sources
The Rwanda Export Intelligence Platform integrates and analyzes **multi-source export data** to provide actionable insights.
### 🔹 Core Datasets
- **NISR** – Formal External Trade in Goods Survey (2020–2025)
- **BNR** – National Bank of Rwanda: Export values, tra …