Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
9b19779
feat: Migrate database from PostgreSQL to SQLite.
j-cray Mar 19, 2026
694168a
refactor: use `gen_random_uuid()` for admin user ID in seed migration.
j-cray Mar 19, 2026
fc6c4ea
feat: dynamically generate UUID for the default admin user.
j-cray Mar 19, 2026
347a0ae
refactor: update admin user ID generation to use hex(randomblob) for …
j-cray Mar 19, 2026
6e34da8
feat: Add `Display`, `FromStr`, and lowercase serde support to `Creat…
j-cray Mar 19, 2026
1b4b3ab
feat: Add `Display` and `FromStr` implementations for `MediaCategory`…
j-cray Mar 19, 2026
3bb14ff
refactor: Directly retrieve `published_at` from database row instead …
j-cray Mar 19, 2026
1f974ab
feat: Configure SQLite with WAL journal mode, busy timeout, and ISO 8…
j-cray Mar 19, 2026
6f651c0
feat: Improve blog post tag deserialization error handling and docume…
j-cray Mar 19, 2026
ef0345f
Merge branch 'main' into refactor--use-sqlite-instead-of-postgres
j-cray Mar 19, 2026
c49674d
feat: Enhance article content rendering with improved date formatting…
j-cray Mar 19, 2026
e1ef11c
refactor: improve backend API error handling, optimize SQLite connect…
j-cray Mar 19, 2026
c3bc0b8
fix: Correct UUID generation and parsing in migrations, scripts, and …
j-cray Mar 19, 2026
72c9ae8
feat: Centralize UUID generation in application logic, remove databas…
j-cray Mar 19, 2026
80aa5b3
Refactor JWT secret management with `OnceLock`, sanitize uploaded fil…
j-cray Mar 19, 2026
d7f9c87
feat: Implement blog post listing API, enhance security with environm…
j-cray Mar 19, 2026
5bd6044
feat: Implement login rate limiting, remove default admin password, a…
j-cray Mar 19, 2026
b2c6c15
feat: Implement Argon2 for password hashing, refine admin API rate li…
j-cray Mar 19, 2026
83e75e7
feat: Implement IP-based rate limiting for admin routes, add default …
j-cray Mar 19, 2026
769ffec
refactor: Explicitly set JWT HS256 algorithm, optimize JWT secret loa…
j-cray Mar 19, 2026
465c663
refactor: Centralize JWT secret management in a new shared module, re…
j-cray Mar 20, 2026
436d271
fix: correct password length validation to count characters, enhance …
j-cray Mar 20, 2026
92cde79
feat: Introduce password hashing utility, harden admin API login rate…
j-cray Mar 20, 2026
f9f583b
refactor: Use `PeerIpKeyExtractor` for admin rate limiting, make fron…
j-cray Mar 20, 2026
8b78627
feat: Implement trusted proxy IP extraction for rate limiting, config…
j-cray Mar 20, 2026
62907c2
feat: Improve UUID generation, enhance security by validating IPs and…
j-cray Mar 20, 2026
24c4471
feat: Implement IPv6 private IP detection, reduce password rate limit…
j-cray Mar 20, 2026
13b3a05
feat: Implement pagination for article and blog post listings; refact…
j-cray Mar 20, 2026
43a5434
feat: Implement offset pagination for public content, enhance admin A…
j-cray Mar 20, 2026
ea6edf6
feat: Configure trusted proxies via environment variable, reduce API …
j-cray Mar 20, 2026
0a402a5
refactor: Cache trusted proxy IPs with OnceLock, consolidate admin ra…
j-cray Mar 20, 2026
8d88232
feat: Implement trusted proxy IP configuration for accurate rate limi…
j-cray Mar 20, 2026
f5f5db4
feat: Enhance API and frontend security by adding rate limiting, impr…
j-cray Mar 20, 2026
142c44d
feat: Improve rate limiting proxy detection, simplify user ID generat…
j-cray Mar 20, 2026
72e2902
feat: Generate UUIDs for user IDs, prevent password verification timi…
j-cray Mar 20, 2026
deee4a0
refactor: Refactor admin API rate limiting and dummy hash usage, impr…
j-cray Mar 20, 2026
1349d5a
feat: Migrate backend to SQLite, enforce production environment secur…
j-cray Mar 20, 2026
1077c45
feat: Pin Argon2 hashing parameters, refine client IP extraction logi…
j-cray Mar 20, 2026
9e783be
Configure Argon2 parameters explicitly, improve admin API password va…
j-cray Mar 20, 2026
df5c661
refactor: Split admin rate limit configurations, relax password lengt…
j-cray Mar 20, 2026
0f1aafa
refactor: centralize Argon2 parameters, enhance password validation a…
j-cray Mar 20, 2026
357d0bb
refactor: Enhance login security by dynamically generating dummy pass…
j-cray Mar 21, 2026
847fe83
feat: Optimize Argon2 initialization with `OnceLock`, fix SQLite admi…
j-cray Mar 21, 2026
986b4fb
feat: Enhance security by using parameterized queries for admin setup…
j-cray Mar 21, 2026
9206866
fix: quote rsync destination path in deploy script
j-cray Mar 23, 2026
366dd8e
feat: Include user ID in login response, harden password verification…
j-cray Mar 23, 2026
8750da8
refactor: Enhance image data URL validation, streamline schema UUID g…
j-cray Mar 24, 2026
2caeb7a
refactor: enhance security with XSS protection and IP header warnings…
j-cray Mar 24, 2026
abd6b73
refactor: Refine trusted proxy IP extraction, enforce pagination offs…
j-cray Mar 24, 2026
72e6b00
feat: Implement cursor-based pagination for articles, enhance trusted…
j-cray Mar 24, 2026
797a306
feat: Add `192.168.x.x` to trusted proxy IP check, validate `before` …
j-cray Mar 24, 2026
5e19df8
refactor: Streamline admin login to JSON-only, implement distinct pub…
j-cray Mar 24, 2026
bfe7ab0
Refactor rate limiting key extractor to a common module, add input va…
j-cray Mar 24, 2026
f3d0106
feat: Harden password verification against timing attacks, expand tru…
j-cray Mar 24, 2026
2b9f73d
Refactor rate limiter configuration and timestamp formatting, improve…
j-cray Mar 24, 2026
cda3d8f
feat: Add `updated_at` columns and timestamp normalization migrations…
j-cray Mar 24, 2026
cfae4b3
feat: Add flexible datetime parsing for blog post dates and refactor …
j-cray Mar 24, 2026
90ea5ea
feat: Implement database triggers for `updated_at` auto-updates and `…
j-cray Mar 24, 2026
2c4f708
refactor: Enhance IP logging for invalid tokens, optimize database up…
j-cray Mar 24, 2026
0abad57
Refactor API initialization for trusted proxies and authentication ra…
j-cray Mar 24, 2026
2b5d704
feat: Enhance database schema with check constraints, refine client I…
j-cray Mar 24, 2026
8e44b2b
feat: Implement robust client IP extraction for rate limiting, refine…
j-cray Mar 24, 2026
9de4250
refactor: Enhance API error responses with descriptive messages, refi…
j-cray Mar 24, 2026
3b808c3
feat: Add `rel=noopener noreferrer` to links, improve IP extraction r…
j-cray Mar 24, 2026
0bccbc0
feat: Improve rate limiter client IP extraction by returning an error…
j-cray Mar 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Database configuration
DATABASE_URL=postgres://admin:password@127.0.0.1:5432/portfolio
POSTGRES_USER=admin
POSTGRES_PASSWORD=password
POSTGRES_DB=portfolio
DATABASE_URL=sqlite:sqlite.db

# Server configuration
LEPTOS_SITE_ADDR=0.0.0.0:3000
RUST_LOG=info
RUST_BACKTRACE=1

# JWT Secret (CHANGE THIS IN PRODUCTION!)
JWT_SECRET=your-super-secret-key-change-in-production
JWT_SECRET=change-this-to-a-long-random-secret-in-production

# Application environment
ENVIRONMENT=development

# Proxy Configuration (REQUIRED in production if using Nginx/Reverse Proxy)
# TRUSTED_PROXY_IPS=172.18.0.2,172.18.0.3
3 changes: 2 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env bash
use flake

# Load environment variables
export RUST_LOG=info
export DATABASE_URL="postgres://admin:password@127.0.0.1:5432/portfolio"
export DATABASE_URL="sqlite://sqlite.db"
export RUST_BACKTRACE=1

# Optional: Print helpful info when entering directory
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
components: rustfmt
- name: Run cargo fmt
run: cargo fmt --all -- --check

- name: Run cargo fmt for hgen
run: cd hgen && cargo fmt --all -- --check
clippy:
name: Lint with Clippy
runs-on: ubuntu-latest
Expand All @@ -33,6 +34,8 @@ jobs:
components: clippy
- name: Run cargo clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: Run cargo clippy for hgen
run: cd hgen && cargo clippy --all-targets --all-features -- -D warnings

test:
name: Run Tests
Expand All @@ -45,3 +48,7 @@ jobs:
uses: taiki-e/install-action@nextest
- name: Run tests with nextest
run: cargo nextest run --workspace --all-features
- name: Check hgen compilation
run: cd hgen && cargo check --all-targets --all-features
- name: Run tests for hgen
run: cd hgen && cargo test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,5 @@ imports/
.sass-cache/
.sass-cache

# Hgen
hgen/target/
Loading
Loading