All checks were successful
Deploy ${{ gitea.repository }} / build (push) Successful in 1s
1.8 KiB
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'swrap-resource - Dependencies:
deps.edn- uses Clojure CLI tools (deps.edn)
The application:
- Generates HTML using Hiccup (in-memory, not template files)
- Serves on port 80 in production, random port in development
- Serves static resources from
resources/public/ - 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
indexvar - Routes are minimal: just a single GET "/" endpoint
- The app is wrapped with Ring middleware for serving static files and proper headers