egoroff.spb.ru
Personal website and blog platform built with Rust backend and Vue.js frontend.
Overview
This is the source code for egoroff.spb.ru, a personal website that includes:
- Blog with posts and announcements
- Portfolio section
- Apache documentation viewer
- Admin interface for content management
- Search functionality
- IndieWeb support (Micropub)
Architecture
The project consists of several components:
Backend (Rust)
- egoroff: Main CLI application with server command
- kernel: Core business logic and data models
- server: HTTP server with REST API and template rendering
Frontend (Vue.js)
- ui: Vue 3 application with TypeScript
- Modern UI with Bootstrap and FontAwesome icons
- Admin interface for content management
- Responsive design
Documentation
- apache: Apache documentation in XML format with XSLT stylesheets
- templates: Template files for various content types
Technologies
Backend
- Rust with Tokio async runtime
- SQLite for data storage
- Askama for template rendering
- Tower for HTTP middleware
- Serde for serialization
Frontend
- Vue.js 3 with TypeScript
- Bootstrap 5 for styling
- FontAwesome for icons
- Axios for HTTP requests
- Vue Router for navigation
DevOps
- Docker for containerization
- Python build scripts for documentation processing
- Bun for frontend build process
Prerequisites
- Rust (latest stable)
- Bun (frontend package manager and build)
- Python 3 (Apache documentation build, optional)
- Docker (optional)
Building
Production assets are embedded into the Rust binary via rust-embed, so build the frontend first — it writes CSS/JS to static/dist/, which the server crate picks up at compile time.
Local Development
-
Build the frontend:
cd ui bun install # first time or after dependency changes bun run build # production → ../static/dist/For faster iteration during admin UI work:
bun run devbuild # development build → ../static/dist/ bun run serve # Vue dev server (admin SPA only) -
Build the backend:
cd egoroff cargo build # debug cargo build --release # production -
Build Apache documentation (optional):
python3 build.py
Docker Build
docker build -t egoroff/egoroff .
Running
Local Development
-
Start the server:
cd egoroff cargo run -- server
Docker
docker run -p 4200:4200 -p 4201:4201 egoroff/egoroff server
Configuration
The application uses environment variables for configuration:
-
EGOROFF_HTTP_PORT: HTTP port (default: 4200) -
EGOROFF_HTTPS_PORT: HTTPS port (default: 4201) -
EGOROFF_DATA_DIR: Data storage directory -
EGOROFF_HOME_DIR: Home directory
Features
Blog
- Markdown support for posts
- Tags and categories
- RSS/Atom feeds
- Social sharing
Portfolio
- Project showcase
- Download section
- Apache documentation viewer
Admin Interface
- Post management (create, edit, delete)
- Download management
- User management
- Content preview
IndieWeb Support
- Micropub endpoint for posting
- Microformats markup
Search
- Full-text search across posts
- Real-time search results
- Search result highlighting
Development
Project Structure
egoroff.spb.ru/
├── egoroff/ # Rust workspace
│ ├── kernel/ # Core business logic
│ ├── server/ # HTTP server
│ └── egoroff/ # Main CLI application
├── ui/ # Vue.js frontend
├── apache/ # Apache documentation
├── templates/ # Template files
├── static/ # Static assets
└── build.py # Build script
Available Commands
Backend (from egoroff/):
-
cargo build— build workspace (debug) -
cargo build --release— production binary -
cargo test— run tests -
cargo clippy --workspace -- -W clippy::pedantic— lint -
cargo run -- server— start the web server -
cargo run -- version— show version information
Frontend (from ui/):
-
bun install— install dependencies -
bun run build— production build tostatic/dist/ -
bun run devbuild— development build tostatic/dist/ -
bun run serve— admin SPA dev server -
bun run lint— ESLint check
Code Quality
The project enforces strict Rust linting:
- No unsafe code allowed
- Comprehensive error handling
- Async/await patterns
- Type safety throughout
- Run
cargo clippyandbun run lintbefore committing
License
This project is licensed under the terms specified in the LICENSE.txt file.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Contact
For questions or issues, please open an issue on GitHub or contact the maintainer.