Slog... the Simple Web Log.
- Simple to get started
- Just follow the Quickstart to first post
- Only two external dependencies - AWS, and an OIDC provider
- Simple to host
- Default self hosting cloud infrastructure is essentially maintainence free
- Simple to keep
- As an open source project, you can use it, fork it and even change it
- All data is hosted on your own managed infrastructure
-
Clone the Repository. Feel free to fork it first, and make any changes you need. Otherwise,
git clone [email protected]:kncept/slog.git
will work. -
Open the project It is strongly suggested that you use the provided DevContainer, as that will give you a full development environment with all tools and utilities installed, requiring only Docker and VSCode installed on your system.
Otherwise, Use your IDE of choice, the devcontainer dockerfile forms the instructions for required environment setup.
The only dependencies should be npm, node, and ts-node. -
Copy the 'prodProperties.ts.template' to 'prodProperties.ts'
cp prodProperties.ts.template prodProperties.ts
, and fill in any blank propertiesThe minimum set required should be:
adminUsers
an array in a 'provider/email' format. eg:['google/[email protected]', 'GitHub:kncept']
publicUrl
The front end URL that you want to usereactAppApiEndpoint
The back end URL that you want to useawsAccessKeyId
awsSecretAccessKey
awsSecretAccessKey
AWS CLI Credentials (See AWS Documentation if this is not already set up)
-
Initialize the Dev environment Run
npm ci
in order to download dependencies for the run.ts file. -
./run.ts deploy
If you are not running in the devcontainer, you may need to run the above viats-node
. This will create a Cloudformation stack via the AWS CDK. Everything is in one stack (SLog
by default), but uses multiple nested stacks to deploy. -
Update your name servers to match the AWS domain - UNLESS the domain is AWS Managed (ie you set purchase on in config - still todo)
-
Start Posting
All orchestration is done by the run.ts command. This uses ts-node
In the dev container,
./run.ts build
will initialze npm for the subprojects, and do a production build for the frontend
./run.ts start
will start up the the stack in dev mode
./run.ts deploy
will build and deploy the stack
./run.ts test
will run all unit tests
- Backend and Frontend need to be on the same top level hosted domain
- CORS isn't locked down properly
cp devProperties.ts.template devProperties.ts
==> Support for checked in dev properties
If you want to commit secrets, I would suggest using the https://github.com/commenthol/ansible-vault
library to encrypt them.
(todo) Help for some basic auth providers.
- Kncept
- Fork the repo, deploy, and use the URLs
- Not a real solution yet
- https://github.com/kncept-oauth/simple-oidc
-
Github
- https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app
- Only Oauth.. c'mon Microsoft, you can do better
-
Facebook
- Not an OIDC provider. sigh.
- https://developers.facebook.com/apps