This is the source code for my personal website, kjhjason.com.
Note: The website design is inspired by leerob/leerob.io.
- Actix Web (Rust)
- MongoDB Atlas
- Askama Templates
- Pre-compiled templates for server-side rendering.
- Tailwind CSS
- htmx
- pdf.js
- Mainly for previewing my resume
- Docker
- Cloudflare
- R2 for storing blog files like images
- Reverse Proxy for bot protection and caching
- Fly.io
- Automated attacks are mitigated using Cloudflare's turnstile CAPTCHA solution.
- Passwords are hashed using Argon2.
- TOTP secrets for 2FA are encrypted using XChaCha20-Poly1305 before being stored in the database.
- Nonces are generated with
rand::thread_rng()
that is cryptographically secure and are usually 32 bytes long. - Implemented various middleware for enhanced security to adhere to OWASP Top 10 guidelines:
- Content Security Policy.
- Cross-Site Request Forgery.
- Uses HMAC-SHA1 for CSRF tokens via hmac-serialiser.
- HTTP Strict Transport Security.
- Authentication using HMAC-SHA512 via hmac-serialiser for a shorter but secure tokens instead of using JSON Web Tokens (JWT).
- hmac-serialiser uses implementations by RustCrypto.