Skip to content

GuilhermeVendramini/deno-cms

Repository files navigation

OAK Deno CMS and Rest API

Requirements

  • Deno
    • Tested with deno 1.2.2, v8 8.5.216 and typescript 3.9.2.
  • Mongodb

Optional

  • Denon

Install

denon install

or

deno run --allow-env --allow-write --allow-read --allow-net --allow-plugin --allow-run --unstable --importmap=package.json install.ts

Run

denon start

or

deno run --allow-env --allow-write --allow-read --allow-net --allow-plugin --allow-run --unstable --importmap=package.json main.ts

Default user login:

email: [email protected]

password: 12345678

Features

CMS

  • User
    • User (CRUD)
    • Roles permissions
    • Register
    • Login
    • Recovery password
  • Content type
    • Basic Page (CRUD)
    • Article (CRUD)
    • Landing Page (CRUD)
  • Taxonomy type
    • Tags (CRUD)
    • Categories (CRUD)
  • Block type
    • Basic block (CRUD)
    • Carousel (CRUD)
  • Media type
    • Image (CRUD)
    • Cropped Image (CRUD)
    • Video (CRUD)
  • Menu type
    • Main menu (CRUD items)
    • Footer (CRUD items)

API

  • User
    • POST User register
    • POST User Login
    • GET One user
    • GET All users
  • Entities
    • GET One
    • GET All

Rest API examples

Users

Register

curl -d '{"name":"Name", "password": 12345678, "email":"[email protected]"}' -H "Content-Type: application/json" -X POST http://localhost:8000/api/register

Login

curl -d '{"password": 12345678, "email":"[email protected]"}' -H "Content-Type: application/json" -X POST http://localhost:8000/api/login

Get all user

curl -H "Authorization: Bearer <LOGGED-USER-TOKEN>" http://localhost:8000/api/users

Get one user

curl -H "Authorization: Bearer <LOGGED-USER-TOKEN>" http://localhost:8000/api/users/<USER-ID>

Entities

Bundle and types list:

Bundle Types
content basic_page | article | landing_page
media image | video | cropped_image
taxonomy tags | categories
block basic_block | carousel
menu_item main_menu | footer

Get all

curl -H "Authorization: Bearer <LOGGED-USER-TOKEN>" http://localhost:8000/api/<BUNDLE>/<TYPE>

Get one

curl -H "Authorization: Bearer <LOGGED-USER-TOKEN>" http://localhost:8000/api/<BUNDLE>/<TYPE>/<CONTENT-ID>

SMTP

Configuration

Create the file "config.ts" inside core/modules/smtp with the following configuration structure:

const config = {
  hostname: "smtp.123.com",
  port: 25,
  username: "username",
  password: "password",
};

export default config;

TODO

  • Tests

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published