Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
59 changes: 0 additions & 59 deletions Dockerfile

This file was deleted.

10 changes: 4 additions & 6 deletions GEMINI.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ The application is a modern, full-stack Rust web application utilizing Server-Si

- **Frontend**: Leptos (Rust WASM framework)
- **Backend**: Axum (Rust async web framework)
- **Database**: PostgreSQL (managed via SQLx)
- **Database**: SQLite (managed via SQLx)
- **Styling**: SASS / SCSS
- **Environment**: Nix (via `flake.nix` and `direnv`)
- **Deployment**: Docker Compose with Nginx reverse proxy and Let's Encrypt SSL
- **Deployment**: Managed externally via a meta repo.

## Directory Structure

- `backend/`: Server-side Rust code. Houses the Axum server, API handlers, database connection pools, and Leptos app serving setup.
- `frontend/`: Client-side Rust code. Contains Leptos components, routing, and UI logic.
- `shared/`: Shared types, models, and utilities used by both frontend and backend.
- `migrations/` & `migration/`: SQLx database migration files.
- `scripts/`: Automation scripts for local development database setup and remote deployment.
- `scripts/`: Automation scripts for local development database setup.
- `style/`: SASS stylesheets.
- `.github/workflows/`: CI/CD pipelines (Formatting, Linting, Testing, Security Audits, and AI reviews).

Expand All @@ -41,7 +41,7 @@ The recommended way to run the application in development is via `cargo-leptos`,
cargo leptos watch
```

*Note: Make sure your local PostgreSQL database is running via `docker-compose up -d db` (which is typically handled by `setup-dev.sh`).*
*Note: Make sure your local SQLite database is initialized via `./scripts/setup-dev.sh`.*

## Important Architectural Guidelines for AI Assistants

Expand All @@ -59,8 +59,6 @@ cargo leptos watch
4. **Styling**:
Global styling is handled via SASS. When adding new components, add corresponding styles to the `style/` directory and ensure they are compiled correctly by the Leptos build pipeline.

5. **Deployment**:
Deployment is managed by `./scripts/deploy.sh`. Changes to infrastructure should be mirrored in both `compose.yaml` and `compose.prod.yaml` where applicable.

- Tick off tasks in the roadmap as they are completed.
- Update the roadmap as the project progresses.
Expand Down
26 changes: 7 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,25 @@
# jakewray.ca

My personal portfolio website built with Rust, Leptos, and PostgreSQL.
My personal portfolio website built with Rust, Leptos, and SQLite.

## Live Site

- [jakewray.dev](https://jakewray.dev)

## Deployment

See [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md) for complete deployment instructions.

Quick start:
```bash
./scripts/deploy.sh all
```

For first-time SSL setup on the server:
```bash
./scripts/init_ssl.sh
```

## Architecture

- **Backend**: Rust with Leptos (SSR)
- **Database**: PostgreSQL
- **Reverse Proxy**: Nginx with Let's Encrypt SSL
- **Deployment**: Docker Compose
- **Database**: SQLite

### Known Limitations

- **Database Concurrency**: The application uses embedded SQLite in WAL mode with a small connection pool (`max_connections(5)`). SQLite only allows one concurrent writer. Concurrent write bursts will queue (up to a 5s busy timeout) and could fail under heavy write load. This is acceptable for a personal blog/portfolio, but must be accounted for if write traffic scales.
- **Reverse Proxy Setup**: When deploying behind a reverse proxy (such as Nginx), you **MUST** configure the `TRUSTED_PROXY_IPS` environment variable with the proxy's IP address. If left unset, all client requests will appear to come from the proxy's IP, effectively disabling per-client rate limiting and causing all users to share the same rate limit bucket.

## Development

### Quick Start with Nix (Recommended)

```bash
direnv allow # Load development environment
./scripts/setup-dev.sh # Setup database
Expand All @@ -43,21 +29,23 @@ cargo leptos watch # Start dev server
See [docs/LOCAL_DEV.md](docs/LOCAL_DEV.md) for detailed setup.

### Without Nix

```bash
cargo install cargo-leptos
./scripts/setup-dev.sh
cargo leptos watch
```

## Project Structure

- `backend/` - Server-side Rust code
- `frontend/` - Client-side Leptos components
- `shared/` - Shared types and utilities
- `flake.nix` - Nix development environment
- `.envrc` - direnv configuration


## Development Roadmap

- [x] **HTTPS/SSL** - Let's Encrypt certificates
- [x] **Authentication** - Password-protected admin panel
- [x] **Theme** - Modern indigo design
Expand Down
44 changes: 0 additions & 44 deletions docker-compose.prod.yaml

This file was deleted.

147 changes: 0 additions & 147 deletions docs/DEPLOYMENT.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/LOCAL_DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,7 @@ Edit files in `frontend/src/pages/admin/login.rs`
4. **Check form validation**: Try submitting without credentials
5. **Test token expiration**: Manually edit localStorage token to test

## Production Deployment

When ready to deploy:
```bash
cargo leptos build --release
./scripts/deploy.sh all
```

See [docs/DEPLOYMENT.md](../DEPLOYMENT.md) for full deployment guide.

## Troubleshooting

Expand Down
Loading
Loading