How rnmz/amai works
Amai is a lightweight Markdown blog: readers browse articles and files, while administrators authenticate and create posts. Four Vue frontends provide Classic, Cyberpunk, Neo, and Y2K themes; the Go backend supplies the application server. The sampled frontend excerpts show bootstrap, shell, Markdown theming, and authentication setup. Backend handler, routing, and persistence files are indexed but their implementation excerpts were not provided, so backend relationships are left unverified rather than inferred.
Main entry points: index.ts Page routing · routing.go HTTP API · marked-render.ts Markdown rendering · App.vue Classic app
Components 23
Web themes
- Classic app
amai-classic/src/App.vue - Cyberpunk app
amai-cyber/src/App.vue - Neo app
amai-neo/src/App.vue - Y2K app
amai-y2k/src/App.vue - Vue bootstrap
amai-classic/src/main.ts - Page routing
amai-classic/src/router/index.ts
Content experience
- Article views
amai-classic/src/views/ArticlesView.vue - Article detail
amai-classic/src/views/ArticlePageView.vue - Post authoring
amai-classic/src/views/CreateArticleView.vue - Markdown rendering
amai-classic/src/utils/marked-render.ts - File browsing
amai-classic/src/views/FilesView.vue
Authentication
- Auth state
amai-classic/src/stores/auth.ts - Auth API
amai-classic/src/api/auth.ts - API client
amai-classic/src/api/client.ts
Go services
- HTTP API
app/config/routing.go - Auth handlers
app/handler/auth_handler.go - Post handlers
app/handler/post_handler.go - File handlers
app/handler/file_handler.go - Auth logic
app/auth/auth.go
Persistence
- Post data
app/data/Posts.go - File data
app/data/File.go - Database setup
app/config/db.go
Other components
- Reader / admin
Connections 26
- Reader / admin → Vue bootstrap: opens app
- Vue bootstrap → Classic app: mounts
amai-classic/src/main.ts - Vue bootstrap → Auth state: checks auth
amai-classic/src/main.ts - Classic app → Markdown rendering: initializes theme
amai-classic/src/App.vue - Classic app → Page routing: renders routes
amai-classic/src/App.vue - Cyberpunk app → Markdown rendering: initializes theme
- Neo app → Markdown rendering: initializes theme
- Y2K app → Markdown rendering: initializes theme
- Reader / admin → Cyberpunk app: uses theme
- Reader / admin → Neo app: uses theme
- Reader / admin → Y2K app: uses theme
- Page routing → Article views: routes to
- Page routing → Article detail: routes to
- Page routing → Post authoring: routes to
- Page routing → File browsing: routes to
- Auth state → Auth API: calls
amai-classic/src/stores/auth.ts - Auth state → API client: checks identity
amai-classic/src/stores/auth.ts - API client → HTTP API: sends requests
- HTTP API → Auth handlers: dispatches auth
- HTTP API → Post handlers: dispatches posts
- HTTP API → File handlers: dispatches files
- Auth handlers → Auth logic: delegates
- Post handlers → Post data: uses post data
- File handlers → File data: uses file data
- Post data → Database setup: uses connection
- File data → Database setup: uses connection