CSR Connect is a platform that bridges the gap between corporate social responsibility (CSR) initiatives and academic research aligned with the UN Sustainable Development Goals (SDGs). It automates the process of mapping CSR activities to relevant SDGs and helps companies connect with research projects for meaningful social impact.
✅ Automated SDG Classification: Uses Google Gemini AI to classify CSR projects based on their focus areas.
✅ PDF Parsing & Data Extraction: Extracts text and tabular data from CSR reports using pdfplumber.
✅ Admin Portal: Secure login system to manage CSR projects and classifications.
✅ Search & Filtering: Find CSR projects based on SDG number, implementing organization, location, and project type.
✅ REST API: Provides Django-based API endpoints for data access and integrations.
✅ Modern UI: Built with Next.js, offering a seamless and intuitive user experience.
| Technology | Usage |
|---|---|
| Django 🐍 | Backend API & ORM |
| Next.js ⚛️ | Frontend UI |
| PostgreSQL 🗄️ | Database |
| Google Gemini 🤖 | AI-based SDG Classification |
| pdfplumber 📄 | Extract text & tables from PDFs |
| RAG (Retrieval-Augmented Generation) 🔍 | Enhances AI-based document processing |
| Docker 🐳 | Containerization (optional) |
| REST Framework (DRF) ⚡ | API development |
CSR-Connect/
│── backend/ # Django backend
│ ├── classification/ # AI-based SDG classification service
│ ├── api/ # Django REST Framework APIs
│ ├── models.py # Database models
│ ├── serializers.py # DRF serializers
│ ├── views.py # API views
│ ├── urls.py # API routes
│ ├── settings.py # Django settings
│── frontend/ # Next.js frontend
│ ├── components/ # UI components
│ ├── pages/ # App pages
│ ├── styles/ # CSS & Tailwind styles
│── docs/ # Documentation & API references
│── requirements.txt # Python dependencies
│── package.json # JavaScript dependencies
│── README.md # Project documentation
1️⃣ Clone the repository
git clone https://github.com/your-repo/csr-connect.git
cd csr-connect/backend2️⃣ Set up a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate3️⃣ Install dependencies
pip install -r requirements.txt4️⃣ Configure database (update settings.py for PostgreSQL)
python manage.py migrate
python manage.py createsuperuser # Create an admin user5️⃣ Run the backend server
python manage.py runserver1️⃣ Move to the frontend directory
cd ../frontend2️⃣ Install dependencies
npm install3️⃣ Run the development server
npm run devNow, visit http://localhost:3000 to access the UI.
- Endpoint:
POST /api/classification/upload_pdf/ - Request:
curl -X POST -F "file=@report.pdf" http://localhost:8000/api/classification/upload_pdf/ - Response:
{ "extracted_text": "Extracted content from PDF...", "classifications": [ { "implementing_organisation": "XYZ Foundation", "sdg_number": "3", "sdg_name": "Good Health and Well-being", "district": "Mumbai", "state": "Maharashtra", "project_status": "Ongoing", "project_type": "Annual", "company_name": "ABC Ltd." } ] }
- Endpoint:
GET /api/classification/ - Response: Returns all classified CSR projects.
- Endpoint:
GET /api/classification/<sdg_number>/ - Response: Returns CSR projects classified under a specific SDG.
- Admin Login: Access Django Admin at
http://localhost:8000/admin. - User Authentication: JWT-based authentication for API access (optional).
✅ Interactive Dashboard: Data visualization for CSR activities.
✅ Company & Research Matching: AI-powered recommendations.
✅ Export & Reports: Generate CSV/Excel reports of classified CSR projects.
✅ User Roles & Permissions: Separate views for companies & researchers.
This project is licensed under the MIT License.
Want to contribute?
- Fork the repo
- Create a new branch
- Commit changes
- Push & open a Pull Request
💼 Project Owner:@prasangeet 📧 Email: b23ch1033@iitj.ac.in 🌐 Website: https://prasangeetdongre.vercel.app