CMS with the support of PostgREST #4006
Replies: 4 comments 11 replies
-
You might be interested in the PostgREST NixOS module that I recently added: NixOS/nixpkgs#394041 Maybe you can re-use that? |
Beta Was this translation helpful? Give feedback.
-
Sure, please put up a PR to add it. |
Beta Was this translation helpful? Give feedback.
-
@thiloho Very very interesting work. Where's the source for https://docs.archtika.com? I searched the markdown files on https://github.com/archtika/archtika, and didn't found them.
How are you planning to do it with pre-request? If the db is going to be hit for rate limit I don't think it would be effective. I'd suggest Nginx rate limiting instead. |
Beta Was this translation helpful? Give feedback.
-
You could consider using One thing that I stumbled upon while browsing through the repo: The hardcoded jwt-secret in flake.nix. I assume this is only for local development, but it's hard to tell. For the random user, it would look better if a jwt-secret only used for local development is created in plain-text with a text like "only_used_for_local_development...." or so. This just "looks better", gives more trust. |
Beta Was this translation helpful? Give feedback.
-
Not sure if this is the right place to post this, but out of interest in how far you can go with PostgreSQL, I have spent the last few months building a content management system using only PostgREST for the API.
It can be fully self-hosted using the provided NixOS module and detailed information about the project can be found by following the links at https://archtika.com.
Some of the features used include row level security for authorization, image uploads using a
BYTEA
column and then validating the mimetype usingSUBSTRING
as well as the file size usingOCTET_LENGTH
, a storage quota system for the maximum number of bytes that can be uploaded to a particular website, exporting markdown articles usingEXECUTE ... TO PROGRAM
andPG_READ_BINARY_FILE
and much more.What is fascinating about this is that it is a really robust backend with a lot of functionality that has been achieved by just writing a few SQL statements, rather than having to deal with a lot of boilerplate code in addition to the database layout.
One thing that is currently missing is the addition of rate limiting using
pre-request
.I thought this project could maybe be linked in https://docs.postgrest.org/en/v12/ecosystem.html#example-apps as a reference for other people, as some things might not be easy to figure out from the documentation alone.
Both my personal website (https://thilohohlt.com) and the documentation (https://docs.archtika.com) are now powered by archtika.
Beta Was this translation helpful? Give feedback.
All reactions