Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

kdcio/kdc-cms

Repository files navigation

KDC CMS

A simple headless CMS for AWS serverless infrastructure. API uses API Gateway, Lambda and DynamoDB while Admin interface uses S3.

Note: THIS PROJECT IS NOW DISCONTINUTED IN FAVOR OF Abu CMS!

Why

I needed a CMS to manage my web/app projects but I wanted it to be as cheap as possible (if not free) since most of them are websites that doesn't change too much. In addition to that, I also wanted to have full control over the source code so that I can use it as a starting point for my larger projects.

I looked at strapi but unfortunately it needs a server to work. And having a server means that it will cost money to run. A cost which is more than what I am willing to spend.

So my solution is to use serverless technology. Except for API Gateway, all of the other services the CMS will use have an "Always free" tier in AWS. API Gateway has a 1 million request per month free for 12 months. So this means as long as you do not exceed the free tier limits, the CMS will be free for 1 year then on the second year on wards you'll just be paying a few cents.

Installation

  • Clone this repository

  • Install aws-cli and create a profile.

    aws configure --profile kdc

    As a safety precaution, I usually set my default credentials as a fake account like so:

    [default]
    aws_access_key_id=fake
    aws_secret_access_key=fake
    
    [kdc]
    aws_access_key_id=xxxxxxx
    aws_secret_access_key=xxxxxxxx
    
  • Install serverless binary

    sudo npm i -g serverless
  • Install project dependencies.

    cd kdc-cms
    yarn install

Local Development

Deployment to AWS

KDC CMS can be deployed in different stages. Example is dev and prod. Each stage will have different resources. Don't worry it will not cost you anything as one of the advantages of serverless is pay as you use. There will be no idle servers that you need to pay for.

Make sure you replace $stage with dev, staging or prod to denote different stages of your app.

  • Create dynamodb table and create initial user.

    yarn setup $stage
  • Deploy API package:

    yarn deploy:api $stage
  • Deploy Admin package:

    yarn deploy:admin $stage
  • If you want to undo setup and deployment:

    yarn delete $stage

    Note that this cannot be undone. Please be careful!

Integration

Other

Limitations

  • Does not work on MS Windows. I am open to contributions.

Links and Other Open Source Projects Used

Star Me

If you find this project useful, please consider giving a star. I would really appreciate it.

You can also:

Buy Me A Coffee

License

MIT