Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Starter for a generic CRUD app with Apollo GraphQL Server, Next.js API routes, and MongoDB.

Free Bootstrap 4 design system with over 100 components, pre-built pages, and a full UI kit for faster web projects.
The Next.js Apollo GraphQL MongoDB CRUD Starter is an open-source boilerplate that scaffolds a generic CRUD application with a Next.js front end, an Apollo GraphQL Server exposed as a Next.js API route, and MongoDB for data persistence; the repository carries the description "Advanced Starter GraphQL Next js Crud Mongodb" and has 31 stars.
This starter takes as input a MongoDB connection string stored in a .env.local file (renamed from .env.local.tmp) and produces a working GraphQL endpoint at /api/graphql, a generated TypeScript schema, and a home page at pages/index.tsx that you edit to build your UI. It runs entirely within the Next.js framework: the GraphQL server is implemented in pages/api/graphql.ts, so there is no separate backend process. The project is a create-next-app foundation, with API routes automatically mapped to /api/*.
yarn generate command builds the GraphQL schema and TypeScript type definitions so client and server types remain in sync.yarn dev starts Next.js in development mode; editing pages/index.tsx updates the page in the browser automatically.yarn install.yarn generate to create the GraphQL schema and TypeScript types.yarn dev, then open http://localhost:3000/api/graphql to try the GraphQL endpoint.The repository is publicly hosted on GitHub and appears in search results as a boilerplate; nothing in the README indicates a paid license or pricing plan, so it is free to fork and modify.
It uses Next.js (React framework), Apollo GraphQL Server (exposed through a Next.js API route), MongoDB (connected via a MONGODB_URI environment variable), and generates Typescript types with a yarn generate command.
Copy .env.local.tmp to .env.local, open the file, and replace the placeholder MONGODB_URI value with your actual MongoDB connection string. After saving, run yarn generate and then yarn dev.
During development, the GraphQL endpoint is at http://localhost:3000/api/graphql. It is defined in pages/api/graphql.ts, and because Next.js maps the pages/api directory to /api/*, the route is automatically exposed.
