How ayush-k-das/hiremind-job_searching_and_hiring_platform works
1. Project shape
- This is a small monolithic Flask application for a role-based hiring marketplace.
- The repo is organized into a single Python backend, a MySQL schema dump, and server-rendered HTML templates with static CSS/JS assets.
2. Runtime entrypoint
- app.py is the main application entrypoint and likely defines the Flask app, route handlers, session logic, and request/response flow.
- The app runs on Flask’s development server, matching the README’s local setup.
3. Persistence boundary
- DB_handler.py appears to encapsulate all database access.
- The backend uses PyMySQL against MySQL/MariaDB, so the architecture is not ORM-driven; it is direct SQL over a relational schema.
4. Configuration boundary
- config.py holds database connection settings such as host, username, password, and database name.
- This keeps environment-specific values separate from application logic, though the project is still configured manually rather than via environment variables.
5. Data model and relational core
- mamaar.sql is the authoritative schema definition and seed structure.
- The core tables are client, worker, job, requested, and accepted, which form the main workflow graph:
- users are split by role,
- workers create job listings,
- clients request jobs,
- requests can be accepted/rejected,
- accepted jobs move into a confirmed state.
- Cascading deletes are part of the integrity model, so relationships are central to the app’s behavior.
6. Role-based business flows
- The application has three distinct user surfaces:
- Client: search workers, submit hire requests, review requested/confirmed jobs.
- Worker: post jobs, manage incoming requests, accept/reject, close jobs, receive ratings.
- Admin: system-wide overview and administrative access.
- These are not separate services; they are separate Flask route groups and templates within one application.
7. Authentication and session state
- Login is session-based rather than token-based.
- Access control is role-driven, so the same backend likely checks session role before rendering templates or permitting actions.
- The README notes plain-text passwords, which means auth is simple and tightly coupled to database records.
8. Presentation layer
- templates/ contains the server-rendered pages:
- index.html, login.html, newaccount.html, newuser.html
- client.html, worker.html, admin.html, dashboard.html
- This suggests a classic Flask/Jinja architecture where most pages are rendered on the server and populated from backend query results.
9. Front-end behavior
- static/style.css provides styling and static/script.js supports client-side interaction.
- The README mentions AJAX-based dynamic loading, so JavaScript is used to refresh parts of the UI without full page reloads, likely for search, request status, and workflow updates.
10. Key interaction boundaries
- The main architectural boundary is between:
- browser UI → Flask routes,
- Flask routes → database helper,
- database helper → MySQL schema.
- Most business logic appears to live in the backend rather than in the browser, with the frontend mainly responsible for display and lightweight interactions.
11. Deployment context
- This is a local/dev-oriented stack: Flask server, MySQL/MariaDB database, and static files served by Flask.
- No separate API service, queue, worker process, or external cloud dependency is indicated in the repo.
12. What to show in an architecture diagram
- A good diagram would center on one Flask application connected to a MySQL database, with three UI branches for client, worker, and admin.
- Include DB_handler.py as the database access layer, config.py as configuration input, templates/ as server-side views, and static/ as the browser-side asset layer.
Main entry points: mamaar.sql mamaar.sql · app.py app.py · templates templates · DB_handler.py DB_handler.py
Components 16
Flask app
Request handling, session logic, and role-based route flow.
- app.py · Main Flask application, routes, sessions, and request flow.
app.py - Login flow · Session-based authentication and role checks inside the app.
app.py - Client flow · Client-facing search, request, and status views.
app.py - Worker flow · Worker-facing posting, request handling, and job closure views.
app.py - Admin flow · Administrative overview and privileged access paths.
app.py
Data layer
Database access and relational persistence.
- DB_handler.py · Encapsulates direct database operations using PyMySQL.
DB_handler.py - config.py · Database connection settings for host, user, password, and schema.
config.py - mamaar.sql · Authoritative MySQL schema and seed structure.
mamaar.sql - client · Client accounts and role-specific records.
mamaar.sql - worker · Worker accounts and posted job records.
mamaar.sql - job · Job listings and job lifecycle state.
mamaar.sql - requested · Pending job requests from clients.
mamaar.sql - accepted · Confirmed jobs after acceptance.
mamaar.sql
Presentation
Server-rendered templates and browser assets.
- templates · Server-rendered HTML pages for the main user surfaces.
templates - static assets · Browser-side styling and lightweight dynamic behavior.
static - Dashboard · Shared landing and navigation surface.
templates/dashboard.html
Connections 22
- app.py → Login flow: checks session · Flask routes authenticate users and enforce role-based access.
- app.py → Client flow: serves · Handles client-facing workflow pages and actions.
- app.py → Worker flow: serves · Handles worker-facing workflow pages and actions.
- app.py → Admin flow: serves · Handles administrative views and controls.
- app.py → DB_handler.py: queries · Routes delegate persistence work to the database helper.
- DB_handler.py → config.py: reads · Database connection settings are loaded from config.
- DB_handler.py → mamaar.sql: targets · SQL operations run against the MySQL schema.
- mamaar.sql → client: defines · Schema includes client records.
- mamaar.sql → worker: defines · Schema includes worker records.
- mamaar.sql → job: defines · Schema includes job listings.
- mamaar.sql → requested: defines · Schema includes pending requests.
- mamaar.sql → accepted: defines · Schema includes accepted jobs.
- Client flow → templates: renders · Client pages are server-rendered from templates.
- Worker flow → templates: renders · Worker pages are server-rendered from templates.
- Admin flow → templates: renders · Admin pages are server-rendered from templates.
- templates → static assets: uses · Templates rely on CSS and JavaScript assets.
- templates → Dashboard: includes · Shared dashboard view ties the UI together.
- Client flow → requested: creates · Client actions create new hire requests.
- Worker flow → job: publishes · Workers create and manage job listings.
- Worker flow → accepted: confirms · Accepted requests move into confirmed state.
- Worker flow → requested: reviews · Workers process incoming requests from clients.
- Client flow → accepted: views · Clients inspect accepted or confirmed jobs.