lane711 / sonicjs Goto Github PK
View Code? Open in Web Editor NEWSonicJs Headless CMS - Blazing Fast Headless CMS built on Cloudflare Workers. 100% Javascript Based
Home Page: https://sonicjs.com
SonicJs Headless CMS - Blazing Fast Headless CMS built on Cloudflare Workers. 100% Javascript Based
Home Page: https://sonicjs.com
this is likely a race condition in the login process that needs to be address
use http://localhost:3018/session-details for troubleshooting
Add support for multiple languages
Hi Guys, glad to know about this project.
I want to ask that is it support RESTful API or Graphql only?
Add ability to delete unused page section
Can't get it to work.
I've installed it using the process you have on your site for local setup.
It gave me this error
Error: Cannot create data source "storage":
and made me install
npm install loopback-component-storage --save
To fix it.
After that the server starts but it's always restarting with nodemon saying that there was changes when I didn't do anything.
Hi @lane711 please advise me on the service that is used to auto create the view file for the models. I would like to automatically create the .hbs boilerplate.
Please advise
Keystonejs has 5 years of project. How about focusing your effort on making an admin panel on top of it, instead of starting from scratch?
Currently you can add existing modules to a page using shortcodes, however we need to add UI support for this
Is sqlite supported?
Lot of deprecated modules
exemple :
npm WARN deprecated [email protected]: Object.assign was not transformed during the build of sortablejs, so it won't work in browsers where this does not exist (for example IE11). Please downgrade your version to 1.10.2 to keep supporting <=IE11 or upgrade to >2.0 where IE will no longer be supported.
npm WARN deprecated [email protected]: Tooltip.js is not supported anymore, please migrate to tippy.js
npm WARN deprecated [email protected]: request has been deprecated, see request/request#3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: No longer maintained,
i test to update all and use node 14
There are many linting problems (unused variable, etc.) that I encounter on the codebase. I think adding ESLint (and or Prettier) for linter and formatting code would helpful. It also catches a silly issue like these #111.
I'm thinking of this strategy.
Just let me know if this would be helpful for the project, I'll be working on it.
@lane711
i have a challenge, when i add a module with a form at the backend , it only shows content rendered by <div>Hello to you {{ data.firstName }} from the formTest module!</div>
instead of loading the form itself, but when i look at your contact form it loads dynamically, was this hard coded, or it was a result of drag and drop from the form builder?
Just tried to build and start project on a fresh install of Debian 11 and tried under Windows 11 but setup fails. Please list the actual requirements to get things up and going such as node.js version, python, yarn, database or whatever else is unique to your build environment because it's not as simple as you claimed to be in documentation or readme.
In left navigation side Add Page button doesn't work.
After uploading an image or more I can't touch them becuase of the layout see here:
https://prnt.sc/uwtkg2 fix it by write height: auto instead of 100px
Please help - I need to setup this or other CMS ASAP, and this is my first choice.
I am following "https://sonicjs.com/docs#local-setup" , but it does not instruct to have MongoDB installed locally as a pre-req, so I assume setup is already doing this. Even if I install manually, how do setup connects to this mongo instance ? Need some clarification ASAP.
Thanks!
Below is error log:
202105281306-msimpg-sonicjs> cd sonicjs/
202105281306-msimpg-sonicjs> npm install
added 546 packages, and audited 547 packages in 7s
8 vulnerabilities (4 moderate, 3 high, 1 critical)
To address all issues, run:
npm audit fix
Run npm audit
for details.
202105281306-msimpg-sonicjs> npm start
[email protected] start
node server.js
Website at: http://localhost:3018
Admin console at: http://localhost:3018/admin
GraphQL API at: http://localhost:3018/graphql
.env-default was copied to .env
/home/user1/scripts/code-repos/gitHub/sonicjs/sonicjs/node_modules/mongoose/lib/connection.js:832
const serverSelectionError = new ServerSelectionError();
^
MongooseServerSelectionError: connect ECONNREFUSED 127.0.0.1:27017
at NativeConnection.Connection.openUri (/home/user1/scripts/code-repos/gitHub/sonicjs/sonicjs/node_modules/mongoose/lib/connection.js:832:32)
at /home/user1/scripts/code-repos/gitHub/sonicjs/sonicjs/node_modules/mongoose/lib/index.js:345:10
at /home/user1/scripts/code-repos/gitHub/sonicjs/sonicjs/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:5
at new Promise ()
at promiseOrCallback (/home/user1/scripts/code-repos/gitHub/sonicjs/sonicjs/node_modules/mongoose/lib/helpers/promiseOrCallback.js:30:10)
at Mongoose._promiseOrCallback (/home/user1/scripts/code-repos/gitHub/sonicjs/sonicjs/node_modules/mongoose/lib/index.js:1135:10)
at Mongoose.connect (/home/user1/scripts/code-repos/gitHub/sonicjs/sonicjs/node_modules/mongoose/lib/index.js:344:20)
at Object. (/home/user1/scripts/code-repos/gitHub/sonicjs/sonicjs/server.js:34:10)
at Module._compile (node:internal/modules/cjs/loader:1109:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
at Module.load (node:internal/modules/cjs/loader:989:32)
at Function.Module._load (node:internal/modules/cjs/loader:829:14)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
at node:internal/main/run_main_module:17:47 {
reason: TopologyDescription {
type: 'Unknown',
setName: null,
maxSetVersion: null,
maxElectionId: null,
servers: Map(1) {
'localhost:27017' => ServerDescription {
address: 'localhost:27017',
error: Error: connect ECONNREFUSED 127.0.0.1:27017
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1133:16) {
name: 'MongoNetworkError'
},
roundTripTime: -1,
lastUpdateTime: 102660531,
lastWriteDate: null,
opTime: null,
type: 'Unknown',
topologyVersion: undefined,
minWireVersion: 0,
maxWireVersion: 0,
hosts: [],
passives: [],
arbiters: [],
tags: []
}
},
stale: false,
compatible: true,
compatibilityError: null,
logicalSessionTimeoutMinutes: null,
heartbeatFrequencyMS: 10000,
localThresholdMS: 15,
commonWireVersion: null
}
}
When clicking the "Next Post" button it stays in the current blog page itself.
Currently some of the styles from the main site css bleed over into the sidebar. Need to isolate them to provide a consistent UX regardless of theme being used
After running through the steps, when I run npm run start
all looks well.
localhost:3018/undefined
localhost:3018
it does seem like I am logged in as an admin.EMIT ERROR: TypeError: Cannot read property 'data' of undefined
at Object.functionToExecute (sonicjs\server\modules\page-templates\services\page-templates-main-service.js:96:41)
Do you have an option to use a specific data storage system instead of it recognising that I have mongo running and just connecting to that? I wanted to try and work around the issue above by using flat file instead but it will just always use mongo if its running.
Love the project!
When I try to setup this project for the first time I run into changes being reported and restarting of the server infinitely.
I saw you're rewriting the setup of the project, but I thought I'd report this anyway. Hope it helps!
To Reproduce
Steps to reproduce the behavior:
Using node version 14.15.4 or 12.8.0 (as I just seen the max allowed node version)
Expected behavior
Project works in the browser, I think the reason it's failing is that it's always restarting.
Screenshots
The output of continuous reloading of the css file:
Desktop (please complete the following information):
Describe the bug
When clean-installing sonicjs from the repo npm warns of a critical security flaw with the growl version. Unfortunately it cannot be fixed automatically.
Dependency of: loopback-component-storage
Path: loopback-component-storage > pkgcloud > liboneandone > mocha > growl
After the conversion to GraphQL some of the integration test still need to be updated.
(node:2107) DeprecationWarning: Mongoose: findOneAndUpdate()
and findOneAndDelete()
without the useFindAndModify
option set to false are deprecated. See: https://mongoosejs.com/docs/deprecations.html#findandmodify
Need to determine the source of this and fix. The may be coming from one of the project dependencies
While editing a page that uses a page template, some of the base pages layout can be editing, this needs to be restricted.
This happens when trying to register, after a fresh install.
Node version 15.3.0
This is a blocker to evaluating the product.
Website and API work fine, launching Admin I am getting the below errors...
[nodemon] starting `node server/server.js` Website at: http://localhost:3018 Admin console at: http://localhost:3018/admin REST API at: http://localhost:3018/explorer express deprecated res.send(status): Use res.sendStatus(status) instead server/boot/routes.js:153:13 _http_outgoing.js:470 throw new ERR_HTTP_HEADERS_SENT('set'); ^ Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client at ServerResponse.setHeader (_http_outgoing.js:470:11) at ServerResponse.header (/home/fredrick/Development/cms/sonicjs/node_modules/express/lib/response.js:767:10) at ServerResponse.send (/home/fredrick/Development/cms/sonicjs/node_modules/express/lib/response.js:170:12) at done (/home/fredrick/Development/cms/sonicjs/node_modules/express/lib/response.js:1004:10) at Immediate.<anonymous> (/home/fredrick/Development/cms/sonicjs/node_modules/express-handlebars/lib/utils.js:26:13) at runCallback (timers.js:705:18) at tryOnImmediate (timers.js:676:5) at processImmediate (timers.js:658:5) [nodemon] app crashed - waiting for file changes before starting...
Hello @lane711
I was testing the CMS on localhost and after a while when I am working and want to refresh the page it log me out and when I hit to http://localhost:3018/admin/
I can see that I am still loged in but in the other part of the website ex. http://localhost:3018/admin/content-types/edit/hello-world
I am loged out and it redirect me back to http://localhost:3018/
When I go to http://localhost:3018/register
it give me 404 page.
Currently the base page modules can be deleted/moved from a child page
TypeORM doesn't provide full support OOTB so some additional effort will be required to getting SonicJs fully functioning with Mongo.
In the meantime, SQLite and Postgres have been fully tested and are running multiple production websites.
In prod mode, we need better support for minified asset regeneration when the css is changes from the page builder ui.
loaded up the contents section in the admin area and clicked on the edit button of the "section 1" content item and got this:
(node:30411) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'components' of null
at Object.exports.getFormComponents (/Users/vahidreza/Downloads/sonicjs/server/services/form.service.js:247:41)
at Object.exports.getFormJson (/Users/vahidreza/Downloads/sonicjs/server/services/form.service.js:200:35)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:30411) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:30411) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I could not find any documentation about how to change the DB type, or change to Flat File
Update npm packages. Will likely need to update the CoreUI admin theme as well
Describe the bug
First. Thank-you for creating this. My buddy and I are trying to re-invent our site while learning node and Sonicjs gives us just the base we need. Anyway, onto the bug: On a fresh install simply going to the site-settings-colors link times out.
To Reproduce
Steps to reproduce the behavior:
UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'editForm' of undefined
at /opt/sonicjs/server/boot/routes.js:598:23
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Line number 598 correlates to the site-settings-colors route.
Expected behavior
I would expect the site-settings-colors page to load.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
There was another error saying chart.js files could not be found and that is because they capitalized the 'C' in the name of the files. I symlinked them to a lowercase 'c' name and resolved that.
Nodemon continiously restarting due to changes
"name": "sonicjs-cms",
"version": "0.2.0"
Website at: http://localhost:3018
Admin console at: http://localhost:3018/admin
REST API at: http://localhost:3018/explorer
[nodemon] restarting due to changes...
[nodemon] starting node server/server.js
regen template css
To Reproduce
Steps to reproduce the behavior:
Desktop:
Trying to get this project to load without error.
On startup this error occur.
EMIT ERROR: Error: ENOENT: no such file or directory, open 'C:\Users\Lenovo\Projects\sonicjs\C:\Users\Lenovo\Projects\sonicjs\server\modules\alert\module.json' at Object.openSync (fs.js:476:3) at Object.readFileSync (fs.js:377:35) at Object.getFileSync (C:\Users\Lenovo\Projects\sonicjs\server\services\file.service.js:42:22) at C:\Users\Lenovo\Projects\sonicjs\server\services\module.service.js:127:29 at Array.forEach (<anonymous>) at Object.getModuleDefinitionFiles (C:\Users\Lenovo\Projects\sonicjs\server\services\module.service.js:126:11) at Object.processModules (C:\Users\Lenovo\Projects\sonicjs\server\services\module.service.js:32:16) at Object.functionToExecute (C:\Users\Lenovo\Projects\sonicjs\server\services\module.service.js:17:27) at Object.exports.emit (C:\Users\Lenovo\Projects\sonicjs\server\services\emitter.service.js:31:26) at C:\Users\Lenovo\Projects\sonicjs\server\boot\routes.js:68:26 at processTicksAndRejections (internal/process/task_queues.js:93:5) { errno: -4058, syscall: 'open', code: 'ENOENT', path: 'C:\\Users\\Lenovo\\Projects\\sonicjs\\C:\\Users\\Lenovo\\Projects\\sonicjs\\server\\modules\\alert\\module.json' }
File is located in:
C:\Users\Lenovo\Projects\sonicjs\server\modules\alert\module.json
Not:
C:\Users\Lenovo\Projects\sonicjs\C:\Users\Lenovo\Projects\sonicjs\server\modules\alert\module.json
Maybe this issue is also the root cause for all the other errors recorded when many of the links within the admin section fails to load.
(node:12072) UnhandledPromiseRejectionWarning: TypeError: Cannot set property 'breadCrumbs' of undefined at C:\Users\Lenovo\Projects\sonicjs\server\services\admin.service.js:203:26 at processTicksAndRejections (internal/process/task_queues.js:93:5) (Use
node --trace-warnings ...to show where the warning was created) (node:12072) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:12072) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:12072) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'systemId' of null at Object.exports.getFormJson (C:\Users\Lenovo\Projects\sonicjs\server\services\form.service.js:135:33) at Object.exports.getForm (C:\Users\Lenovo\Projects\sonicjs\server\services\form.service.js:88:38) at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async C:\Users\Lenovo\Projects\sonicjs\server\services\admin.service.js:75:27 (node:12072) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 5) (node:12072) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'systemId' of null at Object.exports.getFormJson (C:\Users\Lenovo\Projects\sonicjs\server\services\form.service.js:135:33) at Object.exports.getForm (C:\Users\Lenovo\Projects\sonicjs\server\services\form.service.js:88:38) at runMicrotasks (<anonymous>) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async C:\Users\Lenovo\Projects\sonicjs\server\services\admin.service.js:158:31 (node:12072) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag
--unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 12)
I try both database and it does not work.
In order to connect to these databases I add to the 'server.js' file the following:
if (process.env.TYPEORM_CONNECTION === "mysql") {
connectionSettings.username = process.env.TYPEORM_USERNAME;
connectionSettings.password = process.env.TYPEORM_PASSWORD;
connectionSettings.port = process.env.TYPEORM_PORT;
connectionSettings.database = process.env.TYPEORM_DATABASE;
}
if (process.env.TYPEORM_CONNECTION === "mongodb") {
connectionSettings.port = process.env.TYPEORM_PORT;
connectionSettings.database = process.env.TYPEORM_DATABASE;
}
Than I could connect to the databases and some data was added BUT for each of them I got an error about creating data...
For example - mongoDb case - try to register - http://localhost:3018/register
and got:
TypeORMError: Query Builder is not supported by MongoDB.
at new TypeORMError (E:\projects\sonicjs\node_modules\typeorm\error\TypeORMError.js:9:28)
at MongoRepository.createQueryBuilder (E:\projects\sonicjs\node_modules\typeorm\repository\MongoRepository.js:30:15)
at TypeormStore.createQueryBuilder (E:\projects\sonicjs\node_modules\connect-typeorm\out\app\TypeormStore\TypeormStore.js:180:32)
at TypeormStore.get (E:\projects\sonicjs\node_modules\connect-typeorm\out\app\TypeormStore\TypeormStore.js:30:18)
at session (E:\projects\sonicjs\node_modules\express-session\index.js:485:11)
at Layer.handle [as handle_request] (E:\projects\sonicjs\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (E:\projects\sonicjs\node_modules\express\lib\router\index.js:317:13)
at E:\projects\sonicjs\node_modules\express\lib\router\index.js:284:7
at Function.process_params (E:\projects\sonicjs\node_modules\express\lib\router\index.js:335:12)
at next (E:\projects\sonicjs\node_modules\express\lib\router\index.js:275:10)
at jsonParser (E:\projects\sonicjs\node_modules\body-parser\lib\types\json.js:110:7)
at Layer.handle [as handle_request] (E:\projects\sonicjs\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (E:\projects\sonicjs\node_modules\express\lib\router\index.js:317:13)
at E:\projects\sonicjs\node_modules\express\lib\router\index.js:284:7
at Function.process_params (E:\projects\sonicjs\node_modules\express\lib\router\index.js:335:12)
at next (E:\projects\sonicjs\node_modules\express\lib\router\index.js:275:10)
Currently the field types page shows a list of the fields. Add a preview of each one
Hi tried to build this on cpanel hosted website of mine. Finally made it but now it connects to sonicjs home only by going non- "https://" and also with port numbers included. Can I get any help on this subject thanks :)
also other than that checked out the panel and usage it seems pretty impressing.
Hi!
CoreUI Template version 3 is available, you could consider upgrading it for the fresher design :)
Currently the settings input is a simple text box. Change to an autocomplete list of all available Google fonts
I installed the latest version 0.4.6 today on two different system. One is Debian Buster (fresh) and one is Win10. But both system had the same issue after "npm start"
[email protected] start C:\Users\Name\Downloads\SONIC\sonicjs
node server.js
C:\Users\Name\Downloads\SONIC\sonicjs\server\services\dal.service.js:211
content = (await contentRepo.findOne({ where: { id: id } })) ?? {};
^
SyntaxError: Unexpected token '?'
at wrapSafe (internal/modules/cjs/loader.js:931:16)
at Module._compile (internal/modules/cjs/loader.js:979:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
at Module.load (internal/modules/cjs/loader.js:879:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Module.require (internal/modules/cjs/loader.js:903:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (C:\Users\Name\Downloads\SONIC\sonicjs\server\schema\schema.js:12:20)
at Module._compile (internal/modules/cjs/loader.js:1015:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Name\AppData\Roaming\npm-cache_logs\2021-07-21T16_03_27_565Z-debug.log
Add a UI for listing the site logs with filtering + sorting
Expand the page builder background section editing options:
It should not take a page refresh to hide the page builder after logout
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.