Giter Site home page Giter Site logo

nextjs-mongo-crud's Introduction

Next.js + MongoDB + Basic Crud Operation

A full-fledged app made with Next.JS and MongoDB.

About this project

nextjs-mongo-crud is a continously developed app built with Next.JS and MongoDB. Most tutorials on the Internet are either half-baked or not production-ready. This project aims to fix that.

This project goes even further and attempts to integrate top features as seen in real-life apps.

Give this project a big ol' ๐ŸŒŸ star motivates me to work on new features.

Check out my profile (https://tejasrana.com/).

Using this project

The goal is not to use this project as it, but to implement your own version.

Requirement

This project relies on the following components. Some of them are optional and some may be replaced by others with similar functionalities.

Dependencies

This project uses the following dependencies:

  • next.js - v9 or above required for API Routes.
  • react - v16.8 or above required for react hooks.
  • react-dom - v16.8 or above.
  • mongodb - may be replaced by mongoose.
  • next-connect - recommended if you want to use Express/Connect middleware.
  • axios, axioswal - optional, may be replaced with any request library.
  • next-session, connect-mongo - may be replaced with any session management solution.
  • bcryptjs - optional, may be replaced with any password-hashing library. argon2 recommended.
  • validator - optional but recommended.
  • formidable - may be replaced by other file parser.
  • cloudinary - optional, only if you are using Cloudinary for image upload.

Environmental variables

The environment variables will be inlined during build time and thus should not be used in front-end codebase.

Required environmental variables in this project include:

  • process.env.MONGODB_URI The MongoDB Connection String (with credentials)
  • process.env.CLOUDINARY_URL Cloudinary environment variable for configuration. See this.
  • process.env.DB_NAME The name of the MongoDB database to be used.

I include my own MongoDB and Cloudinary environment variables in .env.example for experimentation purposes. Please replace them with your owns and refrain from sabotaging them. You can use them in development by renaming it into .env.

In production, it is recommended to set the environment variables using the options provided by your cloud/hosting providers.

Development

nextjs-mongo-crud is a long-term developing project. There is no constraint on numbers of features. I continuously accepts feature proposals and am actively developing and expanding functionalities.

Start the development server by running yarn dev or npm run dev.

Features

There are three states in feature development:

  • developed: The feature has been fully developed and is functional.
  • developing: The feature is being developed or being improved.
  • proposed: The feature is proposed and may or may not be developed in the future.

Authentication

  • Session management
  • Allow users to sign up and log in/log out.

User profile

  • Avatar, name, email, location, etc.
  • User profile page
  • Edit user profile

Social delayed

  • Find other users with search functionality
  • View other users' profile page
  • Add/Remove friends

Account management developing

  • Email verification
  • Password change
  • Password reset

Have any features in mind, make an issue. Would like to work on a feature, make a PR.

Styles

Despite the look, this project does not contain any stylesheets, and no component has classes. To remove the style, simply remove all <style jsx> and <style jsx global> tags.

Contributing

Please see my contributing.md.

License

MIT

Credit

Hoang: For providing basic app.

nextjs-mongo-crud's People

Contributors

fdlmhmd29 avatar tejasrana95 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.