How sujal0910/ppa_sarvesh works
This repository is a placement-portal application split into two user-facing surfaces backed by one Python service and one shared database.
1. Overall shape
- The repo contains a backend directory and a separate frontend directory.
- The backend appears to be a Python web app with server-rendered templates and JSON routes.
- The frontend is a Vue 3 single-page application built with Vite.
2. Backend core
- backend/app.py, backend/config.py, backend/models/, and backend/routes/ suggest a conventional Flask-style architecture.
- The backend owns the domain logic for authentication, students, companies, admins, drives, and applications.
- backend/instance/placement_portal.db indicates the primary datastore is SQLite.
3. Backend route boundaries
- Route modules are split by responsibility:
- routes/auth.py for login/register flows
- routes/student.py for student-facing actions
- routes/company.py for company-facing actions
- routes/admin.py for admin management
- routes/api.py for API endpoints
- This separation is important for diagramming the backend as role-based modules rather than a single monolith.
4. Backend presentation layer
- backend/templates/ contains Jinja-style HTML templates for:
- authentication pages
- student dashboard/profile/drives/applications
- company dashboard/profile/drives/create-drive/view-drive
- admin dashboard/companies/students/drives/applications
- This means the backend supports server-side rendered pages in addition to API responses.
5. Frontend application
- frontend/src/ is a Vue application with:
- views/ organized by role: auth, student, company, admin
- components/ for shared UI like Navbar and DriveCard
- router/ for page navigation
- store/ for centralized state
- services/api.js as the API client boundary
- The frontend is structured around the same domain concepts as the backend, which makes the UI a thin consumer of backend data.
6. Frontend state and data flow
- Store modules are split into:
- auth.js
- drives.js
- applications.js
- That implies the main client-side data flows are:
- authentication/session state
- drive listings and details
- application tracking
- The frontend likely fetches JSON from the backend via services/api.js and hydrates the store from those calls.
7. Domain model and main business objects
- The repeated naming across backend models, templates, and frontend views shows the core entities are:
- Student
- Company
- Admin
- Drive / placement drive
- Application
- Diagramming should center these entities and their relationships, especially how students apply to drives posted by companies and monitored by admins.
8. Role-based access model
- The app is clearly segmented by persona:
- students browse drives, manage profile, and track applications
- companies manage profiles, create drives, and inspect drive details
- admins oversee students, companies, drives, and applications
- This role split is a key architectural boundary both in route organization and UI routing.
9. Data persistence
- The application uses a local SQLite database file under backend/instance/.
- No external datastore is visible in the tree, so the primary persistence boundary is internal and file-based.
- backend/models/ likely defines the database schema and ORM mappings that back both the HTML views and API responses.
10. Background work
- backend/tasks.py indicates there is some non-request-driven processing, likely maintenance, notifications, or scheduled updates.
- There is no visible queueing infrastructure in the tree, so this appears to be an internal task module rather than a separate worker service.
11. Deployment/runtime split
- The backend and frontend have separate dependency and build surfaces:
- backend/requirements.txt for Python dependencies
- frontend/package.json and vite.config.js for the Vue build
- frontend/.env.example and backend/.env show environment-based configuration on both sides.
- Architecturally, this is a two-app setup even if they share the same domain model.
12. How the pieces fit together
- A browser can either:
- hit backend-rendered pages under the Python app, or
- load the Vue SPA and call backend JSON endpoints.
- In both cases, requests eventually converge on the backend’s route layer and the same SQLite-backed model layer.
- The backend is therefore the system of record, while the Vue app is a separate presentation/client layer.
Main entry points: app.py App bootstrap · models Domain models · index.js Router · templates Server pages
Components 20
Backend
Python web app, route layer, templates, and SQLite-backed domain model.
- App bootstrap · Initializes the backend web application and wires configuration and routes.
backend/app.py - Config · Runtime settings and environment-driven configuration for the backend.
backend/config.py - Domain models · Shared persistence and schema for portal entities.
backend/models - Auth routes · Login and registration flows for students and companies.
backend/routes/auth.py - Student routes · Student dashboard, profile, drives, and applications actions.
backend/routes/student.py - Company routes · Company dashboard, profile, and drive management actions.
backend/routes/company.py - Admin routes · Administrative oversight for students, companies, drives, and applications.
backend/routes/admin.py - API routes · Backend endpoints consumed by the SPA client.
backend/routes/api.py - Tasks · Internal non-request processing and maintenance logic.
backend/tasks.py - Server pages · Rendered HTML views for auth, student, company, and admin screens.
backend/templates - SQLite DB · Primary persistent store for the placement portal.
backend/instance/placement_portal.db
Frontend
Vue 3 SPA, routing, state, and API client.
- SPA shell · Client application bootstrap and root UI.
frontend/src/App.vue - Router · Client-side navigation across role-based views.
frontend/src/router/index.js - Store · Centralized client state for auth, drives, and applications.
frontend/src/store/index.js - API client · Boundary used by the SPA to call backend JSON endpoints.
frontend/src/services/api.js - Auth views · Login and registration screens for the SPA.
frontend/src/views/auth - Student views · Student dashboard, profile, drives, and applications screens.
frontend/src/views/student - Company views · Company dashboard, profile, and drive management screens.
frontend/src/views/company - Admin views · Administrative screens for monitoring portal entities.
frontend/src/views/admin - Shared UI · Reusable interface elements such as navigation and drive cards.
frontend/src/components
Connections 27
- App bootstrap → Config: loads · Application startup uses configuration.
- App bootstrap → Auth routes: registers · Bootstraps authentication routes.
- App bootstrap → Student routes: registers · Bootstraps student routes.
- App bootstrap → Company routes: registers · Bootstraps company routes.
- App bootstrap → Admin routes: registers · Bootstraps admin routes.
- App bootstrap → API routes: registers · Bootstraps API routes.
- App bootstrap → Server pages: renders · Serves server-rendered pages.
- Auth routes → Domain models: uses · Reads and writes user records.
- Student routes → Domain models: uses · Queries drives, profile, and applications.
- Company routes → Domain models: uses · Manages company records and drive postings.
- Admin routes → Domain models: uses · Oversees portal entities.
- API routes → Domain models: uses · Exposes model-backed JSON data.
- Domain models → SQLite DB: persists to · Stores portal state in SQLite.
- Tasks → Domain models: uses · Background processing depends on the domain model.
- SPA shell → Router: navigates via · Root SPA delegates screen selection to the router.
- SPA shell → Store: reads state · UI consumes centralized application state.
- SPA shell → Shared UI: composes · Root UI reuses shared interface components.
- Router → Auth views: routes to · Navigation to authentication screens.
- Router → Student views: routes to · Navigation to student screens.
- Router → Company views: routes to · Navigation to company screens.
- Router → Admin views: routes to · Navigation to admin screens.
- Store → API client: fetches from · State modules retrieve backend data through the API client.
- API client → API routes: calls · SPA consumes backend JSON endpoints.
- Auth routes → Server pages: serves · Auth pages are available as server-rendered views.
- Student routes → Server pages: serves · Student pages are available as server-rendered views.
- Company routes → Server pages: serves · Company pages are available as server-rendered views.
- Admin routes → Server pages: serves · Admin pages are available as server-rendered views.