Skip to content

Latest commit

Β 

History

22 Commits

Folders and files

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

Repository files navigation

SARAI - Stocktaking of Arab Regional AI Initiatives

Platform for AICTO (Arab ICT Organization)

A comprehensive platform for cataloging, managing, and showcasing AI initiatives across the Arab region.


🎯 Project Overview

SARAI is a regional AI repository platform that serves as a centralized hub for:

  • πŸ€– AI Projects and Initiatives
  • 🏒 Stakeholder Organizations
  • πŸ“Š AI Analytics and Statistics
  • πŸ—ΊοΈ Interactive Knowledge Mapping
  • πŸ“š Resource Library

✨ Current Status

βœ… Phase 1: Database Architecture (COMPLETED)

  • Refactored to normalized schema (18 tables)
  • Created 11 new models + improved 6 existing
  • Implemented proper relationships and constraints
  • Added reference data (sectors, SDGs, technologies)

βœ… Phase 2: Data Cleanup (READY)

  • Created scripts to remove fake/test data
  • Prepared 12 REAL Arab AI projects
  • Ready for execution

πŸ”œ Phase 3: Frontend Integration (NEXT)

  • API testing
  • Frontend display
  • Filters and search
  • Responsive design

πŸš€ Quick Start

Prerequisites

  • Python 3.8+
  • PostgreSQL 12+
  • Node.js 16+ (for frontend)

1. Database Setup

# Create database
createdb SARAI_DB

# Configure .env
cd backend
cp .env.example .env
# Edit .env with your database credentials

2. Run Migrations

cd backend
python migrations/001_create_new_schema.py
python migrations/002_migrate_existing_data.py

3. Clean and Populate Data ⭐

# This will remove fake data and add 12 real Arab AI projects
python run_data_cleanup.py

4. Start Backend

uvicorn app:app --reload
# API: http://localhost:8000
# Docs: http://localhost:8000/docs

5. Start Frontend

cd ../frontend
npm install
npm run dev
# Frontend: http://localhost:3000

πŸ“Š Real Projects Included

The platform includes 12 real Arab AI projects from:

  • πŸ‡ͺπŸ‡¬ Egypt - NLP Platform, Manufacturing Robotics
  • πŸ‡²πŸ‡¦ Morocco - Medical Diagnosis, Generative AI
  • πŸ‡―πŸ‡΄ Jordan - Smart Agriculture
  • πŸ‡ΈπŸ‡¦ Saudi Arabia - Climate Research
  • πŸ‡ΆπŸ‡¦ Qatar - Speech Recognition
  • πŸ‡¦πŸ‡ͺ UAE - Smart City Platform
  • πŸ‡ΉπŸ‡³ Tunisia - E-Learning Engine
  • πŸ‡±πŸ‡§ Lebanon - Healthcare Analytics
  • πŸ‡§πŸ‡­ Bahrain - Financial AI
  • πŸ‡΄πŸ‡² Oman - Explainable AI

Expandable to 20+ projects with add_more_projects.py


πŸ—‚οΈ Project Structure

Stage-PFE-AICTO/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ models/          # 17 database models
β”‚   β”‚   β”œβ”€β”€ routers/         # API endpoints
β”‚   β”‚   β”œβ”€β”€ schemas/         # Pydantic schemas
β”‚   β”‚   β”œβ”€β”€ services/        # Business logic
β”‚   β”‚   └── database/        # DB connection
β”‚   β”œβ”€β”€ migrations/          # Database migrations
β”‚   β”œβ”€β”€ run_data_cleanup.py  # ⭐ Main cleanup script
β”‚   β”œβ”€β”€ verify_database_state.py
β”‚   β”œβ”€β”€ test_api_endpoints.py
β”‚   └── README_SCRIPTS.md    # Scripts documentation
β”œβ”€β”€ frontend/                # React frontend
β”œβ”€β”€ docs/                    # Documentation
β”‚   β”œβ”€β”€ DATABASE_SCHEMA.md
β”‚   β”œβ”€β”€ API_ENDPOINTS.md
β”‚   └── MIGRATION_GUIDE.md
β”œβ”€β”€ NEXT_STEPS.md           # 🎯 What to do next
β”œβ”€β”€ WORK_SUMMARY.md         # πŸ“‹ Complete work summary
└── README.md               # This file

πŸ“š Documentation

Getting Started

Technical Documentation

Project Status


πŸ› οΈ Available Scripts

Essential Scripts

# Test database connection
python backend/test_connection.py

# Verify current state
python backend/verify_database_state.py

# Clean and populate with real data ⭐
python backend/run_data_cleanup.py

# Add 8 more projects (optional)
python backend/add_more_projects.py

# Test API endpoints
python backend/test_api_endpoints.py

See README_SCRIPTS.md for complete documentation.


πŸ—„οΈ Database Schema

Core Tables

  • users - Platform users (admin, contributors)
  • projects - AI projects/initiatives
  • organizations - Stakeholder organizations
  • countries - Arab countries
  • sectors - Industry sectors
  • sdgs - UN Sustainable Development Goals
  • ai_technologies - AI technology categories

Relationship Tables

  • project_sdgs - Projects ↔ SDGs
  • project_technologies - Projects ↔ Technologies
  • project_tags - Projects ↔ Tags

Additional Tables

  • documents - Project documents
  • images - Project images
  • comments - Project comments
  • approvals - Approval workflow
  • notifications - User notifications

Total: 18 tables with proper relationships


πŸ”§ Tech Stack

Backend

  • FastAPI - Modern Python web framework
  • PostgreSQL - Relational database
  • SQLAlchemy - ORM
  • Pydantic - Data validation
  • Uvicorn - ASGI server

Frontend

  • React - UI framework
  • Vite - Build tool
  • Axios - HTTP client
  • React Router - Routing

DevOps

  • Git - Version control
  • Python - Scripting and automation

πŸ“Š Features

Current Features βœ…

  • βœ… Normalized database schema
  • βœ… 12 real Arab AI projects
  • βœ… Organization management
  • βœ… Project categorization (sectors, SDGs, technologies)
  • βœ… RESTful API
  • βœ… API documentation (Swagger)
  • βœ… Data validation
  • βœ… Automated data cleanup

Planned Features πŸ”œ

  • πŸ”œ Project approval workflow
  • πŸ”œ User authentication & authorization
  • πŸ”œ Advanced search and filters
  • πŸ”œ Analytics dashboard
  • πŸ”œ Interactive map visualization
  • πŸ”œ Document management
  • πŸ”œ Image galleries
  • πŸ”œ Comment system
  • πŸ”œ Notification system

🎯 Immediate Next Steps

  1. Execute Data Cleanup

    cd backend
    python run_data_cleanup.py
  2. Start Backend Server

    uvicorn app:app --reload
  3. Test API

  4. Verify Frontend

    cd frontend
    npm run dev

See NEXT_STEPS.md for detailed instructions.


🀝 Contributing

Adding New Projects

  1. Edit backend/add_more_projects.py
  2. Add project data to additional_projects list
  3. Run: python add_more_projects.py

Database Changes

  1. Modify models in backend/app/models/
  2. Create migration script in backend/migrations/
  3. Run migration
  4. Update documentation

πŸ“ž Support

Common Issues

Connection fails

  • Check PostgreSQL is running
  • Verify credentials in .env
  • Ensure database SARAI_DB exists

Tables missing

  • Run migrations: 001_create_new_schema.py and 002_migrate_existing_data.py

Reference data missing

  • Run: python migrations/001_create_new_schema.py (seeds data)

No admin user

  • Run: python backend/ensure_admin_user.py

Documentation


πŸ“„ License

This project is developed for AICTO (Arab ICT Organization).


πŸ‘₯ Team

  • Client: AICTO - Arab ICT Organization
  • Developer: Fatma
  • AI Assistant: Kiro
  • Project: SARAI Platform

πŸŽ‰ Acknowledgments

Special thanks to:

  • AICTO for the project vision
  • Arab AI research community
  • All organizations featured in the platform

Status: βœ… Ready for data cleanup and deployment
Version: 2.0
Last Updated: 7 Mai 2026


πŸš€ Get Started Now!

cd backend
python run_data_cleanup.py

Then check NEXT_STEPS.md for what to do next!


Stage-PFE-AICTO

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages