Loading repository data…
Loading repository data…
DevsHero / repository
Leptos Portfolio Admin is a fullstack SSR portfolio & LLM chat site built in Rust with a dynamic admin panel. It uses Leptos, Actix Web, SurrealDB, and Tailwind CSS to update portfolio content in real time and serves as a learning resource for modern Rust SSR development.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Leptos Portfolio Admin is a comprehensive, full-stack portfolio website solution built entirely in Rust. It leverages the Leptos framework for server-side rendering (SSR) and interactive frontend components, coupled with an Actix Web backend API. You can see a demo of the project by visiting my website. Check it out!
Key Highlights:
This project aims to provide a ready-to-use, customizable portfolio site that is easy to maintain through its dedicated admin interface and offers an engaging chat experience.
dynamic-agent backend can query its configured vector database. This database should be populated with your portfolio information (profile, skills, experiences, etc.). The agent retrieves relevant text chunks and uses them, along with the user's query, to generate an informed answer via the LLM. This ensures responses are grounded in your actual portfolio data.The pre-defined chat suggestions are loaded from the /assets/pre-suggest.json file. You can customize these suggestions to better fit your portfolio content and to trigger specific RAG queries.
1. Edit assets/pre-suggest.json:
The file should be an array of suggestion groups. Each group object has the following structure:
[
{
"group_title": "General Topics",
"icon": "BsChatRightText", // Icon identifier
"suggestions": [
"Hello, how are you?",
"What can you do?"
]
},
{
"group_title": "Vector Database (Profile)", // Example for RAG
"icon": "ImProfile",
"suggestions": [
"What is your profile fullname?", // This query will leverage RAG
"List profile position name from experiences." // This also uses RAG
]
}
// Add more groups as needed
]
group_title: The title displayed for the category of suggestions.icon: A string identifier for the icon to be displayed next to the group title.suggestions: An array of strings, where each string is a pre-defined question or prompt. Queries aimed at retrieving specific portfolio details (like those under "Vector Database (Profile)") will typically be handled by the dynamic-agent's RAG pipeline.2. Configure Icons:
The icon field in pre-suggest.json is a key that maps to an actual icon from the icondata crate. This mapping is defined in the ICON_MAP static variable within the src/app/utils/utils.rs file.
Finding Icons: You can browse available icons at the icondata icon explorer.
Adding New Icons to ICON_MAP: If you want to use an icon that's not already in ICON_MAP, you'll need to add it. Open src/app/utils/utils.rs and add a new entry to the ICON_MAP. For example, if you find an icon AiStarOutline in icondata (which would be i::AiStarOutline in the code) and you want to use the key "MyStarIcon" in your pre-suggest.json:
// filepath: src/app/utils/utils.rs
// ...
pub static ICON_MAP: phf::Map<
&'static str,
&'static icondata_core::IconData
> = phf_map! {
// ... existing icons ...
"BsChatRightText" => i::BsChatRightText,
"ImProfile" => i::ImProfile,
"MyStarIcon" => i::AiStarOutline, // Add your new icon here
// ...
};
// ...
Ensure you have the correct use icondata as i; statement at the top of utils.rs. After updating ICON_MAP, you can then use "MyStarIcon" as the value for the icon field in assets/pre-suggest.json.
3. Ensure dynamic-agent is Configured for RAG:
For the chat to effectively answer questions about your "profile" or other specific data using RAG:
dynamic-agent backend must be configured with a data source containing your portfolio information (e.g., markdown files, database connection).dynamic-agent README for detailed instructions on setting up its data sources, vector store, and RAG pipeline. The effectiveness of queries like "What profile fullname?" depends entirely on this backend configuration..env) to enable adding, editing, and deleting content.Clone Project:
git clone https://github.com/DevsHero/leptos_portfolio_admin.git
cd leptos_portfolio_admin
Prepare .env file:
Copy the example environment file. You will need to fill this file with your specific configuration details.
cp .env-example .env
Below are the variables defined in .env-example and their purpose:
# --- SurrealDB Connection ---
# Defines the protocol (http/https) and host/port for the SurrealDB instance.
# Example: http:127.0.0.1:8000 or https:[your-cloud-instance.com](https://www.google.com/search?q=