# fairuzbaru43-blip/rapimakalah architecture

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

- Interactive diagram: https://gitdiagram.com/fairuzbaru43-blip/rapimakalah
- Repository: https://github.com/fairuzbaru43-blip/rapimakalah

## Overview

RapiMakalah Pro is a browser-based academic document editor and formatter. Users write or import a manuscript, inspect its structure, choose formatting rules and a template, preview the result, then download an editable DOCX; PDF saving uses the browser’s print dialog. Account documents and sessions use the Node API and PostgreSQL, while local document storage remains available. The graph follows documented capabilities and shown references; some UI-to-export wiring is not visible in the excerpts, so that connection is marked unverified.

Main entry points: [`src/App.jsx`](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/App.jsx) (Application shell), [`server/index.js`](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/server/index.js) (Express API), [`src/services/documentParser.js`](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/services/documentParser.js) (Document parser), [`src/components/Workspace.jsx`](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/components/Workspace.jsx) (Editor workspace)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspace"]
  node_app["Application shell<br/>[App.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_upload["Document upload<br/>[DocumentUpload.jsx]"]
  node_workspace_view["Editor workspace<br/>[Workspace.jsx]"]
  node_editor["Document editor<br/>[DocumentEditor.jsx]"]
  node_format_panel["Formatting panel"]
  node_template["Template selector"]
  node_inspection["Structure inspection"]
  node_preview["Document preview"]
  node_public["Public and auth pages<br/>[PublicPages.jsx]"]
  node_settings["Account settings<br/>[Settings.jsx]"]
  node_documents_page["Documents page<br/>[Documents.jsx]"]
  node_templates_page["Templates page<br/>[Templates.jsx]"]
end

subgraph group_processing["Document processing"]
  node_parser["Document parser<br/>[documentParser.js]"]
  node_formatter["Formatting engine"]
  node_generator["DOCX generator<br/>[docxGenerator.js]"]
  node_docx_processor["DOCX processing<br/>[docxProcessor.js]"]
end

subgraph group_account["Accounts and storage"]
  node_storage[("Document storage<br/>[storage.js]")]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_server["API services"]
  node_api_routes["API endpoints<br/>[&#91;...path&#93;.js]"]
  node_server_app["Express API<br/>[index.js]"]
  node_validation["Request validation<br/>[validation.js]"]
  node_configuration["Database configuration<br/>[configuration.js]"]
  node_postgres[("PostgreSQL")]
end

node_user(("Writer"))
node_browser_print["Browser print dialog"]

node_user -->|"uses"| node_app
node_app -->|"shows"| node_dashboard
node_app -->|"shows"| node_workspace_view
node_app -->|"shows"| node_public
node_app -->|"shows"| node_settings
node_app -->|"shows"| node_documents_page
node_app -->|"shows"| node_templates_page
node_dashboard -->|"renders"| node_upload
node_workspace_view -->|"renders"| node_editor
node_workspace_view -->|"renders"| node_preview
node_app -->|"shows"| node_format_panel
node_format_panel -->|"renders"| node_template
node_app -->|"shows"| node_inspection
node_editor -->|"parses with"| node_parser
node_preview -->|"estimates pages"| node_formatter
node_formatter -->|"parses with"| node_parser
node_app -->|"parses imports"| node_parser
node_app -->|"loads and saves"| node_storage
node_app -.->|"exports through"| node_generator
node_generator -->|"finds chapters"| node_parser
node_generator -->|"converts blocks"| node_docx_processor
node_user -->|"registers or signs in"| node_public
node_public -->|"requests auth"| node_api_client
node_settings -->|"requests account"| node_api_client
node_api_client -.->|"calls"| node_api_routes
node_api_routes -->|"delegates to"| node_server_app
node_server_app -->|"validates with"| node_validation
node_server_app -->|"resolves database"| node_configuration
node_server_app -->|"reads and writes"| node_postgres
node_storage -->|"uses account endpoints"| node_api_routes
node_storage -->|"stores locally when unauthenticated"| node_user
node_user -->|"saves PDF via"| node_browser_print

click node_app "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/App.jsx"
click node_dashboard "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/pages/Dashboard.jsx"
click node_upload "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/components/DocumentUpload.jsx"
click node_workspace_view "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/components/Workspace.jsx"
click node_editor "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/components/DocumentEditor.jsx"
click node_format_panel "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/components/FormattingPanel.jsx"
click node_template "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/components/TemplateSelector.jsx"
click node_inspection "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/components/InspectionPanel.jsx"
click node_preview "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/components/DocumentPreview.jsx"
click node_public "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/pages/PublicPages.jsx"
click node_settings "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/pages/Settings.jsx"
click node_documents_page "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/pages/Documents.jsx"
click node_templates_page "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/pages/Templates.jsx"
click node_parser "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/services/documentParser.js"
click node_formatter "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/services/documentFormatter.js"
click node_generator "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/services/docxGenerator.js"
click node_docx_processor "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/services/docxProcessor.js"
click node_storage "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/services/storage.js"
click node_api_client "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/services/api.js"
click node_api_routes "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/api/%5B...path%5D.js"
click node_server_app "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/server/index.js"
click node_validation "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/server/validation.js"
click node_configuration "https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/server/configuration.js"

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_app,node_dashboard,node_upload,node_workspace_view,node_editor,node_format_panel,node_template,node_inspection,node_preview,node_public,node_settings,node_documents_page,node_templates_page,node_browser_print toneBlue
class node_parser,node_formatter,node_generator,node_docx_processor toneAmber
class node_storage,node_api_client toneMint
class node_api_routes,node_server_app,node_validation,node_configuration,node_postgres toneRose
class node_user toneIndigo
```

## Components

### Workspace

- [Application shell](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/App.jsx): `src/App.jsx`
- [Dashboard](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/pages/Dashboard.jsx): `src/pages/Dashboard.jsx`
- [Document upload](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/components/DocumentUpload.jsx): `src/components/DocumentUpload.jsx`
- [Editor workspace](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/components/Workspace.jsx): `src/components/Workspace.jsx`
- [Document editor](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/components/DocumentEditor.jsx): `src/components/DocumentEditor.jsx`
- [Formatting panel](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/components/FormattingPanel.jsx): `src/components/FormattingPanel.jsx`
- [Template selector](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/components/TemplateSelector.jsx): `src/components/TemplateSelector.jsx`
- [Structure inspection](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/components/InspectionPanel.jsx): `src/components/InspectionPanel.jsx`
- [Document preview](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/components/DocumentPreview.jsx): `src/components/DocumentPreview.jsx`
- [Public and auth pages](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/pages/PublicPages.jsx): `src/pages/PublicPages.jsx`
- [Account settings](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/pages/Settings.jsx): `src/pages/Settings.jsx`
- [Documents page](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/pages/Documents.jsx): `src/pages/Documents.jsx`
- [Templates page](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/pages/Templates.jsx): `src/pages/Templates.jsx`

### Document processing

- [Document parser](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/services/documentParser.js): `src/services/documentParser.js`
- [Formatting engine](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/services/documentFormatter.js): `src/services/documentFormatter.js`
- [DOCX generator](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/services/docxGenerator.js): `src/services/docxGenerator.js`
- [DOCX processing](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/services/docxProcessor.js): `src/services/docxProcessor.js`

### Accounts and storage

- [Document storage](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/services/storage.js): `src/services/storage.js`
- [API client](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/src/services/api.js): `src/services/api.js`

### API services

- [API endpoints](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/api/%5B...path%5D.js): `api/[...path].js`
- [Express API](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/server/index.js): `server/index.js`
- [Request validation](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/server/validation.js): `server/validation.js`
- [Database configuration](https://github.com/fairuzbaru43-blip/rapimakalah/blob/main/server/configuration.js): `server/configuration.js`
- **PostgreSQL**

### Other components

- **Writer**
- **Browser print dialog**

## Connections

- Writer → Application shell: uses
- Application shell → Dashboard: shows (evidence: `src/App.jsx`)
- Application shell → Editor workspace: shows (evidence: `src/App.jsx`)
- Application shell → Public and auth pages: shows (evidence: `src/App.jsx`)
- Application shell → Account settings: shows (evidence: `src/App.jsx`)
- Application shell → Documents page: shows (evidence: `src/App.jsx`)
- Application shell → Templates page: shows (evidence: `src/App.jsx`)
- Dashboard → Document upload: renders (evidence: `src/pages/Dashboard.jsx`)
- Editor workspace → Document editor: renders (evidence: `src/components/Workspace.jsx`)
- Editor workspace → Document preview: renders (evidence: `src/components/Workspace.jsx`)
- Application shell → Formatting panel: shows (evidence: `src/App.jsx`)
- Formatting panel → Template selector: renders (evidence: `src/components/FormattingPanel.jsx`)
- Application shell → Structure inspection: shows (evidence: `src/App.jsx`)
- Document editor → Document parser: parses with (evidence: `src/components/DocumentEditor.jsx`)
- Document preview → Formatting engine: estimates pages (evidence: `src/components/DocumentPreview.jsx`)
- Formatting engine → Document parser: parses with (evidence: `src/services/documentFormatter.js`)
- Application shell → Document parser: parses imports (evidence: `src/App.jsx`)
- Application shell → Document storage: loads and saves (evidence: `src/App.jsx`)
- Application shell → DOCX generator: exports through (evidence: `src/App.jsx`)
- DOCX generator → Document parser: finds chapters (evidence: `src/services/docxGenerator.js`)
- DOCX generator → DOCX processing: converts blocks (evidence: `src/services/docxGenerator.js`)
- Writer → Public and auth pages: registers or signs in (evidence: `src/pages/PublicPages.jsx`)
- Public and auth pages → API client: requests auth (evidence: `src/pages/PublicPages.jsx`)
- Account settings → API client: requests account (evidence: `src/pages/Settings.jsx`)
- API client → API endpoints: calls
- API endpoints → Express API: delegates to (evidence: `api/[...path].js`)
- Express API → Request validation: validates with (evidence: `server/index.js`)
- Express API → Database configuration: resolves database (evidence: `server/index.js`)
- Express API → PostgreSQL: reads and writes (evidence: `README.md`)
- Document storage → API endpoints: uses account endpoints (evidence: `src/services/storage.js`)
- Document storage → Writer: stores locally when unauthenticated (evidence: `src/services/storage.js`)
- Writer → Browser print dialog: saves PDF via (evidence: `README.md`)
