Auto-indexing service and GraphQL API for AT Protocol Records
quickslice.slices.network/
atproto
gleam
graphql
1.PHONY: help test build clean run css format-examples docs deploy-www
2
3help:
4 @echo "quickslice - Makefile Commands"
5 @echo ""
6 @echo " make run - Start server"
7 @echo " make test - Run all tests"
8 @echo " make build - Build all projects"
9 @echo " make clean - Clean build artifacts"
10 @echo " make format-examples - Format example HTML files"
11 @echo " make deploy-www - Deploy www/priv to Bunny CDN"
12 @echo ""
13
14# Run all tests
15test: build
16 @echo "Running lexicon_graphql tests..."
17 @cd lexicon_graphql && gleam test
18 @echo ""
19 @echo "Running server tests..."
20 @cd server && gleam test
21 @echo ""
22 @echo "All tests passed"
23
24# Run server
25run: build
26 @echo "Starting server..."
27 @cd server && gleam run
28
29# Clean build artifacts
30clean:
31 @cd lexicon_graphql && gleam clean
32 @cd server && gleam clean
33 @echo "Clean complete"
34
35# Format example HTML files
36format-examples:
37 @prettier --write "examples/**/*.html"
38
39# Generate documentation
40docs-build:
41 @VERSION=$$(git describe --tags --abbrev=0) && \
42 sed -i '' "s/const version = \"v[0-9.]*\"/const version = \"$$VERSION\"/" www/src/www/layout.gleam
43 @cd www && gleam run
44
45docs-dev:
46 @cd www && npx serve priv
47
48# Deploy www to Bunny CDN
49deploy-www: docs-build
50 @scripts/deploy-cdn.sh