GithubHelp home page GithubHelp logo

slaterbbx / fullstack.nextjs Goto Github PK

View Code? Open in Web Editor NEW
49.0 2.0 14.0 2.53 MB

React Boiler Plate / Nextjs for full stack development workflow with organized project structure. ๐Ÿ’ฃ

License: MIT License

TypeScript 100.00%
nextjs boilerplate typescript redux react nodejs nodemon fullstack-development fullstack-boilerplate fullstackreact

fullstack.nextjs's Introduction

nextjs fullstackinator

โšก๏ธ Nextjs boilerplate for full stack development. โšก๏ธ

This project is an opinionated boilerplate for a fullstack workflow using a Nodejs server with express and NextJs for the React front end. The idea is to make it a solid boilerplate for large scale SSR projects that require a custom node backend.

๐Ÿ”Ž More about this project

I could not find a solid start point for the project that incorporated Typescript / NextJs and NodeJs with Express as the backend, I also wanted to have a simplified folder structure for oganization. This boilerplate takes care of handling that start point so that you only need to consider your options for database and the API you plan to use to query data from your database. Redux is incorporated for global state managment. Typescript is setup to work in both server and client files and now works with Next.js 9.0 +

๐Ÿ”“ Currently working with:

  • Nextjs
    • Custom folder structure for fullstack development organization
  • Redux
    • Redux-Sagas
    • Redux-Actions ( removes some pain points of redux state managment )
    • Redux Dev Tools / Chrome extension for dev build ( link at bottom )
  • Node Express server
    • Nodemon file watching ( live server restart for code changes )
  • Typescript ( Server and Client )
  • Styled-Components ๐Ÿ’…

๐Ÿ‘โ€๐Ÿ—จ How to use it:

Clone the repo:

git clone https://github.com/slaterbbx/fullstackinator.git

React + Nextjs:

https://nextjs.org/docs/
Everything functions the same as it would while normally using Next.js to develop a react app, This project is simply a boilerplate. The Nextjs pages folder is now in the ./client folder and the server files are in ./server folder. Nodemon will watch the ./server files and recompile the server ts files upon file changes during npm run dev while the dev live server is running. All server production files upon npm run build are output to the ./distServer folder, npm start will start a server running your production files from the ./distServer folder.

๐Ÿ’ป Commands:

Install:

Install node_modules
npm install

Run development server:

Run the dev server with hot module reload and nodemon server auto restart

NOTE: Make sure ts-node is also installed globally. (dev environment only) npm start

Build optimized server and client:

Build files are output to ./distServer folder
npm run build ( builds all files for production / Client and Server )

Run production server:

Runs the optimized build from the ./distServer folder
npm run production

๐Ÿ“š Resources:

Redux dev tools

https://github.com/zalmoxisus/redux-devtools-extension

Redux Actions

https://redux-actions.js.org/

๐Ÿ“ License:

MIT License | Fullstackinator ยฉ 2019 Kyle Gallagher

fullstack.nextjs's People

Contributors

slaterbbx 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

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.