Next.js, GraphQL, Apollo and MongoDB
Full stack application with Website, Dashboard and Backoffice.
Features:
- Connection to MongoDB
- Apollo and GraphQL queries, mutations, resolvers
- Authentication with Passport and Express Session
- Form validation with Formik
- Setup loaders in Webpack
- Setup dynamic and custom routes in Next.js
- Setup Semantic UI React as UI framework
- Setup ESLint, StyleLint, Prettier
- Setup Husky for pre-commit
- more coming soon ...
π§ Quick Start
-
Install and switch to the correct version of Node using NVM
nvm install
-
Install dependencies
yarn install
-
Start the development server
yarn dev
π§ What's inside?
A quick look at the top-level files and directories in this project.
βββ node_modules
βββ .gitignore
βββ .prettierrc
βββ LICENSE
βββ README.md
βββ yarn.lock
-
/node_modules
: The directory where all of the modules of code that your project depends on (npm packages) are automatically installed. -
.gitignore
: This file tells git which files it should not track / not maintain a version history for. -
.prettierrc
: This is a configuration file for a tool called Prettier, which is a tool to help keep the formatting of your code consistent. -
LICENSE
: Next.js is licensed under the MIT license. -
README.md
: A text file containing useful reference information about your project. -
yarn.lock
: Yarn is a package manager alternative to npm. You can use either yarn or npm, though all of the Gatsby docs reference npm. This file serves essentially the same purpose aspackage-lock.json
, just for a different package management system.
π Building and Running for Production
In addition to the development server started with yarn start
, you can also generate a full static production build and serve that to preview the site as it will appear once deployed:
yarn build
yarn start
or
yarn start:dev