Apollo Server Express Boilerplate

Overview

Apollo Server Express Boilerplate

Boilerplate for graphql and graphql-ws using Apollo Server Express and powered by TypeORM and TypeGraphQL to make your work is quicker and easier.

Made with 💕 by Arya W Pratama

I hope you like it! 😉

Powered by

Features

  • Basic JWT Login and Register System.
  • Role Based Access Control Guard.
  • GraphQL WebSocket with graphql-ws.
  • Database Faker with Faker and TypeORM Seeding.
  • graphql-ws, client example in graphqlwsclient branch.
  • Path Alias.
  • TypeGraphQL.
  • Typescript. ❤️
  • Build helper, to make your build folder clean.
  • ESLint Airbnb.

How to Use

  1. Rename .env.example to .env
  2. Fill the .env with your own configuration
  3. Run yarn or npm install to install the dependencies
  4. Run yarn seed or npm run seed to seed your database
  5. Finally run yarn dev or npm run dev to start the server in Development Mode

Command Explanation

  • yarn build or npm run build
    • Build your project, the output will be in /dist directory
  • yarn dev or npm run dev
    • Start your server in Develompent Mode
  • yarn staging or npm run staging
    • Start your server in Develompent in Staging Mode Make sure you build your project first
  • yarn production or npm run production
    • Start your server in Develompent in Production Mode Make sure you build your project first
  • yarn seed or npm run seed
    • Seed your database
  • yarn schema:sync or npm run schema:sync
    • Sync your entities with your database
  • yarn schema:drop or npm run schema:drop
    • Drop all of your table in your database
  • yarn migration:run or npm run migration:run
    • Migrating Database
  • yarn migration:revert or npm run migration:revert
    • Revert database Migration
  • yarn database:refresh or npm run database:refresh
    • Refresh your database with new table and data

Important Account

  1. Admin
  2. Organizer
  3. User

Note

  • You may use another database like oracledb, mariadb, postgresql, etc. Just remove the mysql dependency and install your own database dependency as long as typeorm support it.
  • I have installed graphql-ws to make your work easier, just disable it if you don't want graphql subscription run in your project.
  • I use id_ID for default user faker data, just change the locale in @factories/dummyUser.factory.ts directory.
  • I've setup path alias in this project, you may found and edit it by your own decision in tsconfig.json
  • I'm not an expert so I might make a lot of mistake, I just want to make your work is easier. Your feedback would make me be a better developer! ❤️
You might also like...

React + Redux starter kit / boilerplate with Babel, hot reloading, testing, linting and a working example app built in

React + Redux starter kit / boilerplate with Babel, hot reloading, testing, linting and a working example app built in

A comprehensive starter kit for rapid application development using React. Why Slingshot? One command to get started - Type npm start to start develop

Jan 3, 2023

DDD/Clean Architecture inspired boilerplate for Node web APIs

Node API boilerplate An opinionated boilerplate for Node web APIs focused on separation of concerns and scalability. Features Multilayer folder struct

Dec 30, 2022

A MERN boilerplate repository with RBAC feature, following all production best practices.

A MERN boilerplate repository with RBAC feature, following all production best practices.

Welcome to the RBAC MERN Boilerplate project A MERN boilerplate repository with RBAC feature, following all production best practices. In this reposit

Dec 27, 2022

NextJS, TypeScript and Styled Components project boilerplate

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

Sep 21, 2021

A boilerplate to kick off any Gatsby project.

A boilerplate to kick off any Gatsby project.

A boilerplate to kick off any Gatsby project. This starter ships with: - Gatsby v4 - Material UI v5 with light/dark mode and a custom theme - Emotion JS (with access to Material UI custom theme) - React redux (with reduxjs/toolkit) - React intl for multilingual support - React helmet for SEO

Jul 6, 2022

Jekyllist - Modern Boilerplate on Jekyll

Jekyllist - Modern Boilerplate on Jekyll Jekyllist is a production ready boilerplate for humans who wants to build simple websites (portfolio sites, b

Jul 21, 2022

Vite Electron Builder Boilerplate

This is template for secure electron applications. Written following the latest safety requirements, recommendations and best practices.

Dec 15, 2022

Teaching boilerplate for teachers that are learning how to program with React

React course: react4teachers-zero2hero Teaching boilerplate for teachers that are learning how to program with React. Course offered by Conselleria d'

Jun 6, 2022

Next Boilerplate with TypeScript, Redux Toolkit and Styled-Component.. For now

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

Feb 17, 2022
Owner
Arya W Pratama
Currently learning Typescript, GraphQL, Apollo Server & Client, TypeORM, Type-graphql, Express.js, Vue.js, Next.js
Arya W Pratama
React Native Boilerplate - The Boilerplate contains all the basic packages, common components and, prebuilt code architecture

The Boilerplate contains all the basic packages, common components and, prebuilt code architecture. It will save developer's project setup time.

MindInventory 36 Dec 26, 2022
Solana Boilerplate - Lightweight boilerplate for Solana dapps. Allows quick building and prototyping.

Lightweight boilerplate for Solana dapps. Allows quick building and prototyping. Feel free to contribute or fork this repository. Make it yours! Leave us a ⭐️ if this repo helped you.

null 21 Nov 15, 2022
React Starter Kit — isomorphic web app boilerplate (Node.js, Express, GraphQL, React.js, Babel, PostCSS, Webpack, Browsersync)

React Starter Kit — "isomorphic" web app boilerplate React Starter Kit is an opinionated boilerplate for web development built on top of Node.js, Expr

Kriasoft 21.7k Jan 1, 2023
A boilerplate for building production-ready RESTful APIs using Node.js, Express, and Mongoose

By running a single command, you will get a production-ready Node.js app installed and fully configured on your machine. The app comes with many built-in features, such as authentication using JWT, request validation, unit and integration tests, continuous integration, docker support, API documentation, pagination, etc. For more details, check the features list below.

Hagop Jamkojian 5k Dec 31, 2022
Very minimalistic boilerplate to start most Typescript Express projects. Includes Mongodb connection via Mongoose with a sample post model.

Minimalist express-typescript-boilerplate Available Scripts - `tsc' - builds the tsc project to the dist folder - `build` - cleans the previous build

Black Axe 16 Dec 13, 2022
Postgres Node.js Express TypeScript application boilerplate with best practices for API development.

Node TypeScript Boilerplate Postgres Developer Ready: A comprehensive template. Works out of the box for most Node.js projects. This project is intend

Chirag Mehta 9 Aug 28, 2022
A boilerplate for REST API Development with Node.js, Express, and MongoDB using TypesScript

node-mongo-boilerplate A simple boilerplate for NODEJS, EXPRESS and MONGODB REST API development . Quick Start Make sure you have node.js v14 + npm v8

Asamoah Michael 5 Oct 16, 2022
An upgradable boilerplate for Progressive web applications (PWA) with server side rendering, build with SEO in mind and achieving max page speed and optimized user experience.

React PWA v2 A highly scalable, Progressive Web Application foundation,boilerplate, with the best Developer Experience. Demo: https://demo.reactpwa.co

Atyantik 2.5k Dec 26, 2022
A NodeJS Express server that uses Prisma ORM.

Express - Prisma Template (Typescript) A NodeJS Express server that uses Prisma ORM. Stack NodeJS Express Prisma TypeScript File Structure src/config

Nabeegh Ahmed 3 Feb 4, 2022
A boilerplate for Node.js web applications

Hackathon Starter Live Demo: https://hackathon-starter.walcony.com Jump to What's new? A boilerplate for Node.js web applications. If you have attende

Sahat Yalkabov 34k Dec 28, 2022