www/CLAUDE.md
Adam Jeniski 1dd84c980a
All checks were successful
Deploy ${{ gitea.repository }} / build (push) Successful in 1s
vibe some styles
2026-01-02 01:08:12 -05:00

1.8 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

This is a simple Clojure web application serving a personal dashboard at ajet.fyi. It uses Ring, Compojure, and Hiccup to generate and serve a static HTML page with links to various services.

Development Commands

Start the server (development):

clj -M:repl

Then in the REPL:

(require 'user)
(in-ns 'user)
server ; inspect the server
(. server stop)  ; stop server
(. server start) ; start server

Start the server (production):

./start.sh
# or directly:
clj -M -m ajet.www.core

Restart systemd service:

./restart.sh

Architecture

  • Entry point: src/ajet/www/core.clj - defines the web app, routes, and server
  • Development REPL: src/dev/user.clj - provides a convenient REPL environment with server control
  • Static resources: resources/public/ - CSS and other static files served via Ring's wrap-resource
  • Dependencies: deps.edn - uses Clojure CLI tools (deps.edn)

The application:

  1. Generates HTML using Hiccup (in-memory, not template files)
  2. Serves on port 80 in production, random port in development
  3. Serves static resources from resources/public/
  4. Uses Ring middleware for content-type and not-modified headers

Deployment

Deployment is automated via Gitea Actions (.gitea/workflows/deploy.yaml). On push to main, it triggers a service restart via curl to the service-manager endpoint.

Code Organization

  • The entire app logic is in src/ajet/www/core.clj
  • The HTML content is defined as a Hiccup data structure in the index var
  • Routes are minimal: just a single GET "/" endpoint
  • The app is wrapped with Ring middleware for serving static files and proper headers