
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
@becomes/cms
Advanced tools
npm i -g @becomes/cms-clibcms-cli command and enter database information when prompted.bcms-cli --atlas command and enter database information.npm run devlocalhost:1280 and create Admin user.This is a small CMS developed by company Becomes that is specialized for building APIs. It was created because of project needs in our company and we decided to make it Open-Source since it solved a lot of problems that we had with other CMS solutions. We hope that you will find it useful in your next project.
In this document, few "special" words will be used and they have specific meaning.
By showing some examples this terminology might be easier to understand.
Example 1 - Using CMS to create a Blog website.
The core function of a blog website is a Blog Post. Every blog post on a website follows the same structure: title, cover image, author and content. Only thing that is different between 2 blog posts is the content. Therefore, in this example, Template is defining blog post structure (title property is of type string, cover image is of type string, author is of type Group and so one) while Entry is a single Blog Post and this means that it is holding values for properties defined in Template (title is "My first blog", cover image is "/image.png", author is "{name: "Tom", position: "CEO"}" and so one).
Example 2 - Using CMS to create a simple web store.
The core function of a web store is an Item. To make it as simple as possible this online store is selling 2 Item types: Books and Makers. Books will be defined by creating a Template with properties: name <string>, title <string> and author <string> while Markers will be defined by creating a new Template with properties: name <string>, price <number> and quantity <number>. With this done Book Entry and Marker Entry can be added since structure is defined by Books Template and Markers Template respectively.
Becomes CMS can be split into 2 parts, Back-end part that is built using Purple Cheetah framework and Front-end part that is built using Svelte.
It is a special model used to describe a CMS user which is a person. If it is required for service or robot to be able to access CMS content, it is highly recommended to use API Key for that since its access level can be restricted. Every User must have unique email and strong password. Email does not have to be valid but it has to be unique.
Back-end uses 2 types of security:
JWTs are used for dashboard and for other services that want to take full control over Core CMS API. If full access to Core API is not required for consumer, it is recommended to use Key Security.
To obtain JWT Access Token and Refresh Token for a User (created using dashboard), Basic Authorization flow is used with User email and password for endpoint /auth/user. If authorization is successful, API will respond with token
Response {
accessToken: string,
refreshToken: string,
}
API Key is created using dashboard, while HTTP Signature is used for authentication when calling Core API. Function below can be used to create HTTP Signature for a request using API Key.
const crypto = require('crypto');
exports.sign = (payload) => {
const data = {
key: process.env.API_KEY,
timestamp: Date.now(),
nonce: crypto.randomBytes(3).toString("hex"),
signature: ""
};
let payloadAsString = "";
if (typeof payload === "object") {
payloadAsString = Buffer.from(JSON.stringify(payload)).toString(
"base64"
);
} else {
payloadAsString = "" + payload;
}
data.signature = crypto
.createHmac("sha256", process.env.API_SECRET)
.update(data.nonce + data.timestamp + data.key + payloadAsString)
.digest('hex');
return data;
};
Generated parameters are parsed in a query with same name.
FAQs
Simple CMS for building APIs.
We found that @becomes/cms demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.