🦀 My portfolio built with Rust and native web technologies.
Live Site: rayspace.dev
The design of this site is inspired by the work of Lee Robinson, but diverges in technical implementation.
This is a full stack application built with rust and core web technologies. It uses Actix Web for the backend and HTML/CSS/JavaScript for the frontend. The project also uses a PostgreSQL database for persistent storage, and utilizes SQLx as an async, pure Rust SQL crate.
For more information, check out the About This Site section on the live site.
This repository has been included in the Actix Examples repository, which features practical applications of Actix Web.
- Single page application functionality with navigation handling and state persistence
- Dynamic rendering of blog posts based on API response
- Handling of guestbook comments with real-time updating
- Management of blog post views
- Syntax highlighting and clipboard functionality for code blocks
- Input validation and sanitization
- Dynamic meta tag updating
- User authentication with GitHub OAuth
- Secure user session management
- Utilizing SQLx for secure database interactions
If you are familiar with Rust, you can build the app from source and run your own instance. To build and run the application locally, follow these steps:
-
Ensure you have Rust installed. You can install Rust by following the official guide.
-
Clone this repository.
git clone https://github.com/rx0a/rayspace.dev.git
cd rayspace.dev
- Setup PostgreSQL and create the tables.
CREATE TABLE comments (
id SERIAL PRIMARY KEY,
userid VARCHAR(255),
name VARCHAR(255),
comment TEXT,
timestamp TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP);
CREATE TABLE posts (
id SERIAL PRIMARY KEY,
title TEXT NOT NULL,
published_date DATE NOT NULL,
views INTEGER NOT NULL);
- Set the required environment variables.
- Create
.env
file at project root. - Required variables are within
.env.example
.
- Build and run the application.
cargo run
-
The server will start, by default it runs on
http://localhost:3000
. -
(Optional) Create a systemd service to run your application persistently.
-
(Optional) Install and configure a loadbalancer such as HAProxy for enabling features like HTTP/2 and rate limiting.
Contributions to this project are welcome! Feel free to open issues or submit pull requests.