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.
- Runtime: Node.js
- Framework: Fastify
- Authentication: JWT (stateless)
- Database: MySQL / PostgreSQL / Microsoft SQL Server
- Data Format: JSON
- API Style: RESTful
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.
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.
- 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
Clone the repository:
git clone https://github.com/eLDoherty/ArtaMiniCMS.git
cd ArtaMiniCMS
Install dependencies using npm:
npm install
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/
Start the development server:
npm run dev
The API will be available at:
http://localhost:3000/docs (Swagger UI)
Build the project (if applicable):
npm run build
Start the production server:
npm run start
- 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
- 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