GithubHelp home page GithubHelp logo

anilshanker / cougarcs-backend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cougarcs/cougarcs-backend

0.0 0.0 0.0 9.56 MB

An Express API to service the CougarCS website.

JavaScript 99.06% Dockerfile 0.94%

cougarcs-backend's Introduction

CougarCS Backend

Offical backend of CougarCS.



Known Vulnerabilities Coverage

Libraries

Getting Started

  • Requirements

    • NodeJS version 12+
    • We use Yarn as our package manager
  • Installation

    • Install dependencies: yarn
    • Start local server: yarn server
    • The local server will start on http://localhost:4000
  • ENV Setup:

    • If you want to test out the payment or the reCAPTCHA, create a .env file in the root project folder.
    • You must have a Stripe, Google's reCAPTCHA, and SendGrid accounts.
    • In the .env file include these:
      SENDGRID_API_KEY
      CALENDAR_ID
      CALENDAR_API_KEY
      SHEET_API
      RECAPTCHA_SECRET_KEY
      STRIPE_API_KEY
      SENTRY_URL
      SEND_EMAIL
      INGESTION_KEY
      NOTION_TOKEN
      NOTION_TUTOR_DB
      COUGARCS_CLOUD_URL
      COUGARCS_CLOUD_ACCESS_KEY
      COUGARCS_CLOUD_SECRET_KEY
    
  • Linting

    • We use ESLint to fix styling and to enforce rules.
    • Run yarn run eslint-check to check linting issues in the code.
    • Run yarn run eslint-fix to auto-lint the code.
    • ESLint runs on Github Action. ESLint must pass before pushing or during a pull request.
  • Testing

    • We use Jest to do Unit testing.
    • We use Supertest to do intergeration test.
    • To run the tests locally:
      • Run yarn test
    • To test the coverage of the code:
      • Run yarn test:coverage
    • The tests are part of the CI/CD pipeline, if the test fails the CI/CD fails
    • The test coverage has to be 90% or greater and the coverage cannot drop below 5% for a PR or a push.
    • We use Coveralls to track the coverage.
  • Project Structure

    • server.js is the starting point of the application
    • src/api/routes/ has the routes of the applications
    • src/config/app.js sets up the middlewares
    • src/utils/api/calls.js has the api logic
    • src/utils/ has config for logger and Prometheus
    • test has the unit and the intergeration test

cougarcs-backend's People

Contributors

crudemandarin avatar dependabot[bot] avatar kevflo avatar mend-bolt-for-github[bot] avatar renovate-bot avatar renovate[bot] avatar shubhsheth avatar snyk-bot avatar vyas0189 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.