Giter Club home page Giter Club logo

fullstack-pro's Introduction

Full Stack Packages

Fullstack packages to develop and test end to end; to use as packages or work independently.

Purpose:

The idea is to create modules for each package so it can work independently as well as integrated to another project as packages.

Screenshot

screencast

Useful commands:

command Description
lerna clean - removes the node_modules directory from all packages.
npm start - starts the web server and backend server. Or Use npm run zen:watch
npm run zen:watch - starts the web server and backend server in watch mode.
npm run zen:watch:debug - starts the web server and backend server in debug and watch mode.
npm run watch - build the packages in watchmode (Useful for development)
npm run lerna - install external dependencies at the repo root so they're
npm run build - build all the packages
npm install - runs lerna and build
lerna publish - publishes packages in the current Lerna project.

Files explained:

It uses lerna.json for creating the packages structure. Under packages you can create different modules based on its usage. For example:

 packages                    - Has the packages to organize the codebase into multi-package repositories.
     sample-core             - Core interfaces of the packages which can be shared between server and client.
     sample-server-core      - Core interfaces and its implementation code for Server.   
     sample-client-state     - Client State related code which consists of Redux and Graphql Gql
     sample-client-react     - React pure components and containers are defined. 
     sample-graphql-schema   - Graphql Schema for Server.
 servers                     - Has the packages to organize the codebase into multi-package repositories.
     frontend-server         - Frontend Client Server. This is useful to show demo of this package.
     backend-server          - Backend apollo server. 

Getting Started

If you want to develop FullStack locally you must follow the following instructions:

  1. Clone fullstack-pro locally
git clone https://github.com/cdmbase/fullstack-pro
cd fullstack-pro
  1. Install dependencies and build packages.
npm install && npm run build
  1. Setup environment file
cp ./config/development/dev.env.sample ./config/development/dev.env
  1. Seed development database data (not needed if it is not setup)
npm run db:seed
  1. Start both client and server together
npm start

The graphql server endpoints are

http://localhost:8080/graphql

The browser server endopoint is

http://localhost:3000

To run build with watch. Useful for auto reloading changes into the server to be productive during development.

npm run watch

Server Side Rendering

Useful to run Frontend and Backend in two seperate servers.

to start frontend server

cd frontend-server
npm run build
npm start

to start backend server

cd backend-server
npm run db:seed
npm run build
npm start

Docker build

Prior to it you need to run npm install from root directory.

Build three docker images by following the steps:

  • Frontend Server
cd frontend-server
npm run docker:build
  • Backend Server
cd backend-server
npm run docker:build
  • hemera-server
cd hemera-server
npm run docker:build

Environment settings for non-development

GRAPHQL_URL
CLIENT_URL
NATS_URL
NATS_USER
NATS_PW

Troubleshoot

To troubleshoot webpack configuration run

npm run zen:watch:debug

Resources

Installing node-gyp

https://github.com/nodejs/node-gyp#installation

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.