Skip to content

DMikaia/RideTogether-Server

Repository files navigation

Ride Together

preview

This is the server part of my team's school project called Ride Together (carpooling web application). The purpose of this application is to help people find carpooling offer easily.

Content

Features

Here are the current features right now:

  • Basic authentication with Firebase
  • Data caching with Redis
  • User (create, update, getOne)
  • Offer (creation, update, get, getAll)
  • Review (creation, update, delete, getAll)
  • Room (getAll)
  • Live chat using websocket (Not scalable yet)

Prerequisites

Note

Using pgAdmin is optional, you can modify the docker-compose.yml file to add the new postgresql service and use prisma to view the database.

# command
$ npx prisma studio

To be able to run the app you'll need to install:

Installation

# command
$ npm install

# redis stack contrainer
$ docker-compose up -d

Environment

# PostgreSQL database
DATABASE_URL=

# Firebase variables
TYPE=
PROJECT_ID=
PRIVATE_KEY_ID=
PRIVATE_KEY=
CLIENT_EMAIL=
CLIENT_ID=
UTH_URI=
TOKEN_URI=
AUTH_CERT_URL=
CLIENT_CERT_URL=
UNIVERSAL_DOMAIN=

# Redis
REDIS_HOST=
REDIS_PORT=
REDIS_PASSWORD=

Running the app

Important

You'll also need to configure the firebase project and add authentication (e-mail and password) and storage, otherwise image authentication and storage won't work properly on either the server or client side. If you are not yet familiar with firebase, check out the documentation.

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Testing

Warning

At the moment, the tests are not available, so I've yet to implement them.

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov