Nexus is a serves as the data and logic backbone for a suite of tools targeting researchers, students, and academic institutions in Egypt and the broader Arab world.
# Scholar Nexus — Backend Documentation
> **Author:** Mohamed Gad Mohaned
> **Author:** Each author should write their name here
> **Stack:** Node.js · Express · Supabase · Google Gemini AI · Semantic Scholar API
> **Status:** Active Development
> **Noye:** ابقوا غيروا اسم Scholar Nexus ده
---
## Table of Contents
1. Project Overview
2. Backend Architecture
3. Tech Stack
4. Folder Structure Deep Dive
5. Core Modules Breakdown
6. API Documentation
7. Authentication & Authorization
8. Database Design
9. External Integrations
10. File Upload & Processing
11. Data Flow (End-to-End)
12. Error Handling Strategy
13. Environment & Configuration
14. How to Run the Backend
15. Deployment Guide
16. Scalability & Improvements
17. Contribution Guide
---
## 1. Project Overview
**Scholar Nexus** is a serves as the data and logic backbone for a suite of tools targeting researchers, students, and academic institutions in Egypt and the broader Arab world.
### Key Capabilities
| Feature | Description |
|---|---|
| **Academic Scanner** | Search and deep-analyze researchers via Semantic Scholar + Gemini AI profiling |
| **Topic Explorer** | Paper search and recommendation engine backed by S2 Graph API |
| **Hot Topics Radar** | Admin-curated breakthrough topics stored in Supabase |
| **Jobs Portal** | Multi-filter job board with map data, application handling, and CV upload |
| **Local Researcher DB** | Upload Excel sheets of researchers, enrich with S2 data, expose for filtering |
| **Companies Directory** | Upload and browse tech company profiles with branch mapping |
| **Graduation Projects** | Form submission and dashboard for academic project tracking |
| **User Directory** | Profile-based user registry with skill/university filtering |
| **Authentication** | JWT-based auth with role-based access control (admin / user) |
---
## 2. Backend Architecture
The codebase uses a **flat monolithic pattern** — routes, controllers, and some service logic are colocated inside `serv …