Quick Start
1. Scaffold a new project
The fastest way to get started is the interactive init wizard:
crap-cms init ./my-project
The wizard walks you through:
- Admin port (default: 3000)
- gRPC port (default: 50051)
- Localization — enable and choose locales (e.g.,
en,de,fr) - Auth collection — creates a
userscollection with email/password login - First admin user — prompts for email and password right away
- Upload collection — creates a
mediacollection for file/image uploads - Additional collections — keep adding as many as you need
A JWT auth secret is auto-generated and written to crap.toml so tokens survive restarts.
When it finishes you’ll have a ready-to-run config directory:
my-project/
├── crap.toml
├── init.lua
├── .luarc.json
├── .gitignore
├── collections/
│ ├── users.lua
│ └── media.lua
├── globals/
├── hooks/
├── migrations/
├── templates/
├── static/
├── types/
│ └── crap.lua
├── data/
└── uploads/
2. Start the server
cd my-project
crap-cms serve
This starts:
- Admin UI at http://localhost:3000/admin
- gRPC API at
localhost:50051
3. Log in to the admin UI
Visit http://localhost:3000/admin/login and sign in with the credentials you created during init.
If you skipped user creation during init, bootstrap one now:
# Interactive (prompts for password)
crap-cms user create -e admin@example.com
# Non-interactive
crap-cms user create \
-e admin@example.com \
-p secret123 \
-f role=admin \
-f name="Admin User"
4. Create content via gRPC
Use grpcurl to interact with the API. The server supports reflection, so no proto import is needed:
# List all posts
grpcurl -plaintext localhost:50051 crap.ContentAPI/Find \
-d '{"collection": "posts"}'
# Create a post
grpcurl -plaintext localhost:50051 crap.ContentAPI/Create \
-d '{
"collection": "posts",
"data": {
"title": "Hello World",
"slug": "hello-world",
"status": "draft",
"content": "My first post."
}
}'
Alternative: Run with the example config
The repository includes an example/ config directory with sample collections, useful if you’re building from source:
git clone https://github.com/dkluhzeb/crap-cms.git
cd crap-cms
cargo build --release
./target/release/crap-cms serve -C ./example
Then bootstrap an admin user:
crap-cms user create -C ./example -e admin@example.com