Giter VIP home page Giter VIP logo

practica's Introduction

Best practices starter


Generate a Node.js app that is packed with best practices AND simplicity in mind. Based off our repo Node.js best practices (78,000 stars)


โฃ๏ธ Alpha stage: Practica.js is a work-in-progress. We've only recently kicked off. Please revisit by July 2022 ๐Ÿ—“

Discord Discord discussions | Twitter Twitter | Site Documentation site


A One Paragraph Overview

Although Node.js has great frameworks ๐Ÿ’š, they were never meant to be production ready immediately. Practica.js aims to bridge the gap. Based on your preferred framework, we generate example code that demonstrates a full Microservice flow, from API to DB, that is packed with good practices. For example, we include a battle-tested error handler, sanitize API response, hardened dockerfile, thoughtful 3-tier folder structure, great testing templates with DB, and more. This saves a great deal of time and can prevent painful mistakes. All decisions made are neatly and thoughtfully documented. We strive to keep things as simple and standard as possible and base our work on the popular guide: Node.js Best Practices

1 min video ๐Ÿ‘‡, ensure audio is activated

practica-1-min-explainer.mp4

Table of Contents


Super-Quick Setup

Note: Practica.js is a work-in-progress. To have a more complete experience, please check back after June 2022.


Run Practica.js from the Command Line

To run Practica in Interactive Mode (with UI):

npx @practica/create-node-app interactive

Note that for now, it can generate an app that is based on Express and PostgreSQL only. Other options will get added soon

Or if you'd prefer a typical terminal experience (without UI):

npx @practica/create-node-app immediate

โœจ And you're done! That's it. The code's all been generated.


Start the Project

npm start

or

npm test

Pretty straight forward, right?


Next Steps

  • โœ… Start coding. The code we generate is minimal by design, and should help you get up to speed quickly.
  • โœ… (Optional) Read through the code. Best Practices are tagged throughout.
  • โœ… Master it by reading our docs.

Our Philosophies and Unique Values

1. Best Practices on top of known Node.js frameworks

We don't re-invent the wheel. Rather, we use your favorite framework and empower it with structure and real examples. With a single command you can get an Express/Fastify-based codebase with ~100 examples of best practices inside.

Built on top of known frameworks

2. Simplicity, how Node.js was intended

Keeping it simple, flat, and based on native Node/JS capabilities is part of this project's DNA. We believe that too many abstractions, high-complexity or fancy language features can quickly become a stumbling block for the team.

To name a few examples, our code flow is flat with almost no level of indirection, although using TypeScript - almost no features are being used besides types, for modularization we simply use Node.js modules.

Built on top of known frameworks

3. Supports many technologies and frameworks

Good Practices and Simplicity is the name of the game with Practica. There is no need to narrow our code to a specific framework or database. We aim to support a majority of popular Node.js frameworks and databases.

Built on top of known frameworks


Practices and Features

We apply more than 100 practices and optimizations. You can opt in or out for most of these features using option flags on our CLI. The following table lists just a few examples out of the full list of features we provide.

Feature Explanation Flag Docs
Monorepo setup Generates two components (e.g., Microservices) in a single repository with interactions between the two --mr, --monorepo Docs here
Output escaping and sanitizing Clean-out outgoing responses from potential HTML security risks like XSS --oe, --output-escape Docs here
Integration (component) testing Generates full-blown component/integration tests setup including DB --t, --tests Docs here
Unique request ID (Correlation ID) Generates module that creates a unique correlation/request ID for every incoming request. This is available for any other object during the request life-span. Internally it uses Node's built-in AsyncLocalStorage --coi, --correlation-id Docs here
Dockerfile Generates dockerfile that embodies >20 best practices --df, --docker-file Docs here
Strong-schema configuration A configuration module that dynamically load run-time configuration keys and includes a strong schema so it can fail fast Built-in with basic app Docs here

๐Ÿ“— See our full list of features here


The People Behind Practica.js

Steering Committee

Practica is a community-driven open-source project. It's being led voluntarily by engineers from many different companies. These companies are just a few who encourage their engineers to contribute and keep this project moving. ๐Ÿ’š

Autodesk

A Nasdaq 100 company, a world leader in design software

Cox2m

Leader IoT provider, part of 'Cox Communication', the 3rd largest cable company in the US

Core Team


Yoni Goldberg


Independent Node.js consultant

Michael Solomon


Node.js lead

Raz Luvaton


Node.js developer

Daniel Gluskin


Node.js lead

Partners

These companies are keen for continous improvement and their engineers to have been known to contribute during work hours.

Minta

Our Amazing Contributors ๐Ÿ’š

A million thanks to these great people who have contributed code to our project:


Brian Clark

๐Ÿ’ป

Raz Luvaton

๐Ÿ–‹

Michael Solomon

๐Ÿ’ป

itainoam

๐Ÿ’ป

shanizlo

๐Ÿ’ป

Ron Dahan

๐Ÿ’ป

AlonK

๐Ÿ’ป

Jose Luis Alvarez Herrera

๐Ÿ–‹ ๐Ÿ’ป

reinaldo-calderon-team

๐Ÿ’ป

KarelVerschraegen

๐Ÿ“–

Daniel Morrison

๐Ÿ–‹

Sean Lowe

๐Ÿ’ก ๐Ÿ–‹

idobetesh

๐Ÿ’ป

Alejandra Acosta

๐Ÿ’ป

adandanielteamint

๐Ÿ–‹

Rashad Majali

๐Ÿ’ป

yohai zvuloon

๐Ÿ–‹

Yonatan Kra

๐Ÿ–‹

Yoni Rapoport

๐Ÿ–‹

perilevy

๐Ÿ’ป

practica's People

Contributors

allcontributors[bot] avatar alonkishoni avatar clarkio avatar danielgluskin avatar danm avatar dependabot[bot] avatar goldbergyoni avatar idobetesh avatar itai-autodesk avatar jalvar53 avatar karelverschraegen avatar mikicho avatar mshorts avatar perilevy avatar rashad612 avatar relsteiner avatar rluvaton avatar rondaha avatar seanlowe avatar shanizlo avatar yohai-zv avatar yonatankra avatar yoni-rapoport avatar

Watchers

 avatar

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.