Code Monkey home page Code Monkey logo

slog's Introduction

S'log

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

Quickstart

  1. 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.

  2. 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.

  3. Copy the 'prodProperties.ts.template' to 'prodProperties.ts' cp prodProperties.ts.template prodProperties.ts, and fill in any blank properties

    The 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 use
    • reactAppApiEndpoint The back end URL that you want to use
    • awsAccessKeyId
    • awsSecretAccessKey
    • awsSecretAccessKey AWS CLI Credentials (See AWS Documentation if this is not already set up)
  4. Initialize the Dev environment Run npm ci in order to download dependencies for the run.ts file.

  5. ./run.ts deploy If you are not running in the devcontainer, you may need to run the above via ts-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.

  6. Update your name servers to match the AWS domain - UNLESS the domain is AWS Managed (ie you set purchase on in config - still todo)

  7. Start Posting

Developing

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

Current Constraints

  • Backend and Frontend need to be on the same top level hosted domain
  • CORS isn't locked down properly

Fork Customisation

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.

Auth Provider Configuration

(todo) Help for some basic auth providers.

OIDC providers:

Oauth (not OIDC) providers

slog's People

Contributors

nkrul avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.