objective categorical abstract machine language personal data server
1# frontend
2
3is the web interface for pegasus, containing the admin dashboard and account management pages.
4
5Built with [MLX](https://github.com/ocaml-mlx/mlx) (a JSX-like OCaml dialect), [server-reason-react](https://github.com/ml-in-barcelona/server-reason-react) (React SSR in OCaml) and [melange](https://melange.re) (OCaml to JavaScript compiler).
6
7## pages
8
9### admin
10
11- **Login** (`/admin`) - Admin authentication
12- **Users** (`/admin/users`) - View and manage PDS users
13- **Invites** (`/admin/invites`) - Create and manage invite codes
14- **Blobs** (`/admin/blobs`) - Monitor blob storage usage
15
16### account
17
18- **Account page** (`/account`) - User profile and email settings
19- **Identity** (`/account/identity`) - Handle and DID management
20- **Permissions** (`/account/permissions`) - OAuth app permissions and sessions
21- **Login** (`/login`) - User authentication
22- **Signup** (`/signup`) - New account creation
23
24### oauth
25
26- **Authorize** (`/oauth/authorize`) - OAuth authorization flow
27
28## development
29
30The frontend is built as part of the main pegasus project. When developing:
31
32```bash
33# Build the frontend
34dune build
35
36# The compiled JavaScript will be in _build/default/public/
37```
38
39### formatting
40
41The frontend uses MLX syntax, which can't be formatted using ocamlformat:
42
43```bash
44# Install formatter
45opam install ocamlformat-mlx
46
47# Format MLX files
48ocamlformat-mlx -i frontend/src/**/*.mlx
49```