94 lines
1.9 KiB
Markdown
94 lines
1.9 KiB
Markdown
# jetpham.com
|
|
|
|
Personal site for Jet Pham.
|
|
|
|
The site is a small Vite app with a terminal-style UI, ANSI-rendered text, and a WebGL2 Conway's Game of Life background.
|
|
|
|
It also ships as a Nix flake with a reusable NixOS module for serving the static frontend and the Q+A API on a host.
|
|
|
|
## Features
|
|
|
|
- ASCII/ANSI-inspired visual style with the IBM VGA font
|
|
- Conway's Game of Life running in the background via WebGL2
|
|
- Q+A page backed by the site API
|
|
- Single-file oriented frontend build with Vite
|
|
- Fullscreen GPU blur/composite for the frosted panel effect
|
|
|
|
## Stack
|
|
|
|
- Vite
|
|
- TypeScript
|
|
- Tailwind CSS v4
|
|
- WebGL2
|
|
- npm
|
|
|
|
## Development
|
|
|
|
### Prerequisites
|
|
|
|
- Node.js + npm
|
|
|
|
### Install
|
|
|
|
```bash
|
|
npm install
|
|
```
|
|
|
|
### Start the dev server
|
|
|
|
```bash
|
|
npm run dev
|
|
```
|
|
|
|
### Check the app
|
|
|
|
```bash
|
|
npm run check
|
|
```
|
|
|
|
### Build for production
|
|
|
|
```bash
|
|
npm run build
|
|
```
|
|
|
|
## Structure
|
|
|
|
```text
|
|
api/ Q+A backend
|
|
module.nix NixOS module
|
|
src/ frontend app
|
|
```
|
|
|
|
## NixOS module
|
|
|
|
Import the module from the flake and point it at the host-managed secret files you want to use.
|
|
|
|
```nix
|
|
{
|
|
inputs.website.url = "github:jetpham/website";
|
|
|
|
outputs = { self, nixpkgs, website, ... }: {
|
|
nixosConfigurations.my-host = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
website.nixosModules.default
|
|
({ config, ... }: {
|
|
services.jetpham-website = {
|
|
enable = true;
|
|
domain = "jetpham.com";
|
|
webhookSecretFile = config.age.secrets.webhook-secret.path;
|
|
};
|
|
})
|
|
];
|
|
};
|
|
};
|
|
}
|
|
```
|
|
|
|
Optional Tor support is configured by setting `services.jetpham-website.tor.enable = true;` and providing the three onion key file paths.
|
|
|
|
## Notes
|
|
|
|
- The homepage and Q+A page are the intended public pages.
|
|
- The background renderer targets WebGL2 and falls back to the site shell background if WebGL2 is unavailable.
|