How raghuvartandon15/sih-23-project works
Project Type and Purpose
• This is a full-stack Django web application (“Institute Level Verification Portal”) with two Django apps (“users” and “scholar”).
• Purpose: Centralized institute-level inter-state student verification for scholarship benefits, leveraging Aadhaar verification, OCR, blockchain/IPFS storage, and a Dialogflow bot.
File Structure
• Top-level:
• manage.py, project/ (Django settings, URLs, ASGI/WGSI)
• db.sqlite3 (development database)
• media/ (user-uploaded docs)
• static/ (compiled front-end assets: JS/CSS likely from Angular or similar SPA)
• templates/ (Django templates – split into templates/scholar and templates/users)
• Two Django apps:
• users/ (authentication, registration, decorators, user models)
• scholar/ (scholarship application models, forms, views, manager, OCR/temp handlers)
• Config files: project/settings.py controls installed apps, middleware, static/media roots; URLs wired in project/urls.py, and each app has its own urls.py.
• Migrations folders indicate relational models for users and scholar.
README for Additional Insights
• Features mentioned but not necessarily all implemented:
• Aadhaar-based verification (external UIDAI API)
• Blockchain for tamper-proof document storage + IPFS for NSID storage
• Computer Vision (EasyOCR, PaddleOCR)
• Dialogflow chatbot
• Dashboard interfaces for institute, state, student roles.
Main Components
a. Web Client / Browser (UI Layer)
• Loads HTML templates + static JS/CSS (SPA assets + CSS)
• Interacts via HTTP/HTTPS with the Django backend.
b. Django Application Server
• project/ (global URLs, settings)
• users app ( auth, registration, user dashboard )
• scholar app ( scholarship workflows, forms, views, OCR handlers )
• Template engine (rendering base.html, user/scholar templates)
c. Database
• Relational DB (SQLite in dev, replaceable with Postgres/MySQL in prod)
• Tables: User, StudentProfile, ScholarCategory, ScholarshipApplication, etc.
d. File Storage (Media)
• Local file system in dev or cloud object store (e.g., S3) in production
• Stores uploaded documents and Aadhaar scans
e. External Services
• UIDAI Aadhaar Verification API
• IPFS node (storing NSID documents)
• Blockchain network or smart-contract endpoint (hash anchoring)
• OCR Engines (EasyOCR, PaddleOCR as micro-services or direct library calls)
• Dialogflow Bot API for chat support
f. Optional Infrastructure
• Load Balancer (NGINX/HAProxy)
• WSGI/ASGI server (Gunicorn or Uvicorn)
• CDN for static assets
Relationships and Data Flows
• Browser → [HTTPS] → Load Balancer → Django WSGI/ASGI → URL router → App views → Template rendering or JSON response.
• Views → ORM → Database (CRUD for users, applications).
• Views → File system/Cloud storage for media uploads.
• Scholarship views → call OCR library or OCR micro-service → extract data → save to DB.
• Views → call Aadhaar API for ID verification → process response → update application status.
• After application submission → backend → IPFS client → upload doc → returns CID → record on blockchain via smart-contract API.
• Client ↔ Dialogflow via REST/gRPC for live chat.
Architectural Patterns and Design Principles
• Layered MVT (Model-View-Template) architecture (Django’s built-in MVC variant).
• Separation of concerns:
• Presentation (templates + static)
• Business logic (views, managers, forms)
• Data layer (models + migrations)
• Extensibility points: pluggable “users” and “scholar” apps, external service clients, OCR abstractions.
• Security: HTTPS, authentication via Django Auth, permissions via decorators.