Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
🎩 No-code platform for creating scalable backends for communities and user based apps
With Commun you can build complete backends for communities and user based apps without coding.
Commun helps you build scalable APIs in hours instead of months by giving you powerful tools to model your app in a graphic UI.
You need to install Node.js and MongoDB first, then just run:
npx create-commun-app my-app
cd my-app
npm start
npx create-commun-app --help
Usage: create-commun-app [options] <app-directory>
Options:
-V, --version output the version number
--dbname <dbname> MongoDB database name (defaults to <app-directory>)
--dbhost <dbname> MongoDB host (default: "localhost")
--dbport <dbname> MongoDB port (default: "27017")
-d, --debug output extra debugging
-p, --port <port> Port used by the server (default: 3000)
-h, --help output usage information
Commun comes with a complete dashboard that you can use to manage your application without having to write any code.
The dashboard also works perfectly on mobile devices, so you can manage your app on the go.
Entities represent the components of your application, for example: Posts, Comments, Votes.
Provided APIs:
[GET] /api/v1/:entity
?sort=attr:asc
query string to sort the items given an attribute.?filter=attr1:bar;attr2:foo
query string to filter the items given attributes and values[POST] /api/v1/:entity
[GET] /api/v1/:entity/:key
[PUT] /api/v1/:entity/:key
[DELETE] /api/v1/:entity/:key
You can specify entity or attribute level permissions. Commun supports GET, CREATE, UPDATE and DELETE permissions.
For every permission type you can specify the following values:
user
, which stores an user ID. Only the authenticated user with the same ID can perform the action.Entities have a list of attributes that represent the different values your component can store.
Attributes can have the following types:
You can also specify whether the values are required, unique or read only.
Entities can have a list of join attributes, which are attributes fetched from another entity.
An use case of Join Attributes is to return for every item if the logged user likes it or not.
Entity hooks allow you to increment or set values on an item when certain event happens.
Supported lifecycle events:
Hooks also allow to specify a condition that must be true in order to execute.
For example, a PostVote
entity which stores a vote of an user on a given post (1 or -1), hooks can be created to keep the number of up votes and down votes on the post.
Entities can specify a list of indexes that will be created on MongoDB.
Commun includes a fully featured user system with authentication and permission management.
Supported authentication strategies include: Email & Password, Google, Facebook and GitHub.
Provided APIs:
[POST] /api/v1/auth/password
[POST] /api/v1/auth/password/login
[POST] /api/v1/auth/token
[POST] /api/v1/auth/verify
[POST] /api/v1/auth/password/forgot
[POST] /api/v1/auth/password/reset
Users are entities, so you can also use all the entity APIs replacing :entity
with users
All the configuration used by Commun is stored in json files, which are updated by the dashboard.
The best practice is to run Commun in development, make all the required changes and then commit these changes to your repository. In order to deploy, just pull the changes in your production server and restart the node process.
The benefits of this practice are:
FAQs
🎩 Fully-featured framework for REST APIs and GraphQL from JSON Schema with TypeScript and MongoDB
The npm package commun receives a total of 5 weekly downloads. As such, commun popularity was classified as not popular.
We found that commun 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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.