All Projects โ†’ karanpratapsingh โ†’ Fullstack Starterkit

karanpratapsingh / Fullstack Starterkit

Licence: mit
GraphQL first full-stack starter kit with Node, React. Powered by TypeScript

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Fullstack Starterkit

Gatsby Starter Lumen
A constantly evolving and thoughtful architecture for creating static blogs.
Stars: โœญ 1,797 (+90.56%)
Mutual labels:  graphql, architecture
Hoppscotch
๐Ÿ‘ฝ Open source API development ecosystem https://hoppscotch.io
Stars: โœญ 34,569 (+3565.85%)
Mutual labels:  graphql
React Apollo Defragment
๐Ÿ’ฟ Automatic query defragmentation based on React trees.
Stars: โœญ 14 (-98.52%)
Mutual labels:  graphql
Karchi
Repository that showcases 3 different Android app architectures, all with Java and Kotlin versions: "Standard Android", MVP and MVVM. The exact same app is built 6 times following the different patterns.
Stars: โœญ 20 (-97.88%)
Mutual labels:  architecture
Androidarchitecture
Recommended architecture by Android
Stars: โœญ 883 (-6.36%)
Mutual labels:  architecture
Recife
A powerful MVC Framework for GraphQL
Stars: โœญ 20 (-97.88%)
Mutual labels:  graphql
React Apollo
โ™ป๏ธ React integration for Apollo Client
Stars: โœญ 6,932 (+635.1%)
Mutual labels:  graphql
Super Resolution cnn
Implementation of 'Image Super-Resolution using Deep Convolutional Network'
Stars: โœญ 27 (-97.14%)
Mutual labels:  architecture
Magazine Website Akka
The experiment on the akkadotnet
Stars: โœญ 21 (-97.77%)
Mutual labels:  graphql
Maple
Elixir GraphQL Client | Compile time client code generator for GraphQL APIs based on introspection queries and schema files
Stars: โœญ 20 (-97.88%)
Mutual labels:  graphql
Learnrelay
Learn Relay - A comprehensive introduction to Relay (created by Graphcool)
Stars: โœญ 887 (-5.94%)
Mutual labels:  graphql
Graphql Config
One configuration for all your GraphQL tools (supported by most tools, editors & IDEs)
Stars: โœญ 883 (-6.36%)
Mutual labels:  graphql
Pinned Repositories
An efficient and flexible ReactJs project for getting pinned repositories using React Hook , GraphQL
Stars: โœญ 21 (-97.77%)
Mutual labels:  graphql
Awesome
ๅผ€ๅ‘ๆžถๆž„ๅปบ่ฎพๆŒ‡ๅ—
Stars: โœญ 14 (-98.52%)
Mutual labels:  architecture
Awesome Scalability
The Patterns of Scalable, Reliable, and Performant Large-Scale Systems
Stars: โœญ 36,688 (+3790.56%)
Mutual labels:  architecture
React Styleguide
ReactJS style guide for component-based projects.
Stars: โœญ 14 (-98.52%)
Mutual labels:  architecture
Panther
Detect threats with log data and improve cloud security posture
Stars: โœญ 885 (-6.15%)
Mutual labels:  graphql
Java Best Practices
Best practices in Coding, Designing and Architecting Java Applications
Stars: โœญ 909 (-3.61%)
Mutual labels:  architecture
Project Fortis
Repository for all parts of the Fortis architecture
Stars: โœญ 27 (-97.14%)
Mutual labels:  graphql
Design Patterns For Humans
An ultra-simplified explanation to design patterns
Stars: โœญ 32,376 (+3333.3%)
Mutual labels:  architecture

fullstack-starterkit

PRs welcome! Twitter: karan_6864

Motivation โญ๏ธ

Setting up boiler plates when starting new projects is tedious sometimes and I often found myself setting it up from scratch ๐Ÿฅฑ

Hence I made this starterkit following some of the best patterns and practices I learnt from some of the larger codebase and fantastic developers I've had a chance to work with ๐Ÿ™Œ

The main purpose of this repository is to provide a scalable "batteries included" full stack starterkit which follows good architecture patterns (might be opinionated) and code decoupling which becomes significant as the project grows or new developers are onboarded

Features

  • All in Typescript Because TypeScript is awesome, and types are important ๐Ÿ˜ƒ

  • GraphQL First This starterkit is built with graphql first approach using the Apollo platform

  • Includes CI CI is integral part of any project. This starterkit includes Github Actions by default. PR's for integration with any other providers are welcome ๐Ÿ™Œ

  • Testing Focused This project uses Jest for testing framework and comes with sample tests which are easy to extend

  • Prisma Prisma is the ORM being used for PostgreSQL. Feel free to submit a PR for any other ORM or drivers you'd like to see here ๐Ÿ˜

  • PWA Support This starterkit comes with out of the box PWA support

Please leave a โญ๏ธ as motivation if you liked the idea ๐Ÿ˜„

๐Ÿš€ Technologies Used

technologies

๐Ÿ“– Contents

Video Overview

Here's a brief video overview of this project, hope it helps.

Full Stack Starterkit Overview

Big thanks to @mikestaub for mentoring me on the lot of the ideas you will come across in this repository. Checkout how he's changing social media with Peapods

๐Ÿญ Architecture

Backend

Here is the folder structure for backend, it is using yarn workspaces which helps us split our monorepo into packages such as DB, GraphQL. Which if required can be made into their own micro services.

backend
โ”œโ”€โ”€ build
โ”œโ”€โ”€ config
โ”œโ”€โ”€ logs
โ”œโ”€โ”€ packages
โ”‚   โ”œโ”€โ”€ db
โ”‚   โ”‚   โ””โ”€โ”€prisma
โ”‚   โ”œโ”€โ”€ graphql
โ”‚   โ”‚   โ”œโ”€โ”€ api
โ”‚   โ”‚   โ”œโ”€โ”€ schema
โ”‚   โ”‚   โ””โ”€โ”€ types
โ”‚   โ””โ”€โ”€ utils
โ”œโ”€โ”€ tests
โ”‚   โ”œโ”€โ”€ db
โ”‚   โ””โ”€โ”€ graphql
โ”œโ”€โ”€ index.ts
โ””โ”€โ”€ package.json
DB

This workspace package contains the database abstractions. The database stack is PostgreSQL as relational database and Prisma as an ORM, read more about DB package here

GraphQL

The GraphQL package is organized as below:

graphql
โ”œโ”€โ”€ schema
โ”‚   โ””โ”€โ”€ user                <---- some entity
โ”‚       โ”œโ”€โ”€ resolvers 
โ”‚       โ”‚     โ”œโ”€โ”€ types     <---- type resolvers
โ”‚       โ”‚     โ”œโ”€โ”€ queries   <---- query resolvers
โ”‚       โ”‚     โ””โ”€โ”€ mutations <---- mutation resolvers
โ”‚       โ”œโ”€โ”€ queries.graphql
โ”‚       โ”œโ”€โ”€ mutations.graphql
โ”‚       โ””โ”€โ”€ types.graphql
โ”œโ”€โ”€ api
โ”‚   โ”œโ”€โ”€ queries             
โ”‚   โ””โ”€โ”€ mutations
โ”œโ”€โ”€ types                   <---- graphql types
โ”‚   โ”œโ”€โ”€ schema           
โ”‚   โ””โ”€โ”€ resolvers
โ””โ”€โ”€ index.json

The schema splits each entity into it's own set of schema to modularize the codebase. The graphql package uses schema stitching and code generators to construct the whole schema.

It is organized so because if you choose to split graphql into it's own set of microservices later, it should be relatively easier to do so as this should be easy to integrate with Apollo Federation

Read more about GraphQL package here

Web

Here is the folder structure for web, it is a standard create-react-app using react-app-rewired to override configs without ejecting

Web package uses Material UI heavily as it makes theming and customization very easy. PR's for any other UI kit are welcome ๐Ÿ˜ƒ

web
โ”œโ”€โ”€ build
โ”œโ”€โ”€ public
โ”œโ”€โ”€ src
โ”‚   โ”œโ”€โ”€ assets
โ”‚   โ”œโ”€โ”€ config
โ”‚   โ”œโ”€โ”€ constants
โ”‚   โ”œโ”€โ”€ global
โ”‚   โ”œโ”€โ”€ tests
โ”‚   โ”œโ”€โ”€ layout     <---- controls, pure components
โ”‚   โ”œโ”€โ”€ theme      <---- theme config
โ”‚   โ”œโ”€โ”€ graphql
โ”‚   โ”‚   โ””โ”€โ”€ operations.tsx     <---- generated graphql operations and types
โ”‚   โ”œโ”€โ”€ pages
โ”‚   โ”‚   โ””โ”€โ”€  Home   <---- page component
โ”‚   โ”‚        โ”œโ”€โ”€ components <---- page specific components
โ”‚   โ”‚        โ””โ”€โ”€ hooks      <---- page specific custom hooks   
โ”‚   โ””โ”€โ”€ utils
โ”œโ”€โ”€ tests
โ”‚   โ”œโ”€โ”€ db
โ”‚   โ””โ”€โ”€ graphql
โ”œโ”€โ”€ index.ts
โ””โ”€โ”€ package.json

๐Ÿƒ Getting Started

Setting up environment variables

Before getting started, create .env files at both backend/.env as well as web/.env following the .env.template files located in those directories.

Install dependencies

I recommend using yarn instead of npm as this project heavily uses yarn workspaces

yarn

To install dependencies for web and backend automatically, a postinstall script has been added in the main package.json

Running backend

yarn start:backend

Make sure to use your own DATABASE_URL and not the default as provided in .env.template when developing your own project, as the demo database might be changed/deleted anytime

Running web

yarn start:web
Feel free to open a new issue if you're facing any problem ๐Ÿ™‹

๐Ÿ‘ How to Contribute

Contributions are welcome as always, before submitting a new PR please make sure to open a new issue so community members can discuss.

Additionally you might find existing open issues which can helps with improvements.

This project follows standard code of conduct so that you can understand what actions will and will not be tolerated.

๐Ÿ“„ License

This project is MIT licensed, as found in the LICENSE

Built and maintained with ๐ŸŒฎ by Karan

๐Ÿ’ผ Hire Me | ๐Ÿบ Donate

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].