/multi-dreams

A multi-tenant dreams platform

Primary LanguageJavaScriptGNU Affero General Public License v3.0AGPL-3.0

Dreams

Building a multi-tentant dreams platform

Tech stack

The project consists of two parts:

  • /api: a GraphQL API built with Node.js, MongoDB and Apollo Server
  • /ui: a front-end application built with React and Next.js

Everything on master is automatically deployed to Now as dreams.wtf

Development

Prerequisites

  • Install and run Docker-compose
  • Install Node.js version >= 12.
    • Or run nvm use in this directory
  • Install dependencies: npm i
    • This also installs dependencies in /ui and /api
  • Copy .env.default to .env

Running the project

Option 1

Run the whole stack (db + code) from the root with:

npm run dev

Option 2

Run the mongo db and the code separately using 2 terminals::

npm run db:up
npm start

This last command calls now dev.

This builds and serves both the API and the UI with one command, and provides hot reloading. now dev simulates the serverless deployment platform Now where the project is deployed.

Resetting the db to its initial state

While the db is running, in a new terminal:

npm run db:reset

Using the local mongodb admin UI

Just visit http://localhost:8081

License

Released under the AGPLv3+ which is included in the file LICENSE in the git repository