Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/askonomm/shape
A composable content management system for bespoke websites.
https://github.com/askonomm/shape
cms
Last synced: 3 months ago
JSON representation
A composable content management system for bespoke websites.
- Host: GitHub
- URL: https://github.com/askonomm/shape
- Owner: askonomm
- License: mit
- Created: 2023-07-19T16:41:17.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-23T20:50:44.000Z (over 1 year ago)
- Last Synced: 2024-04-12T00:43:00.504Z (10 months ago)
- Topics: cms
- Language: Clojure
- Homepage:
- Size: 1.69 MB
- Stars: 25
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Shape CMS
Shape is a content management system, written in Clojure. It's target use case is bespoke websites created by developers or development agencies that value stability and ease of maintenance, while allowing the content of the site to be managed with ease by non-developers. **Currently in progress, docs will appear as things get created.**
## Installation
### Prerequisites
- Have Clojure CLI tool installed (namely `clj` CLI tool)
- Have Java installed### Running Shape
All you need is to execute this command in the folder where Shape's code is:
```bash
clj -X shape.core/run
```By running Shape the first time, it will automatically set-up the DB. Then fire up your browser and visit `localhost:3999/admin`, this should direct you to the setup page where you can create your account, after which it will redirect you to the admin panel (which is currently empty).
You can change the port that Shape is running on by setting the `PORT` environment variable.
### Database configuration
By default Shape will create a SQLite database on its own when first running it, named `shape.db`, and it will live in the root directory of the site. You can however overwrite this via the `DB_URL` environment variable, which has to be a valid JDBC URL format and point to a SQLite database.
### E-mail configuration
For things that require e-mail, such as the ability to reset your password, you also need to set up additional SMTP settings. There are a number of services that provide a SMTP service, such as [Mailgun]() and [Postmark]().
To set up e-mail services, you should configure the following environment variables:
- `MAIL_FROM` - E-mail address that the mails are sent from (example: [email protected])
- `MAIL_HOST` - SMTP host (example: smtp.postmarkapp.com)
- `MAIL_USER` - SMTP username
- `MAIL_PASSWORD` - SMTP password
- `MAIL_PORT` - SMTP port
- `MAIL_TLS` - Set this to `true` if you want to use TSL, otherwise remove it.
- `MAIL_SSL` - Set this to `true` if you want to use SSL, otherwise remove it.## The idea
Clojure is lacking a nice, composable CMS. Something that makes it easy for developers to build websites using Clojure, and non-developers to use those websites.
And so I'm building a CMS like that.
The idea is quite simple; at the heart of it all are **Content Shapes**, which can be your information pages, blog posts, shop products, whatever it is - you can create infinite amount of these by putting together different data types and naming them (eg text for title, image for thumbnail, number for currency, etc). This lays out the data architecture of the site and is what the end-users will be creating.
What the end-users will spend time with is **Content**, which are composed out of the **Content Shapes** you've created, allowing the user to easily manage content with different data structures from the admin panel.
Then there are **Partials**, these are pure-Clojure functions in your Theme that spit out HTML (via Hiccup, I figure). This can be anything you want, and it enables the use of a DSL to fetch data from the previously mentioned **Content Shapes**. Could be a Product View, could be a Blog Post View, whatever you want, these are the building blocks of the website.
And at last there are **Pages**. Pages are composed out of **Partials**, and they are attached to a URL. The URL could be static, like `/about`, or it could be dynamic like `/blog/{post}`. **Partials** will also have a way to tell what the `{post}` is in case of a dynamic URL, so that you could fetch the right data for your Partial.
And that's it, pretty straight-forward and this alone should enable the creation of quite many different websites, be it a blog, an online-shop or portfolio.
## Roadmap to 0.1
- [x] Site setup flow
- [x] Authentication flow
- [x] Content Shapes implementation
- [ ] Content creation in admin panel - **In progress**
- [ ] Pages implementation
- [ ] Default theme creation