Home

Awesome

rayspace.dev

🦀 My portfolio built with Rust and native web technologies.</br> Live Site: rayspace.dev

Overview

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.

Technologies Used

Features

Running Locally

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:

  1. Ensure you have Rust installed. You can install Rust by following the official guide.

  2. Clone this repository.

git clone https://github.com/rx0a/rayspace.dev.git
cd rayspace.dev
  1. 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);
  1. Set the required environment variables.
  1. Build and run the application.
cargo run
  1. The server will start, by default it runs on http://localhost:3000.

  2. (Optional) Create a systemd service to run your application persistently.

  3. (Optional) Install and configure a loadbalancer such as HAProxy for enabling features like HTTP/2 and rate limiting.

Contributing

Contributions to this project are welcome! Feel free to open issues or submit pull requests.