Skip to content

Spence - An opinionated API Framework For nodejs

License

Notifications You must be signed in to change notification settings

velocitycareerlabs/spencer

 
 

Repository files navigation

spence - an simple nodejs API Framework

Opinionated API Framework For Fastify and Postgres or MongoDB for FAST coding and EXTREME extensibility

CircleCI codecov Total alerts Language grade: JavaScript

Getting started:

  • creating a table
  • creating a controller
  • subscribe to changes

Documentation

Api Building Libraries for fastify that simplifies quickly building enterprise grade apis with reusable json schemas, open api v3 compliant documentation and generatable integration tests.

Event layer that enables event driven architectures. All changes on the persistence layer are evented. Rabbitmq & Kafka support comming soon

Repo library over mongo. Build a extensible data layer for mongo in 3 lines of code.

Repo library over postgres. Build a extensible data layer for postgres & knex in 3 lines of code.

Factories library for your tests. Generate reusable & extensible plain objects, mocks and really persisted data by specifying fixtures.

Philosophy

  • FP first
  • Productivity oriented
  • extensible and flexible. Easy to customize
  • Scalable - monolith are easy, microservices made fun
  • Best practices
    • schemas & comprehensive integration tests are the most effective ways to document and create a maintainable system
  • Performance is important
  • ORMs - only change a db for specialization reasons. The native query language is usually the best What is familiar but of no benefit:
  • DI - IoC & mocking can be done using currying or if the only purpose is testing then use module mocking.
  • Functions and Modules over Classes and Singletons

Controllers

  • adding extra routes
  • multitenant support

Events

  • why are events important?
  • monoliths
  • rabbit
  • redis
  • errors

Auth

  • api tokens
  • oauth
  • userId

Errors

  • errors & error handling
  • the importance of error reporting & aggregation

Database

  • finders
  • db configuration
  • creating an effect extension

Testing

  • jest only
  • factories & testing

About

Spence - An opinionated API Framework For nodejs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.7%
  • TypeScript 0.3%