Skip to content

caravanapp-ca/caravanapp-ca

Repository files navigation

Caravan Clubs logo

Read great books. Meet cool people. Exchange big ideas.

Start by browsing and joining existing clubs, or by creating your own club!


Caravan Clubs helps facilitate online book clubs and communities. All communication within your clubs and other channels exist on Discord. The Caravan Clubs website helps you and your buddies manage the Discord channels.

📖 Getting Started

This monorepo contains all of the code for the Caravan Clubs website and services. Everything you need to develop for Caravan Clubs is available here.

🔨 Requirements

Use Visual Studios Code as an IDE. The project contains several VSCode configurations to support development including auto-formatting with Prettier, auto-fixing with TypeScript ESLint, and launch configurations.

Open the project as a VSCode Workspace: File -> Open Workspace... -> Select caravan.code-workspace.

Windows, MacOS, and Linux are supported (though the core team uses Mac).

The current approach to development involves using Docker with docker-compose to host a MongoDB 4.x server. Then, use your host machine to run both the Node.js Express app server and the React website.

  • Docker >= 18.06.0 (support for docker-compose v3.7)
  • Yarn >= v1 (support for Workspaces)
  • Node.js >= 16.6 (12.x is required for the cloud-functions sub-project, so we suggest to use NVM if you're working with cloud-functions)

⏳ Installation

MongoDB with Docker

Open the terminal relative to the root of the project and run:

docker-compose up

Node.js Express app server

There's three ways to run the app server (in order of personal preference):

With breakpoint support

Open the terminal relative to the root of the project and run:

cd packages/web-api
yarn dev:watch

Without breakpoint support

Open the terminal relative to the root of the project and run:

cd packages/web-api
yarn dev

Using docker-compose

If you prefer to run the Express server in Docker you can un-commenting out the appropriate section in docker-compose.yml. This option is not recommended if you do development on the host machine.

Caravan Website

Open the terminal relative to the root of the project and run:

cd packages/web
yarn start

Visit the website at http://localhost:3000 and voilà, you're done!

❗️ Logging in while in development

There's a known inconvenience while developing. Upon authenticating with Discord, you will be taken to http://localhost:3001/?state=SomeRandomSecretToken=. You must manually change the port from 3001 to 3000 in your browser, i.e.: http://localhost:3000/?state=SomeRandomSecretToken=. You should then be logged in. If you're still not logged in, try refreshing and logging in again.

🤓 Community Support

For general help using or developing Caravan Clubs, you can use one of these channels to ask a question:

🚓 Security

If you have found a security issue, please refer to the security guidelines.

📓 License

MIT License Copyright (c) 2021 Caravan Clubs