Giter VIP home page Giter VIP logo

create-ntmt-app's Introduction

⚡V2 is currently in development, and will include a sleek all-new CLI interface, support for Next.js 13, bug fixes, updated dependencies, and new tools and packages!⚡

create-ntmt-app version License: MIT

Generate an NTMT App - NextJS, TypeScript, MongoDB, Tailwind CSS quickly using this boilerplate.

An easy to use boilerplate contains ready-to-go Next project, containing a MongoDB Driver, TypeScript and Tailwind CSS support. You can also add testing with cypress (jest included out of the box).

No useless premade code/components! Just start writing your app instantly ⚡

Usage

Please make sure you have Node installed on your machine.

npx create-ntmt-app my-app
cd my-app

Use this approach instead:

npm install -g create-ntmt-app
create-ntmt-app my-app
cd my-app

If you want cypress support for testing, add the "with-cypress" flag to the command, after the app name:

npx create-ntmt-app my-app with-cypress
cd my-app

Additional Features

The boilerplate contains testing capabilities, as shown, using cypress and jest to maximize Unit and Integration testing. I have included the start-server-and-test package to allow for cypress testing while running the dev server.

The boilerplate contains the tailwind-merge package to allow merging tailwind classes, which I found really useful.

The boilerplate contains a predefined MongoDB driver which exports a clientPromise that can be shared across the entire app in order to access the database. The driver can be found under lib/mongodb.ts.

next-auth support might be added in the near future to the boilerplate since I use it quite often.

Get Started

This is the structure of the project you will be getting:

my-app
├── lib
│   ├── mongodb.ts
├── pages
│   ├── api
│   ├── _app.tsx
│   ├── index.tsx
├── public
│   ├── favicon.ico
│   ├── vercel.svg
├── styles
│   ├── globals.css
├── .env.local
├── .eslintrc.json
├── .gitignore
├── next-env.d.ts
├── next.config.js
├── package-lock.json
├── package.json
├── postcss.config.js
├── tailwind.config.js
├── tsconfig.json
├── yarn.lock

With cypress, you will also be getting:

├── cypress
│   ├── e2e
│   │   ├── app.cy.ts
│   ├── fixtures
│   │   ├── example.json
│   ├── support
│   │   ├── commands.ts
│   │   ├── e2e.ts
├── cypress.config.ts

You can start building your app as you would with create-next-app.

To get started with MongoDB, add your MongoDB url in MONGODB_URI environmental variable at .env.local:

MONGODB_URI=<your_mongodb_url>

Thats It! 👊

Thanks for using this package, happy coding!

create-ntmt-app's People

Stargazers

Jim Brown avatar

Watchers

 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.