npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@clevertech.biz/create-cleverstarter

v0.1.1

Published

A Full-stack TypeScript GraphQL Project Template

Downloads

8

Readme

Cleverstarter

A Full-stack TypeScript GraphQL Project Template

  1. Reduce time to MVP
  2. Reduce developer pain-points
  3. Provide a robust foundation for Enterprise scale

Quickstart

Ensure you have npm and git.

Given the above dependencies, run the following in a terminal as a regular user:

npm init @clevertech.biz/cleverstarter
npm start

Familiarize yourself with the contents of ./<project>

What & Why?

  1. React
  • Why: Standard, robust, well-known client library
  • Docs: https://reactjs.org
  • Known Alternatives: Angular
  1. Express
  • Why: Standard, robust, well-known server library
  • Docs: https://expressjs.com/
  • Known Alternatives: Koa
  1. Apollo Client / Server:
  • Why: decouple the frontend from the backend:
  • Docs: https://www.apollographql.com/docs/
  • Known Alternatives: Postgraphile and Relay Modern
  1. TypeScript
  • Why: Typed JavaScript scales better and results in less bugs
  • Docs: https://www.typescriptlang.org/
  • Known Alternatives: write new code in JavaScript and leave the existing TypeScript
  1. TypeGraphQL
  • Why: Using decorators and classes, quickly define schema in a modular, maintainable way
  • Docs: https://typegraphql.com/
  • Known Alternatives: Apollo lets you build your schema by hand
  1. TypeORM
  • Why: Manage Database and GraphQL schema with the same classes
  • Docs: https://typeorm.io/
  • Known Alternatives: Sequilize
  1. Jest for unit tests
  • Why: Delightful unit testing framework, easy to mock imports for isolated unit testing
  • Docs: https://jestjs.io
  • Alternatives: Mocha / Jasmine / Karma
  1. Supertest for integration tests
  • Why: Easily test HTTP endpoints for full integration
  • Docs: https://github.com/visionmedia/supertest
  • Known Alternatives: Perform integration tests on the endpoint methods with Jest
  1. Cypress for e2e testing
  • Why: Professional, well-loved E2E testing framework for web applications
  • Docs: https://cypress.io
  • Alternatives: TestCafe
  1. Passport OIDC Relay Provider Strategy
  • Why: offload most auth logic to a hosted UI (like AWS Cognito) which supports Enterprise IdP integration
  • Docs: https://github.com/panva/node-openid-client
  • Alternatives: SAML, Local Auth, and any other passport.js strategy
  1. Documentation: A detailed, helpful readme in each folder
  • Why: Knowledge is lost unless it is written down
  • Docs: makeareadme.com
  • Alternatives: GitHub Pages / Wiki

Note: Skim through as much of the above documentation as you can (skip but observe) to set yourself up for success

Usage

Because Cleverstarter is a template, running the initializer is all you need to "use" the starter.

From there, you must know your domain language and begin building out your API and client-side application.

To assist you in this process, we will describe the various components of the application with README files in their respective directories

See above for links to the documentation of the variuos tooling we use.

Tutorials

Tutorials could be added to this section w.r.t. how to do common tasks within the starter like:

  • Logging in, logging out, and protecting new resources
  • Adding new resolvers to the schema
  • Adding new routes to the frontend
  • Querying data with Apollo
  • Handling cache updates in Apollo
  • N+1 Data Loader

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

  1. Clone down the code:
git clone [email protected]:clevertech/cleverstarter.git
  1. Start the watchers:
cd cleverstarter
npm start
  1. Then edit the files in the template folder:
  • template/api
  • template/web/apollo-react
  • template/mobile

Tests

Running npm test in the root of each template will verify all tests continue to pass.
Run npm test in the top-level folder of this repository to verify all tests still pass before committing. Please make sure to update and add tests as appropriate. Aim for over 80% coverage.

License

MIT