Setup

Scaffold the CMS project and add the thunder-core plugin for auth and tenancy.

Clone & Initialize

Clone Thunder and initialize a fresh project:

git clone https://github.com/Huruf-Tech/thunder.git my-cms
cd my-cms
deno task init

deno task init is only for a freshly cloned project. Running it again reinitializes the git repository and can cause irreversible loss of history.

Configure the Database

Create a .env file pointing at your MongoDB instance:

echo "DATABASE_URL=mongodb://localhost:27017/my-cms" > .env

Add thunder-core

Multi-tenancy and authentication in this example come from the core plugin. Install it now:

deno task add:plugin -n Huruf-Tech/thunder-core

This gives us withTenant, which resolves the active tenant from the authenticated session. See Plugins for how plugins are wired into your project.

Run the Dev Server

deno task dev

Your server is now live at http://localhost:8000. Next, we'll define the post model.


On this page