# varsha042006/falcon_pbl architecture

> Architecture diagram of the GitHub repository varsha042006/falcon_pbl, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/varsha042006/falcon_pbl
- Repository: https://github.com/varsha042006/falcon_pbl

## Overview

Falcon PBL Project Hub is a university workflow system for publishing projects, forming teams, allocating guides, collecting review evidence, assessing work, and verifying results. The graph includes the major README capabilities and the sampled authentication, team creation, rubric configuration, student import, and verified-PDF implementation. Several page and route implementations were not sampled, so uncertain UI-to-API wiring is omitted; unsampled subsystems use paths present in the tree.

Main entry points: [`lib/db.ts`](https://github.com/varsha042006/falcon_pbl/blob/main/lib/db.ts) (PostgreSQL), [`app/login/page.tsx`](https://github.com/varsha042006/falcon_pbl/blob/main/app/login/page.tsx) (Sign in), [`app/api/auth/login/route.ts`](https://github.com/varsha042006/falcon_pbl/blob/main/app/api/auth/login/route.ts) (Login handler), [`app/api/review-submission-files/[itemId]/route.ts`](https://github.com/varsha042006/falcon_pbl/blob/main/app/api/review-submission-files/%5BitemId%5D/route.ts) (Evidence file access)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and administration"]
  node_login["Sign in<br/>[page.tsx]"]
  node_login_api["Login handler<br/>[route.ts]"]
  node_student_import["Student import<br/>[route.ts]"]
  node_coordinator_assignment["Coordinator assignment<br/>[route.ts]"]
end

subgraph group_projects["Projects and allocation"]
  node_project_catalog["Project catalog<br/>[page.tsx]"]
  node_project_api["Project publishing<br/>[route.ts]"]
  node_applications["Faculty applications<br/>[page.tsx]"]
  node_guide_requests["Guide requests<br/>[route.ts]"]
  node_guide_limits["Guide limits<br/>[route.ts]"]
  node_own_project["Student-owned project<br/>[route.ts]"]
  node_teams["Team creation<br/>[route.ts]"]
end

subgraph group_reviews["Reviews and assessment"]
  node_review_config["Review and rubric setup<br/>[route.ts]"]
  node_student_reviews["Student review<br/>[page.tsx]"]
  node_student_submission["Evidence submission<br/>[route.ts]"]
  node_faculty_review["Faculty assessment<br/>[route.ts]"]
  node_submission_files["Evidence file access<br/>[route.ts]"]
end

subgraph group_verification["Verification and records"]
  node_hod_verification["HoD verification<br/>[route.ts]"]
  node_rubric_pdf["Verified rubric PDF<br/>[route.ts]"]
end

subgraph group_platform["Application foundation"]
  node_auth["Session and roles<br/>[auth.ts]"]
  node_database[("PostgreSQL<br/>[db.ts]")]
end

node_student(("Student"))
node_faculty(("Faculty"))
node_coordinator(("PBL Coordinator"))
node_hod(("HoD"))

node_student -->|"signs in"| node_login
node_faculty -->|"signs in"| node_login
node_coordinator -->|"signs in"| node_login
node_hod -->|"signs in"| node_login
node_login -->|"submits credentials"| node_login_api
node_login_api -->|"creates session"| node_auth
node_login_api -->|"checks account"| node_database
node_hod -->|"imports roster"| node_student_import
node_student_import -->|"writes enrollments"| node_database
node_hod -->|"assigns coordinator"| node_coordinator_assignment
node_coordinator_assignment -->|"updates assignments"| node_database
node_student -->|"browses projects"| node_project_catalog
node_faculty -->|"publishes projects"| node_project_catalog
node_project_api -->|"reads and writes"| node_database
node_student -->|"creates project"| node_own_project
node_own_project -->|"stores project"| node_database
node_student -->|"applies to projects"| node_applications
node_applications -.->|"submits application"| node_project_api
node_faculty -->|"decides requests"| node_guide_requests
node_guide_requests -->|"updates allocation"| node_database
node_coordinator -->|"sets capacity"| node_guide_limits
node_guide_limits -->|"stores limits"| node_database
node_coordinator -->|"forms teams"| node_teams
node_teams -->|"stores membership"| node_database
node_coordinator -->|"configures reviews"| node_review_config
node_review_config -->|"stores rubric and requirements"| node_database
node_student -->|"views reviews"| node_student_reviews
node_student -->|"submits evidence"| node_student_submission
node_student_submission -->|"stores submission"| node_database
node_faculty -->|"evaluates team"| node_faculty_review
node_faculty_review -->|"stores evaluation"| node_database
node_hod -->|"verifies evaluation"| node_hod_verification
node_hod_verification -->|"records decision"| node_database
node_student -->|"downloads verified sheet"| node_rubric_pdf
node_rubric_pdf -->|"reads results and logs access"| node_database
node_faculty -->|"retrieves evidence"| node_submission_files
node_student -->|"retrieves own evidence"| node_submission_files
node_submission_files -->|"reads stored file"| node_database

click node_login "https://github.com/varsha042006/falcon_pbl/blob/main/app/login/page.tsx"
click node_login_api "https://github.com/varsha042006/falcon_pbl/blob/main/app/api/auth/login/route.ts"
click node_student_import "https://github.com/varsha042006/falcon_pbl/blob/main/app/api/hod/imports/students/route.ts"
click node_coordinator_assignment "https://github.com/varsha042006/falcon_pbl/blob/main/app/api/hod/pbl-coordinators/route.ts"
click node_project_catalog "https://github.com/varsha042006/falcon_pbl/blob/main/app/projects/page.tsx"
click node_project_api "https://github.com/varsha042006/falcon_pbl/blob/main/app/api/projects/route.ts"
click node_applications "https://github.com/varsha042006/falcon_pbl/blob/main/app/faculty/applications/page.tsx"
click node_guide_requests "https://github.com/varsha042006/falcon_pbl/blob/main/app/api/guide-requests/route.ts"
click node_guide_limits "https://github.com/varsha042006/falcon_pbl/blob/main/app/api/coordinator/guide-limits/route.ts"
click node_own_project "https://github.com/varsha042006/falcon_pbl/blob/main/app/api/student/own-project/route.ts"
click node_teams "https://github.com/varsha042006/falcon_pbl/blob/main/app/api/teams/route.ts"
click node_review_config "https://github.com/varsha042006/falcon_pbl/blob/main/app/api/coordinator/rubrics/route.ts"
click node_student_reviews "https://github.com/varsha042006/falcon_pbl/blob/main/app/student/reviews/%5BreviewId%5D/page.tsx"
click node_student_submission "https://github.com/varsha042006/falcon_pbl/blob/main/app/api/student/review-submissions/%5BreviewId%5D/submit/route.ts"
click node_faculty_review "https://github.com/varsha042006/falcon_pbl/blob/main/app/api/faculty/reviews/%5BreviewId%5D/team/%5BteamId%5D/submit/route.ts"
click node_hod_verification "https://github.com/varsha042006/falcon_pbl/blob/main/app/api/hod/review-verification/%5BevaluationId%5D/route.ts"
click node_rubric_pdf "https://github.com/varsha042006/falcon_pbl/blob/main/app/student/reviews/%5BreviewId%5D/rubric-sheet/route.ts"
click node_submission_files "https://github.com/varsha042006/falcon_pbl/blob/main/app/api/review-submission-files/%5BitemId%5D/route.ts"
click node_auth "https://github.com/varsha042006/falcon_pbl/blob/main/lib/auth.ts"
click node_database "https://github.com/varsha042006/falcon_pbl/blob/main/lib/db.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_login,node_login_api,node_student_import,node_coordinator_assignment toneBlue
class node_project_catalog,node_project_api,node_applications,node_guide_requests,node_guide_limits,node_own_project,node_teams toneAmber
class node_review_config,node_student_reviews,node_student_submission,node_faculty_review,node_submission_files toneMint
class node_hod_verification,node_rubric_pdf toneRose
class node_auth,node_database,node_student,node_faculty,node_coordinator,node_hod toneIndigo
```

## Components

### Access and administration

- [Sign in](https://github.com/varsha042006/falcon_pbl/blob/main/app/login/page.tsx): `app/login/page.tsx`
- [Login handler](https://github.com/varsha042006/falcon_pbl/blob/main/app/api/auth/login/route.ts): `app/api/auth/login/route.ts`
- [Student import](https://github.com/varsha042006/falcon_pbl/blob/main/app/api/hod/imports/students/route.ts): `app/api/hod/imports/students/route.ts`
- [Coordinator assignment](https://github.com/varsha042006/falcon_pbl/blob/main/app/api/hod/pbl-coordinators/route.ts): `app/api/hod/pbl-coordinators/route.ts`

### Projects and allocation

- [Project catalog](https://github.com/varsha042006/falcon_pbl/blob/main/app/projects/page.tsx): `app/projects/page.tsx`
- [Project publishing](https://github.com/varsha042006/falcon_pbl/blob/main/app/api/projects/route.ts): `app/api/projects/route.ts`
- [Faculty applications](https://github.com/varsha042006/falcon_pbl/blob/main/app/faculty/applications/page.tsx): `app/faculty/applications/page.tsx`
- [Guide requests](https://github.com/varsha042006/falcon_pbl/blob/main/app/api/guide-requests/route.ts): `app/api/guide-requests/route.ts`
- [Guide limits](https://github.com/varsha042006/falcon_pbl/blob/main/app/api/coordinator/guide-limits/route.ts): `app/api/coordinator/guide-limits/route.ts`
- [Student-owned project](https://github.com/varsha042006/falcon_pbl/blob/main/app/api/student/own-project/route.ts): `app/api/student/own-project/route.ts`
- [Team creation](https://github.com/varsha042006/falcon_pbl/blob/main/app/api/teams/route.ts): `app/api/teams/route.ts`

### Reviews and assessment

- [Review and rubric setup](https://github.com/varsha042006/falcon_pbl/blob/main/app/api/coordinator/rubrics/route.ts): `app/api/coordinator/rubrics/route.ts`
- [Student review](https://github.com/varsha042006/falcon_pbl/blob/main/app/student/reviews/%5BreviewId%5D/page.tsx): `app/student/reviews/[reviewId]/page.tsx`
- [Evidence submission](https://github.com/varsha042006/falcon_pbl/blob/main/app/api/student/review-submissions/%5BreviewId%5D/submit/route.ts): `app/api/student/review-submissions/[reviewId]/submit/route.ts`
- [Faculty assessment](https://github.com/varsha042006/falcon_pbl/blob/main/app/api/faculty/reviews/%5BreviewId%5D/team/%5BteamId%5D/submit/route.ts): `app/api/faculty/reviews/[reviewId]/team/[teamId]/submit/route.ts`
- [Evidence file access](https://github.com/varsha042006/falcon_pbl/blob/main/app/api/review-submission-files/%5BitemId%5D/route.ts): `app/api/review-submission-files/[itemId]/route.ts`

### Verification and records

- [HoD verification](https://github.com/varsha042006/falcon_pbl/blob/main/app/api/hod/review-verification/%5BevaluationId%5D/route.ts): `app/api/hod/review-verification/[evaluationId]/route.ts`
- [Verified rubric PDF](https://github.com/varsha042006/falcon_pbl/blob/main/app/student/reviews/%5BreviewId%5D/rubric-sheet/route.ts): `app/student/reviews/[reviewId]/rubric-sheet/route.ts`

### Application foundation

- [Session and roles](https://github.com/varsha042006/falcon_pbl/blob/main/lib/auth.ts): `lib/auth.ts`
- [PostgreSQL](https://github.com/varsha042006/falcon_pbl/blob/main/lib/db.ts): `lib/db.ts`

### Other components

- **Student**
- **Faculty**
- **PBL Coordinator**
- **HoD**

## Connections

- Student → Sign in: signs in
- Faculty → Sign in: signs in
- PBL Coordinator → Sign in: signs in
- HoD → Sign in: signs in
- Sign in → Login handler: submits credentials
- Login handler → Session and roles: creates session
- Login handler → PostgreSQL: checks account
- HoD → Student import: imports roster
- Student import → PostgreSQL: writes enrollments
- HoD → Coordinator assignment: assigns coordinator
- Coordinator assignment → PostgreSQL: updates assignments
- Student → Project catalog: browses projects
- Faculty → Project catalog: publishes projects
- Project publishing → PostgreSQL: reads and writes
- Student → Student-owned project: creates project
- Student-owned project → PostgreSQL: stores project
- Student → Faculty applications: applies to projects
- Faculty applications → Project publishing: submits application
- Faculty → Guide requests: decides requests
- Guide requests → PostgreSQL: updates allocation
- PBL Coordinator → Guide limits: sets capacity
- Guide limits → PostgreSQL: stores limits
- PBL Coordinator → Team creation: forms teams
- Team creation → PostgreSQL: stores membership
- PBL Coordinator → Review and rubric setup: configures reviews
- Review and rubric setup → PostgreSQL: stores rubric and requirements
- Student → Student review: views reviews
- Student → Evidence submission: submits evidence
- Evidence submission → PostgreSQL: stores submission
- Faculty → Faculty assessment: evaluates team
- Faculty assessment → PostgreSQL: stores evaluation
- HoD → HoD verification: verifies evaluation
- HoD verification → PostgreSQL: records decision
- Student → Verified rubric PDF: downloads verified sheet
- Verified rubric PDF → PostgreSQL: reads results and logs access
- Faculty → Evidence file access: retrieves evidence
- Student → Evidence file access: retrieves own evidence
- Evidence file access → PostgreSQL: reads stored file
