How adhithiya42/placement-portal works
Purpose and Runtime
This is a server-rendered Flask campus-placement portal. It centralizes company onboarding, recruitment-drive approval, student applications, and application-status decisions across Admin, Company, and Student roles. The executable entry point is app.py; it runs on Python 3.10+ with dependencies declared in requirements.txt and persists operational state in SQLite at placement.db.
Application Composition
The backend is concentrated in app.py, which is the Flask application, route/controller layer, authentication integration, validation boundary, and database-access layer. HTML is rendered through Jinja templates rather than a separate frontend service. Shared page structure and role-aware navigation originate in templates/base.html, with unauthenticated flows in templates/login.html and templates/register.html.
Identity, Sessions, and Authorization
Flask-Login provides session-based authentication and role-based route access. The system has three distinct actor models: a pre-seeded admin, registered companies subject to approval, and students. Login/registration transitions into role-specific dashboards; approval status is an access boundary for companies. Password/profile operations are surfaced separately for company and student users through templates/company/change_password.html and templates/student/change_password.html.
Company and Drive Lifecycle
Companies register and maintain their profile, then create recruitment drives. Admin approval gates company participation and drive visibility. Company users manage their own drives through templates/company/create_drive.html and templates/company/edit_drive.html; students see approved drives via templates/student/dashboard.html and templates/student/drive_detail.html. Blacklisting a company closes its drives, making company governance a cross-entity state transition.
Student Application Workflow
Students maintain placement information, browse approved drives, submit applications, and track outcomes. The application boundary enforces one application per student-drive pair. Companies consume applications for their drives and update statuses such as shortlisted, selected, or rejected; students view resulting history in templates/student/history.html, while company review occurs in templates/company/applications.html.
Administrative Control Plane
Admin is the global governance and reporting role: it approves/rejects companies and drives, manages students/companies, and exports application data. The primary admin views are templates/admin/dashboard.html, templates/admin/companies.html, templates/admin/drives.html, and templates/admin/students.html. The dashboard combines live aggregate data with Chart.js visualizations; management actions affect approval, blacklist, deletion, and downstream drive/application visibility.
Data and External Interfaces
SQLite stores the core entities: admin, companies, students, drives, and applications, in placement.db. app.py also exposes JSON read APIs for approved drives and admin-scoped students, companies, and applications, alongside the server-rendered UI. Browser-side infrastructure is Bootstrap 5 for responsive layout, Chart.js for dashboard charts, and Font Awesome for icons; no separate API server, queue, or cloud service is indicated.
Main entry points: dashboard.html Admin governance · app.py Sessions and role access · applications.html Applications · create_drive.html Company workflow
Components 17
Server-rendered UI
Jinja pages organized by shared and role-specific views.
- Shared layout and navigation · Provides shared structure and role-aware navigation.
templates/base.html - Login and registration
templates/login.html - Admin management views · Dashboard, companies, drives, and student management.
templates/admin/companies.html - Drive detail page · Presents approved drive details for applications.
templates/student/drive_detail.html - Password management pages · Separate company and student password flows.
templates/company/change_password.html - Dashboard charts · Visualizes live admin aggregates.
templates/admin/dashboard.html
Role workflows
Role-specific portal capabilities.
- Sessions and role access · Authenticates users and gates role-specific routes.
app.py - Admin governance · Approves entities, manages records, and exports application data.
templates/admin/dashboard.html - Company workflow · Maintains profile, creates drives, and reviews applications.
templates/company/create_drive.html - Student workflow · Maintains placement data, applies, and tracks outcomes.
templates/student/dashboard.html - Company approval · Approval status controls company participation.
- Recruitment drives · Drives require approval before student visibility.
templates/company/edit_drive.html - Applications · Enforces one application per student-drive pair.
templates/company/applications.html - Application decisions · Companies mark shortlisted, selected, or rejected outcomes.
templates/student/history.html
Other components
- Flask application · Single backend boundary for UI routes and JSON APIs.
app.py - Placement SQLite · Stores admins, companies, students, drives, and applications.
placement.db - JSON read APIs · Exposes approved drives and admin-scoped records.
app.py
Connections 24
- Flask application → Placement SQLite: reads and writes
- Flask application → Sessions and role access: integrates
- Flask application → Shared layout and navigation: renders
- Flask application → JSON read APIs: exposes
- Login and registration → Sessions and role access: login and registration
- Sessions and role access → Admin governance: admin session
- Sessions and role access → Company workflow: company session
- Sessions and role access → Student workflow: student session
- Admin governance → Company approval: approves or rejects
- Admin governance → Recruitment drives: approves or rejects
- Admin governance → Applications: exports and manages
- Company approval → Company workflow: gates participation
- Company workflow → Recruitment drives: creates and manages
- Recruitment drives → Student workflow: approved drives visible
- Drive detail page → Applications: submits
- Student workflow → Applications: creates and tracks
- Company workflow → Applications: reviews own drives
- Applications → Application decisions: receives decision
- Application decisions → Student workflow: shown in history
- Admin governance → Admin management views: uses
- Dashboard charts → Admin governance: visualizes aggregates
- Password management pages → Sessions and role access: updates credentials
- Company approval → Recruitment drives: blacklisting closes drives
- JSON read APIs → Placement SQLite: reads