Coder Social home page Coder Social logo

dheerajkn / js-fullstack-generator Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 273 KB

Simple Full Stack generator purely based on JS, TS that handles Model and Controller on back-end and separate View Component using front-end frameworks powered by Webpack

HTML 1.68% JavaScript 84.02% CSS 0.23% Vue 1.97% TypeScript 9.25% Less 0.25% Sass 0.25% SCSS 0.27% Svelte 2.08%
express mvc-pattern vue reactjs css-preprocessors webpack nestjs boilerplate electron electron-builder svelte

js-fullstack-generator's Introduction

JS-FullStack-Generator

Simple Full Stack Project Generator based on ES6 syntax for both front-end and back-end that creates

Model and Controller Part handled by Backend written on JS with Express and TS using Nest

and

Seperate View Component using React, Vue and Svelte powered by Webpack and Eleventy powered by Browserify through --view flag

Along with creating MERN and MEVN etc.. stacks it has css precompilers through --style flag

Also JAM Stack support via Eleventy

Initial Setup

After cloning the project. Execute npm i && npm link

Usage Default

[directory-where-you-want-create-boilerplate] $ js-fullStack <project-name>

Usage customizable

[directory-where-you-want-create-boilerplate] $ js-fullStack <project-name> --style=scss --view=vue --server=nest

Arguements during creation

  • Style [Supported]: CSS [Default], SASS, SCSS, LESS
  • View [Supported]: React.js [Default], Vue.js, Svelte.js, @11ty/Eleventy (JAM Stack)
  • Server [Supported]: Express.js [Default], Nest.js

Functionalities that can be used after creation

  • --resource: This would create an entry in routes/index.js and create subsequent controller and service files.

[inside-folder-where-boilerplate-is-created] $ js-fullStack --resource=phone

  • --route: This would create an entry in router and create file along with mapping based on file type in client/src.

[inside-folder-where-boilerplate-is-created] $ js-fullStack --route=phone

  • --db: This would download mongoose and create initial setup files for connection with database along with sample user table with validation fields

[directory-where-you-want-create-boilerplate] $ js-fullStack --db

  • --auth: This would automatically create config files for authentication using JWT and uses created User table fields

[directory-where-you-want-create-boilerplate] $ js-fullStack --db --auth

NPM Commands

  • Development: npm start that runs view Component on webpack-dev-server for live reload and hot reload functionality in 3000 along with Electron App and Express at 8080
  • Production: npm run build that runs view Component on Express Server at 8080
  • Electron: Electron app will run along side react on dev mode but on Production it requires seperate command to execute npm run build:electron

Considerations

  • If you want to dispatch electron apps across MacOS, Windows, Linux go to package.json and update build:electron to webpack --env.ELECTRON_PROD=true --mode production && electron-builder -mwl and remember MacOS is possible with current executed OS is of Mac.
  • If you had to run npm run build:electron and npm run build it is advisable to follow this procedure:
    • Open terminal execute: npm run build:electron and after it is completed delete the terminal, open new one and execute this: npm run build as there is permission execute issue occuring after npm build:client
  • If facing with process cannot access the file just close the ide, open it and delete build and dist folders and run the prev. command again.

Require Community's help

  • Also electron-builder providing only platform-specific build rather than building apps across Operating Systems.
  • Also building webpack-test enviroment with some sample cases for React and Vue.

Further Development

  • Nest.js Server options for --auth (combined with mongo user)
  • Better Support for PWA for all frontend frameworks
  • Eleventy Electron Support and Add Route Functionality

js-fullstack-generator's People

Contributors

dependabot[bot] avatar dheerajkn avatar

Watchers

 avatar  avatar

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.