chore: updates to landing, added cellar, added open graph images
69bbbc5a
5 file(s) · +122 −1
| 48 | 48 | fontWeight: 400, |
|
| 49 | 49 | fontFamily: '"Commit Mono", monospace, sans-serif', |
|
| 50 | 50 | color: "#ffffff", |
|
| 51 | - | opacity: 0.7, |
|
| 52 | 51 | }} |
|
| 53 | 52 | > |
|
| 54 | 53 | Minimal, self-hosted personal software in Rust |
| 1 | + | # Cellar |
|
| 2 | + | ||
| 3 | + | A minimal wine collection tracker |
|
| 4 | + | ||
| 5 | + | ## Overview |
|
| 6 | + | ||
| 7 | + | A simple, self-hosted wine collection app built with Rust. |
|
| 8 | + | ||
| 9 | + | - Single binary with embedded assets |
|
| 10 | + | - Password authentication with session cookies |
|
| 11 | + | - Add, edit, and delete wines from your collection |
|
| 12 | + | - AI-powered tasting notes via Claude |
|
| 13 | + | - Pentagon and bar visualizations for wine profiles |
|
| 14 | + | - Image upload with automatic JPEG processing |
|
| 15 | + | - Dark themed UI with Commit Mono font |
|
| 16 | + | - SQLite for persistent storage |
|
| 17 | + | ||
| 18 | + | ## Quickstart |
|
| 19 | + | ||
| 20 | + | ```bash |
|
| 21 | + | git clone https://github.com/stevedylandev/cellar.git |
|
| 22 | + | cd cellar |
|
| 23 | + | cp .env.example .env |
|
| 24 | + | # Edit .env with your password and Anthropic API key |
|
| 25 | + | cargo build --release |
|
| 26 | + | ./target/release/cellar |
|
| 27 | + | ``` |
|
| 28 | + | ||
| 29 | + | ### Environment Variables |
|
| 30 | + | ||
| 31 | + | | Variable | Description | Default | |
|
| 32 | + | |---|---|---| |
|
| 33 | + | | `CELLAR_PASSWORD` | Password for login authentication | `changeme` | |
|
| 34 | + | | `CELLAR_DB_PATH` | SQLite database file path | `cellar.sqlite` | |
|
| 35 | + | | `ANTHROPIC_API_KEY` | Anthropic API key for AI features | | |
|
| 36 | + | | `HOST` | Server bind address | `127.0.0.1` | |
|
| 37 | + | | `PORT` | Server port | `3000` | |
|
| 38 | + | | `COOKIE_SECURE` | Enable HTTPS-only cookies | `false` | |
|
| 39 | + | ||
| 40 | + | ## Routes |
|
| 41 | + | ||
| 42 | + | ### Public |
|
| 43 | + | ||
| 44 | + | | Method | Route | Description | |
|
| 45 | + | |---|---|---| |
|
| 46 | + | | `GET` | `/` | Wine collection list | |
|
| 47 | + | | `GET` | `/wines/{short_id}` | Wine detail page | |
|
| 48 | + | | `GET` | `/wines/{short_id}/image` | Wine image | |
|
| 49 | + | ||
| 50 | + | ### Admin |
|
| 51 | + | ||
| 52 | + | All admin routes (except login) require an authenticated session. |
|
| 53 | + | ||
| 54 | + | | Method | Route | Description | |
|
| 55 | + | |---|---|---| |
|
| 56 | + | | `GET/POST` | `/admin/login` | Login page | |
|
| 57 | + | | `GET` | `/admin/logout` | Logout | |
|
| 58 | + | | `GET` | `/admin` | Admin dashboard | |
|
| 59 | + | | `GET/POST` | `/admin/new` | Add a new wine | |
|
| 60 | + | | `GET/POST` | `/admin/edit/{short_id}` | Edit a wine | |
|
| 61 | + | | `POST` | `/admin/delete/{short_id}` | Delete a wine | |
|
| 62 | + | | `POST` | `/admin/analyze-image` | AI image analysis via Claude | |
|
| 63 | + | ||
| 64 | + | ## Structure |
|
| 65 | + | ||
| 66 | + | ``` |
|
| 67 | + | cellar/ |
|
| 68 | + | ├── src/ |
|
| 69 | + | │ ├── main.rs # App entrypoint, env vars, starts server |
|
| 70 | + | │ ├── server.rs # Axum router, HTTP handlers, and templates |
|
| 71 | + | │ ├── auth.rs # Password verification and session management |
|
| 72 | + | │ ├── claude.rs # Anthropic API integration for tasting notes |
|
| 73 | + | │ └── db.rs # SQLite database layer (wines, sessions) |
|
| 74 | + | ├── templates/ # Askama HTML templates |
|
| 75 | + | │ ├── base.html # Base layout with header and nav |
|
| 76 | + | │ ├── login.html # Login page |
|
| 77 | + | │ ├── index.html # Wine collection list |
|
| 78 | + | │ ├── wine.html # Single wine display |
|
| 79 | + | │ ├── wine_form.html # Add/edit wine form |
|
| 80 | + | │ └── admin.html # Admin page |
|
| 81 | + | ├── static/ # Favicons, og:image, styles, and webmanifest |
|
| 82 | + | ├── Dockerfile # Multi-stage build (Rust + Debian slim) |
|
| 83 | + | └── docker-compose.yml |
|
| 84 | + | ``` |
|
| 85 | + | ||
| 86 | + | ## Deployment |
|
| 87 | + | ||
| 88 | + | ### Railway |
|
| 89 | + | ||
| 90 | + | [](https://railway.com/deploy/MNprVh?referralCode=JGcIp6) |
|
| 91 | + | ||
| 92 | + | ### Docker |
|
| 93 | + | ||
| 94 | + | ```bash |
|
| 95 | + | git clone https://github.com/stevedylandev/cellar.git |
|
| 96 | + | cd cellar |
|
| 97 | + | cp .env.example .env |
|
| 98 | + | # Edit .env with your password and Anthropic API key |
|
| 99 | + | docker compose up -d |
|
| 100 | + | ``` |
|
| 101 | + | ||
| 102 | + | This will start Cellar on port `3000` with a persistent volume for the SQLite database. |
|
| 103 | + | ||
| 104 | + | ### Binary |
|
| 105 | + | ||
| 106 | + | ```bash |
|
| 107 | + | cargo build --release |
|
| 108 | + | ``` |
|
| 109 | + | ||
| 110 | + | The resulting binary at `./target/release/cellar` is self-contained with all assets embedded. Copy it to your server with a configured `.env` file and run it directly. |
Binary file — no preview.
Binary file — no preview.
| 2 | 2 | ||
| 3 | 3 | export default defineConfig({ |
|
| 4 | 4 | title: 'Andromeda', |
|
| 5 | + | iconUrl: "https://andromeda.build/icon.png", |
|
| 6 | + | ogImageUrl: "https://andromeda.build/og.png", |
|
| 5 | 7 | markdown: { |
|
| 6 | 8 | code: { |
|
| 7 | 9 | themes: { |
|
| 10 | 12 | }, |
|
| 11 | 13 | }, |
|
| 12 | 14 | }, |
|
| 15 | + | socials: [ |
|
| 16 | + | { |
|
| 17 | + | icon: "github", |
|
| 18 | + | link: "https://github.com/stevedylandev/andromeda", |
|
| 19 | + | } |
|
| 20 | + | ], |
|
| 13 | 21 | sidebar: [ |
|
| 14 | 22 | { |
|
| 15 | 23 | text: 'Intro', |
|
| 54 | 62 | { |
|
| 55 | 63 | text: 'Posts', |
|
| 56 | 64 | link: '/apps/posts', |
|
| 65 | + | }, |
|
| 66 | + | { |
|
| 67 | + | text: 'Cellar', |
|
| 68 | + | link: '/apps/cellar', |
|
| 57 | 69 | }, |
|
| 58 | 70 | ], |
|
| 59 | 71 | }, |
|