Skip to content

Latest commit

 

History

History

cms

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Cms

REST API and admin portal that comprise the backend. It is powered by Node, Strapi, and PostgreSQL. The file structure is defined by Strapi and is documented here.


Setup

RECOMMENDED: To run Cms with the rest of the application, see the project development setup.

Development

  1. Install docker
  2. Start a new docker container running postgres yarn run make-db
  3. Install dependencies yarn install
  4. Start the development server yarn develop

Additional scripts:

  • Start an existing db container yarn db-start
  • Connect to the postgres bash yarn db-bash

API /

Built with Node, Koa, and Bookshelf, the REST API enables CRUD functionality with the application's content. Authentication is enabled via JWTs. The dbms is PostgreSQL.

Entity Relationships

The content available via the API is modeled as follows.

ER Digram

Endpoints

Each endpoint corresponds to an entity from the ER digram, a content type in the admin panel, a folder in the ./api directory, and a database table.

Endpoint Note
activities
blocks
blocks-categories
complexities
difficulties
learning-categories
models
topics
types

Each and every endpoint can be interacted with by using the following method and path combinations.

Method Path Description
GET /{endpoint} Get a list of entries
GET /{endpoint}/:id Get a specific entry
GET /{endpoint}/count Count entries
POST /{endpoint} Create a new entry
DELETE /{endpoint}/:id Delete an entry
PUT /{endpoint}/:id Update an entry

Read the full documentation on the api endpoints.


Admin Panel /admin

Built with React and served by Node, the admin panel allows for full customization of the server. Here you can create new content types and their corresponding endpoints, configure roles and permissions, and much more. The interface itself can be customized and configured as needed.

Read the full documentation on the admin panel.