micro-objection-realworld-example-app

Real World Example using Zeit's Micro and Vincit's Objection

MIT License

Stars
5

RealWorld Example App

Real World Example using Zeit's Micro and Vincit's Objection

Introduction

This is a little example of a Real World App API specification.

Project Overview

"Conduit" is a social blogging site (i.e. a Medium.com clone). It uses a custom API for all requests, including authentication. You can view a live demo over at https://demo.realworld.io

General functionality:

  • Authenticate users via JWT (login/signup pages + logout button on settings page)
  • CRU* users (sign up & settings page - no deleting required)
  • CRUD Articles
  • CR*D Comments on articles (no updating required)
  • GET and display paginated lists of articles
  • Favorite articles
  • Follow other users

Getting Started

  1. Clone this repo.
  2. Edit all files at src/config.js.
  3. Read How to use migrations.
  4. Install micro-dev globally: "npm i -g micro-dev".
  5. npm install.
  6. npm run start-dev.

Rest Client: Insomnia

You can import all requests to use with Insomnia by clicking here.

Deploying

To deploy this example, you just need to type now. It is advised to take a look at now secrets.

Disclaimer

This is not a good example of a microsservice application. The API specification is too tightly coupled. It means that we have too much dependency to justify having more than one service, an example of this would be when accessing /articles/feed, where we need to join users with articles in a very sensitive way. For now we are not separating this big service into smaller one, but it is possible to add more services like "email", "images", "auth", etc.

Your feedback is appreciated!