# arkadipsom-code/texify architecture

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

- Interactive diagram: https://gitdiagram.com/arkadipsom-code/texify
- Repository: https://github.com/arkadipsom-code/texify

## Overview

#### Purpose and deployment shape
Texify is a campus-restricted resume builder for IIEST Shibpur students. A React/Vite client collects structured resume content, provides a live visual preview, and requests server-side LaTeX-to-PDF compilation. The frontend is intended for Vercel deployment; the Express backend runs in a Docker-capable Render environment with a system LaTeX installation.

#### Client entry and application shell
`frontend/src/main.jsx` mounts the client application. `frontend/src/App.jsx` composes top-level routing/application state, while `frontend/src/components/Navbar.jsx` and `frontend/src/components/Footer.jsx` provide shared shell UI. The application is not a generic document editor: its primary authenticated workflow leads users from landing/authentication into resume construction.

#### Authentication boundary
`frontend/src/context/AuthContext.jsx` owns client authentication state and makes identity available to protected UI flows. `frontend/src/pages/AuthPage/AuthPage.jsx` is the login gateway. Backend authentication endpoints are exposed through `backend/routes/authRoutes.js` and implemented in `backend/controllers/authController.js`; domain validation restricts access to `@students.iiests.ac.in` accounts. `backend/middleware/authMiddleware.js` is the server-side protection boundary for authenticated operations.

#### Resume authoring and reactive presentation
The authoring experience is centered on `frontend/src/pages/ResumeBuilder/BuilderPage.jsx`, which coordinates the form and preview panes. `frontend/src/pages/ResumeBuilder/FormWizard.jsx` manages nested resume fields—education, experience, skills, projects, and bullet-oriented content—while handling smart line-break/bullet behavior. `frontend/src/pages/ResumeBuilder/LivePreview.jsx` renders the current structured state immediately, independently of final PDF compilation.

#### Client API and document-download flow
`frontend/src/services/api.js` centralizes browser-to-backend requests, including authenticated calls and the compilation/download request. Resume data flows from the form state to the API as structured JSON; the compiled response returns as a binary PDF/blob for browser download. `frontend/src/utils/latexParser.js` is the client-side formatting/translation utility supporting resume-to-LaTeX-oriented representation.

#### Backend HTTP and compilation pipeline
`backend/server.js` is the Express process entry point and mounts authentication and resume routes. `backend/routes/resumeRoutes.js` receives resume operations, applies authentication middleware, and delegates to `backend/controllers/resumeController.js`. The controller is the key compute boundary: it interpolates structured payload data into predefined LaTeX content, invokes the host LaTeX CLI/compiler, and returns the resulting PDF stream rather than exposing compilation details to the client.

#### Persistence and infrastructure
`backend/models/Resume.js` defines persisted resume data, and `backend/config/db.js` initializes the database connection. The Docker build at `backend/Dockerfile` is architecturally material because server compilation depends on Node.js plus a functioning LaTeX distribution. Operationally, the backend’s Render free-tier cold starts can delay first requests; the Vercel frontend must tolerate that remote-service latency.

Main entry points: [`frontend/src/App.jsx`](https://github.com/arkadipsom-code/texify/blob/main/frontend/src/App.jsx) (Application shell), [`backend/server.js`](https://github.com/arkadipsom-code/texify/blob/main/backend/server.js) (Express server), [`backend/controllers/resumeController.js`](https://github.com/arkadipsom-code/texify/blob/main/backend/controllers/resumeController.js) (PDF compiler), [`frontend/src/services/api.js`](https://github.com/arkadipsom-code/texify/blob/main/frontend/src/services/api.js) (Backend API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React client"]
  node_client_entry["Client entry<br/>Vite bootstrap<br/>[main.jsx]"]
  node_app_shell["Application shell<br/>React app<br/>[App.jsx]"]
  node_shared_shell["Shared navigation<br/>shell UI<br/>[Navbar.jsx]"]
  node_builder_page["Resume builder<br/>React page<br/>[BuilderPage.jsx]"]
  node_form_wizard["Resume form<br/>authoring form<br/>[FormWizard.jsx]"]
  node_live_preview["Live preview<br/>reactive renderer<br/>[LivePreview.jsx]"]
  node_client_api["Backend API client<br/>browser API<br/>[api.js]"]
  node_latex_parser["LaTeX formatter<br/>client utility<br/>[latexParser.js]"]
end

subgraph group_auth["Authentication"]
  node_auth_context["Auth state<br/>React context<br/>[AuthContext.jsx]"]
  node_auth_page["Login gateway<br/>React page<br/>[AuthPage.jsx]"]
  node_auth_routes["Auth endpoints<br/>Express routes<br/>[authRoutes.js]"]
  node_auth_controller["Auth controller<br/>[authController.js]"]
  node_auth_middleware["Auth guard<br/>Express middleware<br/>[authMiddleware.js]"]
end

subgraph group_backend["Express compilation service"]
  node_server["Express server<br/>HTTP entry<br/>[server.js]"]
  node_resume_routes["Resume endpoints<br/>protected routes<br/>[resumeRoutes.js]"]
  node_resume_controller{{"PDF compiler<br/>compilation controller"}}
  node_docker_build["LaTeX runtime image<br/>Docker build"]
end

subgraph group_data["Persistence"]
  node_resume_model["Resume model<br/>persistence model<br/>[Resume.js]"]
  node_database_connection[("Database connection<br/>database bootstrap<br/>[db.js]")]
end

node_client_entry -->|"mounts"| node_app_shell
node_app_shell -->|"renders"| node_shared_shell
node_app_shell -->|"uses auth state"| node_auth_context
node_app_shell -->|"routes to"| node_auth_page
node_app_shell -->|"routes to"| node_builder_page
node_auth_page -->|"auth request"| node_client_api
node_builder_page -->|"authors with"| node_form_wizard
node_builder_page -->|"updates"| node_live_preview
node_form_wizard -->|"formats content"| node_latex_parser
node_form_wizard -->|"structured resume JSON"| node_client_api
node_client_api -->|"authenticated HTTP / PDF blob"| node_server
node_server -->|"mounts"| node_auth_routes
node_server -->|"mounts"| node_resume_routes
node_auth_routes -->|"delegates"| node_auth_controller
node_resume_routes -->|"protects with"| node_auth_middleware
node_auth_middleware -->|"authorizes"| node_resume_controller
node_resume_controller -->|"persists resume data"| node_resume_model
node_database_connection -->|"connects storage"| node_resume_model
node_docker_build -->|"runtime image"| node_server
node_docker_build -->|"provides LaTeX CLI"| node_resume_controller
node_resume_controller -->|"PDF stream"| node_client_api

click node_client_entry "https://github.com/arkadipsom-code/texify/blob/main/frontend/src/main.jsx"
click node_app_shell "https://github.com/arkadipsom-code/texify/blob/main/frontend/src/App.jsx"
click node_shared_shell "https://github.com/arkadipsom-code/texify/blob/main/frontend/src/components/Navbar.jsx"
click node_auth_context "https://github.com/arkadipsom-code/texify/blob/main/frontend/src/context/AuthContext.jsx"
click node_auth_page "https://github.com/arkadipsom-code/texify/blob/main/frontend/src/pages/AuthPage/AuthPage.jsx"
click node_builder_page "https://github.com/arkadipsom-code/texify/blob/main/frontend/src/pages/ResumeBuilder/BuilderPage.jsx"
click node_form_wizard "https://github.com/arkadipsom-code/texify/blob/main/frontend/src/pages/ResumeBuilder/FormWizard.jsx"
click node_live_preview "https://github.com/arkadipsom-code/texify/blob/main/frontend/src/pages/ResumeBuilder/LivePreview.jsx"
click node_client_api "https://github.com/arkadipsom-code/texify/blob/main/frontend/src/services/api.js"
click node_latex_parser "https://github.com/arkadipsom-code/texify/blob/main/frontend/src/utils/latexParser.js"
click node_server "https://github.com/arkadipsom-code/texify/blob/main/backend/server.js"
click node_auth_routes "https://github.com/arkadipsom-code/texify/blob/main/backend/routes/authRoutes.js"
click node_auth_controller "https://github.com/arkadipsom-code/texify/blob/main/backend/controllers/authController.js"
click node_resume_routes "https://github.com/arkadipsom-code/texify/blob/main/backend/routes/resumeRoutes.js"
click node_auth_middleware "https://github.com/arkadipsom-code/texify/blob/main/backend/middleware/authMiddleware.js"
click node_resume_controller "https://github.com/arkadipsom-code/texify/blob/main/backend/controllers/resumeController.js"
click node_resume_model "https://github.com/arkadipsom-code/texify/blob/main/backend/models/Resume.js"
click node_database_connection "https://github.com/arkadipsom-code/texify/blob/main/backend/config/db.js"
click node_docker_build "https://github.com/arkadipsom-code/texify/blob/main/backend/Dockerfile"

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_client_entry,node_app_shell,node_shared_shell,node_builder_page,node_form_wizard,node_live_preview,node_client_api,node_latex_parser toneBlue
class node_auth_context,node_auth_page,node_auth_routes,node_auth_controller,node_auth_middleware toneAmber
class node_server,node_resume_routes,node_resume_controller,node_docker_build toneMint
class node_resume_model,node_database_connection toneRose
```

## Components

### React client

Vite frontend deployed to Vercel.

- [Client entry](https://github.com/arkadipsom-code/texify/blob/main/frontend/src/main.jsx): Vite bootstrap · `frontend/src/main.jsx`
- [Application shell](https://github.com/arkadipsom-code/texify/blob/main/frontend/src/App.jsx): React app · `frontend/src/App.jsx`
- [Shared navigation](https://github.com/arkadipsom-code/texify/blob/main/frontend/src/components/Navbar.jsx): shell UI · Navbar and footer shared across application views. · `frontend/src/components/Navbar.jsx`
- [Resume builder](https://github.com/arkadipsom-code/texify/blob/main/frontend/src/pages/ResumeBuilder/BuilderPage.jsx): React page · Coordinates authoring form and immediate preview. · `frontend/src/pages/ResumeBuilder/BuilderPage.jsx`
- [Resume form](https://github.com/arkadipsom-code/texify/blob/main/frontend/src/pages/ResumeBuilder/FormWizard.jsx): authoring form · Edits structured resume sections and bullet content. · `frontend/src/pages/ResumeBuilder/FormWizard.jsx`
- [Live preview](https://github.com/arkadipsom-code/texify/blob/main/frontend/src/pages/ResumeBuilder/LivePreview.jsx): reactive renderer · Renders structured resume state without PDF compilation. · `frontend/src/pages/ResumeBuilder/LivePreview.jsx`
- [Backend API client](https://github.com/arkadipsom-code/texify/blob/main/frontend/src/services/api.js): browser API · Sends authenticated JSON and receives downloadable PDF blobs. · `frontend/src/services/api.js`
- [LaTeX formatter](https://github.com/arkadipsom-code/texify/blob/main/frontend/src/utils/latexParser.js): client utility · `frontend/src/utils/latexParser.js`

### Authentication

- [Auth state](https://github.com/arkadipsom-code/texify/blob/main/frontend/src/context/AuthContext.jsx): React context · Makes authenticated identity available to protected flows. · `frontend/src/context/AuthContext.jsx`
- [Login gateway](https://github.com/arkadipsom-code/texify/blob/main/frontend/src/pages/AuthPage/AuthPage.jsx): React page · `frontend/src/pages/AuthPage/AuthPage.jsx`
- [Auth endpoints](https://github.com/arkadipsom-code/texify/blob/main/backend/routes/authRoutes.js): Express routes · `backend/routes/authRoutes.js`
- [Auth controller](https://github.com/arkadipsom-code/texify/blob/main/backend/controllers/authController.js): controller · Restricts accounts to the IIEST student email domain. · `backend/controllers/authController.js`
- [Auth guard](https://github.com/arkadipsom-code/texify/blob/main/backend/middleware/authMiddleware.js): Express middleware · Server-side boundary for authenticated resume operations. · `backend/middleware/authMiddleware.js`

### Express compilation service

Docker-hosted backend with LaTeX available.

- [Express server](https://github.com/arkadipsom-code/texify/blob/main/backend/server.js): HTTP entry · Mounts authentication and resume APIs. · `backend/server.js`
- [Resume endpoints](https://github.com/arkadipsom-code/texify/blob/main/backend/routes/resumeRoutes.js): protected routes · `backend/routes/resumeRoutes.js`
- [PDF compiler](https://github.com/arkadipsom-code/texify/blob/main/backend/controllers/resumeController.js): compilation controller · Interpolates resume data, invokes LaTeX, and streams the PDF. · `backend/controllers/resumeController.js`
- [LaTeX runtime image](https://github.com/arkadipsom-code/texify/blob/main/backend/Dockerfile): Docker build · Supplies Node.js and the system LaTeX distribution required by compilation. · `backend/Dockerfile`

### Persistence

- [Resume model](https://github.com/arkadipsom-code/texify/blob/main/backend/models/Resume.js): persistence model · `backend/models/Resume.js`
- [Database connection](https://github.com/arkadipsom-code/texify/blob/main/backend/config/db.js): database bootstrap · `backend/config/db.js`

## Connections

- Client entry → Application shell: mounts
- Application shell → Shared navigation: renders
- Application shell → Auth state: uses auth state
- Application shell → Login gateway: routes to
- Application shell → Resume builder: routes to
- Login gateway → Backend API client: auth request
- Resume builder → Resume form: authors with
- Resume builder → Live preview: updates
- Resume form → LaTeX formatter: formats content
- Resume form → Backend API client: structured resume JSON
- Backend API client → Express server: authenticated HTTP / PDF blob · Remote Render service may cold-start.
- Express server → Auth endpoints: mounts
- Express server → Resume endpoints: mounts
- Auth endpoints → Auth controller: delegates
- Resume endpoints → Auth guard: protects with
- Auth guard → PDF compiler: authorizes
- PDF compiler → Resume model: persists resume data
- Database connection → Resume model: connects storage
- LaTeX runtime image → Express server: runtime image
- LaTeX runtime image → PDF compiler: provides LaTeX CLI
- PDF compiler → Backend API client: PDF stream
