apicgg / vite-mern-template

Simple production ready boilerplate for MERN stack with Vite.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vite-mern-template

Depfu Depfu

Simple opinionated boilerplate for MERN stack with Vite and Redux Toolkit. This includes React+TypeScript with familiar configuration for vite.config.ts for front-end and Express+TypeScript for back-end.

Feel free to add or tweak the setup as needed.

This has been created with the official Vite template (npm create vite@latest) and some extended setup. There are two separate folders called backend and frontend. The entry point for the backend is backend/src/index.js.

Any package manager can be used with this project (e.g. npm or yarn or pnpm).

Thanks to awesome-vite for publishing this project.

Tools

The dependency versions are managed by depfu.

Requirements

Demo

vite-mern-template-gh-demo

Installation

npx degit apicgg/vite-mern-template my-app

or

git clone https://github.com/apicgg/vite-mern-template.git

Install dependencies (npm or yarn or pnpm)

  • Backend
npm install
  • Frontend
cd frontend
npm install

Start the development server

  • Backend
npm run dev:backend
  • Frontend
npm run dev:frontend
  • Remove the .git and .github folder and initialize your own git repository.

TODO

  • Include eslint and prettier.
  • Add testing framework.
  • Create a npm CLI library for scaffolding projects.

License

MIT License.

Please review the License.

Contributors ✨

Contributions of any kind welcome! Kindly have a look into Contributing Guidelines

About

Simple production ready boilerplate for MERN stack with Vite.

License:MIT License


Languages

Language:TypeScript 65.1%Language:HTML 18.8%Language:JavaScript 13.1%Language:CSS 3.0%