Skip to content

jobstash/middleware

Repository files navigation

JobStash.xyz Middleware

This project is a NestJS server that sits in front of a Neo4J DB and handles queries and mutations.

Getting Started

Welcome to the team! Let's get you situated.
Here are the steps you need to take to get the project setup on your local development environment.

  • Download and run the nodejs runtime for your respective os from here
  • Setup nvm or any other Node Version Manager of your choice. Click me to see the nvm installation docs
  • Install the most recent lts release of node, 18.13.0 at the time of writing this, with the node version manager from the previous step. You can do with nvm by running nvm use 18.13.0
  • Clone the repo by clicking that nice green button that looks like this github-clone-button
  • Yarn is the preferred package manager for the project, you can install it with npm i -g yarn if you haven't already. To verify a correct installation run yarn --version
  • Run yarn install in the project root directory to install all dependencies
  • Run cp .env.example .env to setup the local env file for the project, don't worry the .gitignore file is already configured to ignore it. Fill it up with the appropriate info.
  • Run yarn start:dev to start the dev server and head over to http://localhost:8080 to access the app.
  • The documentation of the api is automatically available at http://localhost:8080/api when the server is started

P.S you can change the port the server listens on by setting the PORT env variable. By default it's set to 8080

Tech Stack

  • NestJS for the main server (REST style)
  • Neo4J DB
  • PassportJS for auth/oauth
  • Swagger for documentation
  • Prettier for code formatting

Versioning & Deployment

Automatic deploy workflows are setup to deploy the code to the server under specific conditions. We use Semver for our versioning and the versions are automatically determined by the semantic-release plugin which counts the number of commits that have certain keywords. see the Semver Spec for more info. For available versions see repo tags

IMPORTANT

  • Make sure to update the .env.example file anytime you add new env vars to the project
  • Commits messages are to follow the semver spec strictly
  • Please address linter warnings before pushing the code to the remote repo, all linter warnings will be treated as errors and will cause the checks to fail with errors.
  • Remember to update the readme if any changes are made.

Support

To discuss problems, shoot a message to the #discuss-problems channel on Slack