• Stars
    star
    175
  • Rank 218,059 (Top 5 %)
  • Language
    JavaScript
  • Created about 7 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Next.js (React) + Redux + Express REST API + MongoDB + Mongoose-Crudify boilerplate

Next.js (React) + Redux + Express REST API + MongoDB + Mongoose-Crudify boilerplate

Note: this is my v1 boilerplate for React web apps. See also my Firebase and React Hooks boilerplate, GraphQL + Postgres SQL boilerplate, and Redux + REST + Postgres SQL boilerplate.

This template is based on nextjs-express-boilerplate, but with added mongoose-crudify and redux-api.

Support this project

Did you or your company find nextjs-express-mongoose-crudify-boilerplate useful? Please consider giving a small donation, it helps me spend more time on open-source projects:

Support Tom on Ko-Fi.com

Why is this awesome?

This is a great starting point for a any project where you want React + Redux (with server-side rendering, powered by Next.js) as frontend and Express/MongoDB as a REST API backend. Lightning fast, all JavaScript.

  • Simple REST API routes with MongoDB database and mongoose-crudify.
  • Redux REST support with redux-api and next-redux-wrapper.
  • Flexible client-side routing with next-routes (see server/routes.js).
  • Flexible configuration with config/config.js and .env file.
  • Hot reloading with nodemon.
  • Testing with Jasmine.
  • Code formatting and linting with StandardJS.
  • JWT authentication for client-server communication (coming).

Demo

See nextjs-express-mongoose-crudify-boilerplate running on Heroku here.

nextjs-express-mongoose-crudify-boilerplate demo on Heroku

Don’t want Redux?

This project now uses Redux and redux-api. See the no-redux branch for the (unmaintained) version without Redux.

How to use

Clone this repository:

git clone https://github.com/tomsoderlund/nextjs-express-mongoose-crudify-boilerplate.git [MY_APP]

Install dependencies:

cd [MY_APP]
yarn  # or npm install

Start it by doing the following:

export MONGODB_URI=*your mongodb url* // you can get one for free at https://www.mlab.com/home
yarn dev

In production:

yarn build
yarn start

If you navigate to http://localhost:3001/ you will see a Next.js page with a list of kittens (or an empty list if you haven't added one).

You have your API server running at http://localhost:3001/api/kittens

Deploying

Deploying on Heroku

heroku create [MY_APP]
heroku addons:add mongolab
git push heroku master

Deploying on Now

See instructions on nextjs-express-boilerplate.

More Repositories

1

nextjs-multi-domain-locale

Hosting multiple domains on the same Next.js site (while maintaining multiple languages and SSG)
JavaScript
217
star
2

nextjs-pwa-firebase-boilerplate

Next.js serverless PWA with Firebase boilerplate
JavaScript
210
star
3

nextjs-pwa-graphql-sql-boilerplate

Next.js serverless PWA with GraphQL (Postgraphile, Apollo) + Postgres SQL boilerplate
TypeScript
137
star
4

reactnative-nextjs-template

Build native apps (iOS/Android/Windows/macOS) and an SEO-optimized web app from the same React codebase
TypeScript
43
star
5

nextjs-sql-rest-api-boilerplate

Next.js (React) + Redux + Express REST API + Postgres SQL boilerplate.
JavaScript
23
star
6

programmatic-animations

Make animations with canvas and JavaScript, and export as video
JavaScript
18
star
7

nextjs-generic-landing-page

A generic landing page template, built in Next.js (React) with static HTML export
JavaScript
12
star
8

one-click-survey

API service for creating simple one-click email surveys.
JavaScript
10
star
9

login-as-a-service

Simple plug-and-play login/signup/leads service (using email), compatible with Vercel serverless functions
JavaScript
9
star
10

toms-guidebooks

@tomsoderlund’s guidebooks to a wide collection of tools and services.
JavaScript
6
star
11

string-match-like-search-engines

Google/Bing search style string matching
JavaScript
4
star
12

react-zeroconfig-components

React UI components that require (almost) zero configuration
JavaScript
3
star
13

react-zeroconfig-payments

React Stripe payment components that require zero configuration
JavaScript
3
star
14

twatbot

The clever Twitter bot.
JavaScript
2
star
15

centered-css

A centered, auto-scaling CSS box
HTML
2
star
16

skyscraper-js

Skyscraper.JS - interactive web scraping bookmarklet.
JavaScript
2
star
17

MobileZero

Basic boilerplate for "Mobile First" projects: looks awesome on mobile, and alright on desktop.
JavaScript
2
star
18

sql-wizard

Library that helps generate SQL queries and Express CRUD routes.
JavaScript
2
star
19

CordovaRTC

WebRTC live streaming for Cordova (mobile apps) - to be used together with ProjectRTC
JavaScript
2
star
20

design-profile-generator

Quickly generate a graphic design profile (as CSS)
JavaScript
2
star
21

duckduckgo-images-api-vercel

Simple API based on duckduckgo-images-api running on Vercel
Python
1
star
22

listwizard

Manipulate text lists with subtraction, intersection, aggregation, etc.
Svelte
1
star
23

pdf-analyzer

Convert PDF’s to structured data with ML
Python
1
star
24

MathPlay

Simple multiplayer math game using Meteor.
JavaScript
1
star
25

simple-browser-session

Library to get/set session values from localStorage/cookie and/or URL query string
JavaScript
1
star
26

react-share-follow

React component for Share and Follow on social networks
JavaScript
1
star
27

mixpanel-analytics

Tools for exporting and analyzing Mixpanel data.
JavaScript
1
star
28

simple-scraper-chrome-extension

Simple Scraper - Chrome extension
JavaScript
1
star