Personal website to host my portofolio, DB and future API's.
Built using Vite, Shadcn and Tailwind for frontend. Actix-web and SurrealDB for backend and Github's OAuth2.
First experience with Rust for backend.
- Install rustup, bun and other dependencies using:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
curl -sSf https://install.surrealdb.com | sh
curl -fsSL https://bun.sh/install | bash
- Install packages using
cd frontend & bun install
- Start frontend using
bun dev
or build the project for smoother experience usingbun run build
and thenbun run start
You have to make sure you have setup nginx and SSL certificates to run on https, the steps are following:
- Make sure you have installed nginx and mkcert
- Run
mkcert -install
to authenticate your device - Then run
mkcert localhost
to get SSL certificate - Place
localhost.pem
andlocalhost-key.pem
inside the root of backend directory - Change the
main.rs
file in backend to include the files you just made. Here is an example:
builder
.set_private_key_file(
"<REPLACE WITH YOUR CERTIFICATE LOCATION (NOT RELATIVE)>",
SslFiletype::PEM,
)
.unwrap();
builder
.set_certificate_chain_file(
"<REPLACE WITH YOUR CERTIFICATE KEY LOCATION (NOT RELATIVE)>",
)
.unwrap();
- Then edit nginx config using
nano /etc/nginx/nginx.conf
and adding following lines inside the http block:
include /etc/nginx/sites-enabled/*;
types_hash_max_size 2048;
types_hash_bucket_size 128;
- Create and edit file
localhost
usingnano /etc/nginx/sites-enabled/localhost
- Paste following lines replacing location of files
ssl_certificate
andssl_certificate_key
:
server {
listen 443 ssl;
server_name localhost;
ssl_certificate <REPLACE WITH YOUR CERTIFICATE LOCATION (NOT RELATIVE)>;
ssl_certificate_key <REPLACE WITH YOUR CERTIFICATE KEY LOCATION (NOT RELATIVE)>;
location / {
proxy_pass http://localhost:5000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_http_version 1.1;
proxy_set_header Connection "Upgrade";
}
}
- Run
systemcl enable nginx
andsystemcl start nginx
to enable automatic start on boot. Check for errors - Frontend should be now up and running on https://localhost
- Move to Vite
- Move to Next.js
- Home Page
- About
- Portfolio
- Projects
- Links
- Docs page - 4+ weeks (inclding moving 3 times)
- Sidebar
- MDX Support
- Hashtags
- ScrollToTop
- Cmdk
- [] Mobile
- Code
- Discord Bot Page
- About
- Link
- Login Page
- Change layout
- Fix login system
- Notes App
-
Useful Info Page (e.g.--> Docs/extras#boot-into-windows
) - Make social redirect (e.g.
/social/spotify
)
- Move to SurrealDB 2.0
- Change to RocksDB
- Auth working
- Get access-token
- Get user data
- Make user in DB
- Create & give JWT token
- Pass in cookies
- Validate JWT
- Checking last active
- Notes app
- Discord bot pull on commit to main branch
- Admin for Info page
- Add "About" command for my discord-bot
- Proper branding and PFP (currently using steamhappy everywhere I can)