GithubHelp home page GithubHelp logo

chocolat-chaud-io / stator Goto Github PK

View Code? Open in Web Editor NEW
295.0 9.0 19.0 3.77 MB

Stator, your go-to template for the perfect stack. ๐Ÿ˜๐Ÿ™

License: MIT License

Shell 0.67% JavaScript 4.07% TypeScript 93.49% HTML 1.25% SCSS 0.16% Dockerfile 0.37%
boilerplate generator template project stator react reactjs nestjs nx javascript

stator's People

Contributors

benjaminromano avatar gabrielbottari avatar github-actions[bot] avatar iurygama avatar juanli16 avatar renovate-bot avatar tushgaurav avatar twelvenights avatar yann510 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stator's Issues

Add utilities to enforce quality standards

  • Add CI which builds and fails if linting failed
  • Implement test coverage and CI artifacts
  • Enforce file naming conventions
  • Enforce branch naming convention
  • Make sure eslint works
  • Enforce commit convention with semantic release
  • Make sure commit messages are respected with commitizen
  • Add badges
  • Auto deploy webapp, backend and database with netlify or digital ocean

CLI improvements

  • Add a link to app platform apps after deployment
  • Move NX steps 10-11-12 to [PUBLIC REPOSITORY ONLY]
  • Detect OS windows messages as part of the steps

Implement a scalable deployment infrastructure

  • Auto deploy when a pull request is merged on master using Github Actions (if possible only affected apps)
  • Implement automatic scaling which can be configured through code/config file
  • Deploy self contained review apps on pull requests
  • Update the readme to reflect the new steps needed when using this project as a template

I was thinking maybe we could use Kubernetes, but one thing I don't like about it is the complexity which is often way too high for simple projects. Since this is a template project, make it as simple as possible with detailed instructions. We can use other tools if we see fit.

Simplify the getting started process

Currently, we need to read too many texts in order to get started. This is not acceptable as the goal of this project is to make the process stupid simple. An interactive CLI could be a great idea.

Interactive CLI fixes

  • Add step in NX cloud CLI setup to install NX globally (or maybe use npx)
  • Add step in digital ocean that tells the user to run this command: doctl apps create --spec .do/app.yaml
  • Rename run commands from npm run api to npm start api and same thing for webapp

Add CLI plugin for swagger

This will produce better documentation. The Webpack config from the API must be enhanced with the swagger plugin.

Create template for frontend app

  • Generate a frontend app named webapp using NX
  • Integrate a UI framework
  • Implement the best store system you can find
  • Implement a simple todo application with CRUD operations
  • Integrate the backend once it is ready
  • Implement end to end tests using cypress

Make readme About the Project section clearer

Following a conversation with nightowl_games from hacker news, I think this readme's section could be improved to fully grasp the intent of this project, what it actually is, and how it can be used.

What's the purpose of this project?

Before getting started let's communicate what's the vision for this project.

What's the purpose of this project?

Stator will be a highly opinionated tool to facilitate getting started with new projects by deciding for you what the perfect modern stack looks like.
It will be able to generate top level mono repository project as well as it's underlying packages such as web application, backend, database, etc.

How will the program be executed?

This will be a CLI tool that can be installed globally or as development dependency from the npm package registry.

What will stator be able to generate for v0

  • Root project will be using lerna, prettier, tslint, readme with starting instructions
  • Web application will be using react, redux (or other), bundler, typescript, test-framework (with code coverage), vscode config file
  • Backend will be using node, typescript, express (or other), hot-reload, test-framework (with code coverage), vscode config file
  • Database will be using mongodb

How will we generate those components?

We will be using a templating system named mustache

Add support for optional logger system

  • Have the ability to view and filter logs from an URL (check if DigitalOcean have a solution for this)
  • Replace existing console.xxx with the logger implementation
  • Update get-started CLI accordingly (should be an optional step for the online saving part)
  • Ensure the logger works even if the online part isn't configured
  • Update README.md

Simplify readme

Organize readme so it's easier to read. Experiment with different ideas to improve readability.

Create review apps for every pull requests

  • Create a docker-compose file with frontend, backend, database
  • Automatically generate droplets on digital ocean and run the docker-compose if non exists with the PR number
  • Ensure application is available to the external world
  • Add a link in the pull request with the newly hosted app URL
  • When the pull request is deleted make sure the droplet is deleted too
  • Write documentation concerning the review apps in the readme
  • Ensure updating a PR update the review app
  • Optimize CI pipeline
  • Add support for https
  • Ensure review apps are not created for renovate bot PRs

Refactor nx github actions

Instead of basing any affected changes from master, we should use github ${{ github.event.pull_request.base.sha }} and ${{ github.event.pull_request.head.sha }} as done like this open source action.

nx affected:build --base=${{ github.event.pull_request.base.sha }} --head=${{ github.event.pull_request.head.sha }}

Also, we should then remove the following command, as it becomes useless:

- name: Fetch latest changes
  run: git fetch --no-tags --prune --depth=5 origin master

Add linting on modified files on pre-commit hook

  • Move import-sort to dev dependencies
  • Run linting and enforce-file-folder-naming-convention.js on hook
  • Make sure all those conventions are explained in the readme

This will help speed up the feedback loop for developers instead of having to wait for the CI to tell them.

Best practices for managing environment variables?

Hey @yann510 !

Thank you so much for this amazing template. It's helped me learn so much about best practices for building a full stack app <3

Just had a quick question that I've been hitting my head on. What's your go-to for managing env variables in Stator? I tried cloning, running npm run gen-started and deploying via Digital Ocean but hit an error about the database env variables not being defined (like database.HOSTNAME).

Sorry if this is kind of a noob question ๐Ÿ˜…

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.