How sairilseb-me/student-clearance-sample-python works
This is a Django + Vue/Inertia student-clearance signing app. Students submit semester requests, track office approvals, and resubmit rejected approvals; office approvers sign or reject them, with the request becoming approved only after every office signs. The backend also provides session-based accounts and a policy-grounded AI assistant. The core workflow and RAG implementation are shown in the excerpts; some route and frontend wiring is described only in the README or SOURCE INDEX, so those links are documented rather than source-inspected.
Main entry points: student/views.py Student requests · approver/views.py Office sign-off · SignOff.vue Approver pages · models.py Accounts
Components 22
Identity and access
- Accounts
accounts/models.py - Login and logout
accounts/views.py - Session identity
accounts/middleware.py
Clearance workflow
- Student requests
clearance/student/views.py - Office sign-off
clearance/approver/views.py - Clearance records
clearance/models.py - Page data shaping
clearance/serializers.py - Inertia request parsing
core/http.py
Web experience
- Inertia Vue app
resources/js/app.js - Route helper
resources/js/route.js - Student pages
resources/js/Pages/Student/Dashboard.vue - Approver pages
resources/js/Pages/Approver/SignOff.vue - Signature pad
resources/js/Components/SignaturePad.vue - Assistant widget
resources/js/Components/AiClearanceAssistant.vue
AI assistant
- Assistant chat API
assistant/views.py - Retrieval and prompting
assistant/rag.py - Policy chunks
assistant/models.py - Document ingestion
assistant/management/commands/ingest_assistant_docs.py - Ollama client
core/ollama_client.py
Other components
- Student
- Office approver
- Ollama service
Connections 27
- Student → Login and logout: signs in
README.md - Office approver → Login and logout: signs in
README.md - Login and logout → Accounts: authenticates
accounts/views.py - Accounts → Session identity: shares user data
accounts/middleware.py - Student → Student pages: uses
README.md - Student pages → Student requests: requests clearance
README.md - Student requests → Clearance records: creates and updates
clearance/student/views.py - Student requests → Page data shaping: shapes page data
clearance/student/views.py - Student requests → Inertia request parsing: parses request
clearance/student/views.py - Student requests → Accounts: checks student role
clearance/student/views.py - Office approver → Approver pages: uses
README.md - Approver pages → Office sign-off: submits sign-off
README.md - Approver pages → Signature pad: captures signature
README.md - Office sign-off → Clearance records: updates approval
clearance/approver/views.py - Office sign-off → Page data shaping: shapes page data
clearance/approver/views.py - Office sign-off → Inertia request parsing: parses request
clearance/approver/views.py - Office sign-off → Accounts: checks approver role
clearance/approver/views.py - Student pages → Inertia Vue app: renders in
README.md - Approver pages → Inertia Vue app: renders in
README.md - Inertia Vue app → Route helper: installs helper
resources/js/app.js - Assistant widget → Assistant chat API: sends questions
README.md - Assistant chat API → Retrieval and prompting: retrieves context
assistant/views.py - Retrieval and prompting → Policy chunks: ranks chunks
assistant/rag.py - Assistant chat API → Ollama client: embeds and generates
assistant/views.py - Document ingestion → Ollama client: embeds documents
assistant/management/commands/ingest_assistant_docs.py - Document ingestion → Policy chunks: stores chunks
assistant/management/commands/ingest_assistant_docs.py - Ollama client → Ollama service: calls API
core/ollama_client.py