chikeozulumba / railway-assessment-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description

GraphQL API uilt for Railway assessment project (RunThrough) using the NestJS framework based on JavaScript/TypeScript.

Stack

  • Node - TypeScript/Javascript
  • MongoDB - Data storage usign replica sets (using either MongoDB Atlas or run run-rs locally)
  • Redis - for cache and background queues
  • Apollo GraphQL - For handling requests to Railway GraphQL API server
  • Prisma - Database ORM
  • Clerk - NextJS Authentication

Prerequisite

Ensure you have a MongoDB repllica set running locally or you can make use of MongoDB Atlas. Make use of run-rs to enable you run the MongoDB server you have locally on your machine as a replica set. Also ensure you have Clerk setup and have installed the environment variables as provided in the .env.example file.

Installation

# Install dependencies
$ pnpm install

# Generate and transform Prisma models into GraphQL types - found in src/models
$ pnpm prisma generate

Running the app

# development
$ pnpm run start

# watch mode
$ pnpm run start:dev

# production mode
$ pnpm run start:prod

Build

The application has a Dockerfile to enable you build and deploy on any container enabled service.

# build only
$ pnpm run build

Deployment

The application source code is currently delpoyed at Railway under the domain api.yourwish.app

About


Languages

Language:TypeScript 98.1%Language:Dockerfile 1.2%Language:JavaScript 0.7%