This is my personal website. At first, it only has a blog, with Markdown being input format.
The website is programmed in Rust (used to be Python, but was rewritten as an exercise to learn Rust).
-
Backend:
-
Frontend:
- Server-side rendering: MiniJinja
- SPA (for Admin): VueJS, TypeScript, TailwindCSS
The backend application follows a modular structure with the following main directories at the root level:
-
src/- Main source code directoryapi/- API-related code including routes, handlers, and data structuresauth/- Authentication system including backend implementation and data structuresconf/- Configuration handling and settingsconsts/- Application constantsdb/- Database connection and client setuperrors/- Error handling and custom error typesfront/- Frontend-related code including routes and viewsmodels/- Data models and structures used throughout the applicationstores/- Data access layer for interacting with the databasethingsup/- Application startup and configuration utilitiestypes/- Custom type definitions and extensionsutils/- Utility functions and helpers used across the application
-
static/- Static assets like CSS, JavaScript, and images -
minijinja/- MiniJinja templates for server-side rendering -
locales/- Localization files for internationalization
The admin frontend is a single-page application built with the Lustre framework and is located in the ladmin/ directory:
src/- Main source code directoryconsts.gleam- Application constantscore.gleam- Core data types and message definitionsdecoders.gleam- JSON decoders for API responsesffi.gleam- Foreign function interface to JavaScriptmodels.gleam- Application state model and helper functionsroutes.gleam- Routing logic and URL parsingstore.gleam- Local storage persistence for user sessionupdates.gleam- Message handling and state update logicviews/- View components organized by featureblog_categories.gleam- Category management viewsblog_posts.gleam- Post management viewsbooks.gleam- Book management viewspresentations.gleam- Presentation management viewssimple.gleam- Simple components like login page
icons/- Icon componentselement.ffi.mjs- JavaScript interop functions