GitHunt
SP

spy4x/seed

Full-stack startup monorepo template. Build your next startup idea with best practices from day 1!

Seed

Full-stack startup monorepo template. Build your next startup idea with best practices from day 1!

๐Ÿค” Motivation. Why Seed?

๐Ÿ’ก After working on dozens of startup projects, I realised a pattern of applications/code/infrastructure that every startup needs.
๐Ÿ‘จโ€๐Ÿ’ป Instead of repeating myself from project to project I decided to extract a project template into this seed.
๐Ÿ† Now anyone can clone this repo and get all it's benefits for their startup.
๐ŸŒŸ More about benefits in the Roadmap section.

๐Ÿ“— Table of Contents

  1. Prerequisites
  2. Run it locally
  3. Tools used
  4. Roadmap
  5. Contribution
  6. Credits

โ˜๏ธ Prerequisites

You need to have next things:

  1. Docker (tip: brew install --cask docker)
  2. Node.js (tip: brew install nvm && nvm install 18)
  3. Yarn (tip: npm i -g yarn)
  4. Clone this repo (tip: git clone git@github.com:spy4x/seed.git)
  5. Install dependencies yarn and build essential docker images yarn docker:init. On first run it will download all dependencies, so grab your favourite coffee or tea while initialization magic happens โ˜•

โ–ถ๏ธ Run it locally

  1. Start all apps and local infrastructure with yarn start.
  2. Open in your browser:

โšก Tools used

Angular TailwindCSS Nest.js PostgreSQL Docker
Prisma Swagger Google Cloud Firebase Nrwl Nx
Cypress Jest ESLint Prettier TypeScript

๐ŸŽฏ Roadmap

What is implemented and what is planned.

Environment and code organisation

โœ… Manage monorepo with multiple frontend and backend projects
โœ… Running everything locally with a single command - $ yarn start
โœ… Deploying apps to the cloud
โœ… TypeScript config (strict rules)
โœ… ESLint config (strict rules)
โœ… Prettier config
โœ… Pre-commit hook for code quality control
โœ… Deploy to production with a single command - $ yarn deploy:all
๐Ÿ•‘ CI/CD
๐Ÿ•‘ Manage environments on local machine
๐Ÿ•‘ Follows "12 Factor App"
๐Ÿ•‘ Calculate affected apps based on latest release tag
๐Ÿ•‘ Staging environment
๐Ÿ•‘ Manage commits
๐Ÿ•‘ Update versions

Backend

โœ… Backend infrastructure diagram
โœ… Cloud Run
โœ… Nest.js
โœ… Prisma
โœ… Configure Swagger integration with Nest.js
โœ… CQRS architecture
โœ… Verify user JWT authentication
๐Ÿ•‘ Unit-testing controller
โœ… Unit-testing command handler
โœ… Unit-testing query handler
๐Ÿ•‘ Unit-testing event handler
๐Ÿ•‘ Load-testing
โœ… Logging
โœ… Schedule tasks
โœ… Users management
โœ… REST API
โœ… Send Push notifications
๐Ÿ•‘ Http and Redis caching
๐Ÿ•‘ Stripe subscriptions and payments

Database

โœ… Automatic backups
โœ… Restore backup
โœ… Read replicas
๐Ÿ•‘ Automatic database migrations

Files upload

๐Ÿ•‘ Cloud Storage security rules
๐Ÿ•‘ Handle upload
๐Ÿ•‘ Keep track of files
๐Ÿ•‘ Resize uploaded file

Frontend

Shared

โœ… Authentication
โœ… NgRx
โœ… E2E-testing
โœ… Unit-testing UI components
โœ… Unit-testing NgRx State
โœ… Unit-testing Container component
๐Ÿ•‘ File upload
๐Ÿ•‘ Logging
๐Ÿ•‘ Build once, use bundle for every environment

Styles

โœ… TailwindCSS + Mobile-first responsive design
โœ… Styles shared between frontend apps

PWA

๐Ÿ•‘ Offline work
๐Ÿ•‘ Push Notifications
๐Ÿ•‘ Auto-update
๐Ÿ•‘ Installable

Admin Panel

๐Ÿ•‘ Users management
๐Ÿ•‘ Groups management
๐Ÿ•‘ Reset user's password

Web Client

๐Ÿ•‘ Realtime update of data from backend
๐Ÿ•‘ Group access to data
๐Ÿ•‘ Manage your personal account - avatar, email, oAuth providers, groups memberships
๐Ÿ•‘ Manage group account - avatar, members, accesses
๐Ÿ•‘ Invite person to your group by email
๐Ÿ•‘ Transfer ownership of a group

โž• Contribution

Contributions are welcome, either it is a typo fix, bug fix, feature proposal, a pull request or anything else!
For more info follow contributing guidelines.

Credits

๐Ÿ‘ป Created by Anton Shubin

โค๏ธ Special thanks to contributors:

Mehdi Artem Ischenko Irina Sorokina
spy4x/seed | GitHunt