How cle07/vue-actix-blog works
Purpose and Entry Points
A single-project content site combines a Rust/Actix Web backend with a Vue SPA. Markdown articles (from an expected articles/ source directory) are synchronized into SQLite and exposed through APIs; the frontend renders articles, timelines, and Lua-related pages.
Backend startup: src/main.rs. Frontend bootstrap: frontend/src/main.js, with HTML/Vite entry at frontend/index.html.
Backend HTTP Host
Actix Web owns production HTTP serving, API registration, and likely static SPA delivery. It is the integration boundary between browser clients, SQLite-backed article data, and Lua execution/compilation functionality.
Paths: src/main.rs, src/api.rs, src/lua.rs.
Content Synchronization and Persistence
The repository’s primary content pipeline is Markdown article files → parsed/synchronized article records → SQLite database → API responses. The checked-in frontend database artifact suggests the database may be distributed or consumed during frontend-oriented workflows, while Rust database access remains centralized.
Paths: src/db.rs, frontend/articles.db, src/api.rs.
Article API and Navigation Model
Article-oriented endpoints in src/api.rs provide the backend contract consumed by Vue views. Obsidian-style links imply article content and metadata form a graph-like navigation model rather than isolated documents; article and timeline screens are distinct consumers of this data.
Paths: src/api.rs, frontend/src/views/Article.vue, frontend/src/views/Timeline.vue.
Lua Execution Surface
Lua is a separate backend capability, exposed through an Actix endpoint rather than implemented solely in the browser. The frontend provides both a playground and dedicated Lua pages, creating a request boundary between Vue code editing/UI and Rust-side compilation or execution.
Paths: src/lua.rs, frontend/src/components/LuaPlayground.vue, frontend/src/views/Lua.vue.
Vue SPA Composition
Vue is organized around route-selected views and reusable presentation components. App.vue is the shell; router.js controls view selection; article rendering is split between wrapper and article views. Shared navigation and timeline components support cross-page movement.
Paths: frontend/src/App.vue, frontend/src/router.js, frontend/src/views/ArticleWrapper.vue, frontend/src/components/NavBar.vue.
Deployment and Runtimes
Rust/Cargo builds and runs the Actix service; Bun/Vite builds or serves the Vue application. Development uses separate servers (Vue on 5173, Actix API on 8080). Production builds frontend assets and serves the application through Actix. Docker is the deployment packaging boundary.
Paths: Cargo.toml, frontend/package.json, frontend/vite.config.js, Dockerfile.
Main entry points: router.js Route selection · main.rs Actix HTTP host · api.rs Article API · App.vue App shell
Components 18
Rust backend
- Actix HTTP host · Serves APIs and production SPA assets.
src/main.rs - Article API · Article and navigation contract for the SPA.
src/api.rs - Lua execution · Compiles or executes Lua through an HTTP endpoint.
src/lua.rs
Content pipeline
- Markdown articles · Source articles synchronized into persistent records.
- SQLite article store · Central persisted article data.
src/db.rs - Frontend DB artifact · Checked-in database used by frontend-oriented workflows.
frontend/articles.db
Vue SPA
- SPA entry
frontend/index.html - Vue bootstrap
frontend/src/main.js - App shell
frontend/src/App.vue - Route selection
frontend/src/router.js - Article views · Wrapper and article screens render linked article content.
frontend/src/views/ArticleWrapper.vue - Timeline view
frontend/src/views/Timeline.vue - Navigation UI
frontend/src/components/NavBar.vue - Lua UI · Browser editing interface for backend Lua requests.
frontend/src/components/LuaPlayground.vue - Lua page
frontend/src/views/Lua.vue
Build & deployment
- Bun/Vite runtime · Runs development server and builds SPA assets.
frontend/vite.config.js - Cargo runtime · Builds and runs the Actix service.
Cargo.toml - Docker package · Packages the production application.
Dockerfile
Connections 21
- Markdown articles → SQLite article store: parse and synchronize
- SQLite article store → Frontend DB artifact: distributed artifact
- Actix HTTP host → Article API: registers
- Actix HTTP host → Lua execution: registers
- Article API → SQLite article store: reads article records
- SPA entry → Vue bootstrap: loads
- Vue bootstrap → App shell: mounts
- App shell → Route selection: uses
- Route selection → Article views: selects
- Route selection → Timeline view: selects
- Route selection → Lua page: selects
- App shell → Navigation UI: renders
- Article views → Article API: fetches articles
- Timeline view → Article API: fetches timeline data
- Lua page → Lua UI: hosts
- Lua UI → Lua execution: executes requests
- Bun/Vite runtime → SPA entry: serves and builds
- Cargo runtime → Actix HTTP host: builds and runs
- Actix HTTP host → SPA entry: serves in production
- Docker package → Cargo runtime: packages
- Docker package → Bun/Vite runtime: packages built assets