Skip to content

eLDoherty/ArtaMiniCMS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArtaMiniCMS RESTful API

ArtaMiniCMS RESTful API is a backend service built with FastifyJS that provides a stateless RESTful API secured using JWT (JSON Web Token).

This API is designed to serve as the core backend for CMS-based applications, such as admin dashboards and frontend clients, by exposing authentication and content management endpoints.

Technology Stack

  • Runtime: Node.js
  • Framework: Fastify
  • Authentication: JWT (stateless)
  • Database: MySQL / PostgreSQL / Microsoft SQL Server
  • Data Format: JSON
  • API Style: RESTful

Authentication

This API uses JWT-based authentication.

  • Users authenticate via a login endpoint
  • The server returns a signed JWT
  • The client must include the token in every request using the Authorization header

Example:

Authorization: Bearer <jwt_token>

The server does not store session data, making the API fully stateless.

Database Support

This API is database-agnostic and can be configured to work with:

  • MySQL (Default)
  • PostgreSQL
  • Microsoft SQL Server

Database configuration is handled via environment variables, allowing easy switching between database engines without changing business logic.

Features

  • JWT-based authentication
  • Stateless RESTful API
  • Modular and scalable Fastify architecture
  • Supports multiple SQL databases
  • Clean separation between API and client applications
  • Suitable for CMS and admin dashboard backends

Usage

1. Pull the Repository

Clone the repository:

git clone https://github.com/eLDoherty/ArtaMiniCMS.git

cd ArtaMiniCMS

2. Install Dependencies

Install dependencies using npm:

npm install

3. Environment Configuration

Create a .env file and configure the following variables:

PORT=3000 JWT_KEY=your_secret_jwt_key DB_HOST=localhost DB_USERNAME=root DB_PASSWORD= DB_NAME=artaminicms BASE_URL_LOCAL=http://localhost:3000/

4. Run Development Server

Start the development server:

npm run dev

The API will be available at:

http://localhost:3000/docs (Swagger UI)

5. Run Production Server

Build the project (if applicable):

npm run build

Start the production server:

npm run start

API Design Principles

  • Uses proper HTTP methods (GET, POST, PUT, PATCH, DELETE)
  • Uses resource-based endpoints
  • Uses standard HTTP status codes
  • Stateless authentication using JWT
  • Designed for scalability and maintainability

Notes

  • This API does not provide any frontend interface
  • A client application (dashboard or frontend) is required to consume this API
  • Ensure database credentials and JWT secret are properly secured

About

RestFull API for ArtaMiniCMS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published