A full-stack Jac starter template with user authentication and a working backend function demo.
jactastic/
├── jac.toml # Project configuration
├── main.jac # Entry point (server + client)
├── services/
│ └── appService.jac # Server-side functions (add yours here)
├── pages/
│ ├── LoginPage.cl.jac # Login / signup page
│ └── DashboardPage.cl.jac # Main dashboard (protected)
├── components/
│ └── GreetCard.cl.jac # Demo component calling a backend function
├── hooks/ # Shared state and API logic
├── styles/
│ └── global.css # CSS variables and component styles
└── index.cl.jac # Client router
jac start main.jacThen open your browser to the URL shown in the terminal.
- User Authentication — sign up and log in with username/password
- Protected Routes — dashboard requires a valid session via
AuthGuard - Backend Function Demo —
GreetCardcalls adef:privfunction on the server - Clean Dark Theme — black and golden orange design ready to customise
Open services/appService.jac and add a new def:priv function:
def:priv my_function(param: str) -> dict {
return {"result": "Hello, " + param};
}Use sv import in any .cl.jac file:
sv import from ..services.appService { my_function }
result = await my_function("world");- Create
pages/MyPage.cl.jacwithdef:pub page() -> JsxElement { ... } - Add a route in
index.cl.jac
services/*.jac— server-side logic;def:privfunctions require a valid JWTpages/*.cl.jac— full-page React components, one per routecomponents/*.cl.jac— reusable UI pieceshooks/*.cl.jac— shared state and API logic consumed by componentsstyles/global.css— design tokens (--primary,--background, etc.) and utility classesmain.jac— registers server symbols and mounts the client app