Coder Social home page Coder Social logo

frappe / frappejs Goto Github PK

View Code? Open in Web Editor NEW
263.0 34.0 109.0 1.79 MB

Node + Electron + Vue based metadata web framework (inspired by Frappe)

JavaScript 68.63% Vue 31.33% SCSS 0.05%
node vuejs electron webframework framework javascript metadata

frappejs's Introduction

Frappe.js

Frappe.js is a meta-data driven framework that enables rapid application development of Node.js and Electron based applications.

Features

  • Rapid Application Development
  • Single Page App
  • Forms and Controls
  • REST-API
  • Database backends

Documentation

Read the full docs

License

MIT

frappejs's People

Contributors

18alantom avatar accakks avatar achillesrasquinha avatar ankitsinghaniyaz avatar anto-christo avatar ckosiegbu avatar dependabot[bot] avatar franklin0702 avatar inishchith avatar netchampfaris avatar nextchamp-saqib avatar piyushsinghania avatar pratu16x7 avatar prssanna avatar revant avatar rmehta avatar sahil28297 avatar shridarpatil avatar subhamsarangi avatar surajshetty3416 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

frappejs's Issues

Session DocType

  • Render form object using User Session + Session DocType (JS + HTML)
  • Cookie Management.
  • Binary Permissions (No Permissions yet with Session ID).
  • Session Creation by Guests (else Logged in with Cookies).
  • Session using Public Private
  • Login Page is Seperate (HTML).

async >start< SyntaxError: Unexpected identifier, nodejs v6.12.3

Error starting todo app

 /home/dell/frappe-js/frappejs/server/index.js:14
    async start({backend, connection_params, static, models_path}) {
          ^^^^^
SyntaxError: Unexpected identifier
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/dell/frappe-js/frappe-todo/server.js:1:78)
[nodemon] app crashed - waiting for file changes before starting...

Feature request

Hi
1-Please implement rtl support in frappejs framework.
2-Can we use front-end vue frameworks like quasar or Vuetify in frappe js?

Please review translation.js code

Found # and is returning error

#translate(segment) {
// TODO: implement translation backend
return segment;
}

#stitch() {
if (typeof this.args[0] === 'string') {
return stringReplace(this.args[0], this.args.slice(1));
}

Review and update documentation

  • All Project pages on frappe.io
  • Generate Documentation from .md files
  • How to build an app based on frappejs
  • Core Concepts
  • Project structure
  • How things work

Version 0.1

  • User and Sessions
    • User model
    • Login
    • Session management (middleware)
    • Cookies in rest_client
  • Desk
    • Side Menu
    • Default List view
    • More controls

How to add onChange event for a field

Hi,
Not a bug but a doubt after searching long time...
How to have a onChange event for a field like Selection (a,b,c) when ever user selects different value and specially if on a Quickeditform or TwocolumnForm ?

Thanks in advance.

Multi-node sync [Experimental]

To make this app multi-user we will follow a multi-node strategy. Each node will be a fully self-sufficient (offline-first) unit. Data will be migrated to and from "super node" real time. This will work similar to the data migration tool in frappe-py

  • Allow any doctype to be synced
  • Designate a node as a super node
  • Establish connection to the super node (via WebRTC / WebSockets)
  • Inbound sync with each table with the super node (super node to maintain a write log - similar to a binlog)
  • Sync local documents with supernode
  • Add global id in documents so that we know if they have been synced or not

Non fatal error. Everything working but honcho start terminal shows this error

revant@revant-laptop:~/frappe-js/frappe-todo$ nf start
[WARN] No ENV file found
16:06:50 server.1   |  [nodemon] 1.14.11
16:06:50 server.1   |  [nodemon] to restart at any time, enter `rs`
16:06:50 server.1   |  [nodemon] watching: *.*
16:06:50 server.1   |  [nodemon] starting `node server.js`
16:06:52 watch.1    |  rollup v0.55.1
16:06:52 watch.1    |  bundles ./node_modules/frappejs/client/style/index.scss โ†’ dist/css/style.css...
16:06:52 watch.1    |  created dist/css/style.css in 677ms
16:06:52 watch.1    |  bundles ./src/index.js โ†’ dist/js/bundle.js...
16:06:53 server.1   |  [nodemon] restarting due to changes...
16:06:53 watch.1    |  created dist/js/bundle.js in 724ms
16:06:53 server.1   |  [nodemon] restarting due to changes...
16:06:53 server.1   |  [nodemon] starting `node server.js`
16:06:53 server.1   |  events.js:183
16:06:53 server.1   |        throw er; // Unhandled 'error' event
16:06:53 server.1   |        ^
16:06:53 server.1   |  Error: listen EADDRINUSE :::8000
16:06:53 server.1   |      at Object._errnoException (util.js:1022:11)
16:06:53 server.1   |      at _exceptionWithHostPort (util.js:1044:20)
16:06:53 server.1   |      at Server.setupListenHandle [as _listen2] (net.js:1351:14)
16:06:53 server.1   |      at listenInCluster (net.js:1392:12)
16:06:53 server.1   |      at Server.listen (net.js:1476:7)
16:06:53 server.1   |      at Function.listen (/home/revant/frappe-js/frappejs/node_modules/express/lib/application.js:618:24)
16:06:53 server.1   |      at Object.start (/home/revant/frappe-js/frappejs/server/index.js:32:29)
16:06:53 server.1   |      at <anonymous>
16:06:53 server.1   |  [nodemon] app crashed - waiting for file changes before starting...

Missing assignment

After this line , there should be a -
this.name = name

PS : I found this when i was creating a PopUp Modal for the Email View .

@rmehta @surajshetty3416 Please let me know if this should be fixed or there's some other way round ๐Ÿ˜„

Modal.vue title

The default title, "Modal Title" shows up even after explicitly passing title as a separate prop.

Unable to install frappejs

After running yarn add frappejs

I got this error:
make: *** [bcrypt_lib.target.mk:113: Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1
make: Leaving directory '/home/jc/Desktop/frappejs/node_modules/bcrypt/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/jc/Desktop/frappejs/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (node:events:369:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Linux 5.8.0-48-generic
gyp ERR! command "/usr/bin/node" "/home/jc/Desktop/frappejs/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/jc/Desktop/frappejs/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/home/jc/Desktop/frappejs/node_modules/bcrypt/lib/binding" "--napi_version=8" "--node_abi_napi=napi"
gyp ERR! cwd /home/jc/Desktop/frappejs/node_modules/bcrypt
gyp ERR! node -v v15.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /home/jc/Desktop/frappejs/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/jc/Desktop/frappejs/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/home/jc/Desktop/frappejs/node_modules/bcrypt/lib/binding --napi_version=8 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess. (/home/jc/Desktop/frappejs/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (node:events:369:20)
node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1067:16)
node-pre-gyp ERR! stack at Process.ChildProcess.handle.onexit (node:internal/child_process:301:5)
node-pre-gyp ERR! System Linux 5.8.0-48-generic
node-pre-gyp ERR! command "/usr/bin/node" "/home/jc/Desktop/frappejs/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/jc/Desktop/frappejs/node_modules/bcrypt
node-pre-gyp ERR! node -v v15.13.0
node-pre-gyp ERR! node-pre-gyp -v v0.9.1
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /home/jc/Desktop/frappejs/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/jc/Desktop/frappejs/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module

Document.js do not verify the value of this[table.fieldname] before use it in applyFormula method.

THIS HAS AFFECTED IN FRAPPE BOOKS

Problem:

When you submit or revert an invoice with some item with 0% tax, the invoice doesn't update the status.

Steps to reproduce:

1. Create a tax with 0%.
image

2. Create an Invoice, add an item and select this tax.
image

3. Save the Invoice and submit it, then you will get the following error in the console:
image
image
image

What I have done:

The error is occurs because in applyFormula method inside document.js, there's not a validation to prevent null values, look at the image below:
image

To fix this I added the next lines:
image

Greetings,

Cant get Started following the docs procedure...

Just made the project structure following the docs:
https://github.com/frappe/frappejs/blob/master/docs/app.md

Cant get started with it... throwing some error:

$ ./node_modules/.bin/frappe start 
path.js:28
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:28:11)
    at Object.resolve (path.js:1171:7)
    at resolveAppDir (/Users/parthjoshi/work/code/frappejs/node_modules/frappejs/webpack/utils.js:37:15)
    at getConfig (/Users/parthjoshi/work/code/frappejs/node_modules/frappejs/webpack/config.js:81:27)
    at Object.<anonymous> (/Users/parthjoshi/work/code/frappejs/node_modules/frappejs/webpack/serve.js:14:23)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
Parths-MacBook-Pro:frappejs parthjoshi$ ./node_modules/.bin/frappe start src/main.js 
path.js:28
    throw new TypeError('Path must be a string. Received ' + inspect(path));
    ^

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:28:11)
    at Object.resolve (path.js:1171:7)
    at resolveAppDir (/Users/parthjoshi/work/code/frappejs/node_modules/frappejs/webpack/utils.js:37:15)
    at getConfig (/Users/parthjoshi/work/code/frappejs/node_modules/frappejs/webpack/config.js:81:27)
    at Object.<anonymous> (/Users/parthjoshi/work/code/frappejs/node_modules/frappejs/webpack/serve.js:14:23)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)

Frappe CLI

Boilerplate

# should create a boilerplate app
frappejs create
App Name: 
Version (0.0.1):
Author:
License:

New Model

# create models
frappejs new-model Event
isSingle / isChild
Add fields

FrappeJS CLI Commands

This Issue is raised to add new frappe commands.

  • new-model
  • run-tests
  • start
  • update (update to latest changes).
  • migrate
  • new-controller ?

request to ease adoption: use sequelize models

Hi,

There's already a popular ORM for node, https://github.com/sequelize/sequelize
It has 22,700 stars, this repo has 175 stars.

We already use sequelize (and will stick to it, it works great) and would like to start using frappejs.
frappejs has a slightly different model/docType standard. To ease adoption, would you please consider

  1. using the same models as sequelize (stored in /models)
    Another advantage: models can be auto-generated with https://github.com/sequelize/sequelize-auto

  2. use sequelize as ORM. Instead of reinventing the wheel, focus on where frappejs can deliver more value.

These would help more potential users, adding to their stack (or partially replacing) instead of fully replacing it.

Thanks

feature suggestion: Use axios instead of fetch api

Axios is a really popular library for making HTTP requests in browser and node env. It has quite a few features which are superior to the fetch api, that is being used currently. We could have some of the niceties like

  • Custom Timeouts
  • Cancel request on demand
  • Better error handling
  • Typescript support

If you think this a valid suggestion, I'm willing to refactor http.js and other places necessary to make changes. Else feel free to close this ๐Ÿ‘

Select Backend

If user is not logged in, ask to select backend.

  • filename if sqllite, URL if server

Feature Request

Where can feature requests be sent to? I would like to start a running list as we incorporate the system into our business.

Delay/Fail to Post

Hello, I noticed on some screens there is no feedback when submitting data. For example, importing clients there is no loading wheel and page refresh is required to update.
Let me know if I can assist. I am not a programmer but can learn fast.

Installed Apps
ERPNext: v10.x.x-develop (02a40e9) (develop)

Frappe Framework: v10.x.x-develop (947f409) (develop)

Moratorium Warning: Relevant parts of `frappejs` inlined into `books`, โˆด hiatus

Over the years, much before I started working on Frappe Books, a lot of the code that frappejs was to handle was added to the books repository. This included:

  • Almost all of the UI code.
  • Electron related code.
  • Build configurations
    Due to this around ~60% of the frappejs repository was rendered redundant, at least in the context of Frappe Books. The main reason for Frappe JS was due to Frappe Books.

I used to push PRs to Frappe JS due to requirements arising in Frappe Books. But over time, maintaining another repo for books seemed to make less and less sense especially for 3k or so lines of code. This also caused the build to break often. And in general, keeping the two in sync was a pain.

So I decided to inline the books relevant part of frappejs code into books (PR). This means that I won't be pushing any code to frappejs from now on.

So until resolved uncertainties, no further development is going to take place on this project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.