Giter VIP home page Giter VIP logo

club-event-calendar-api's Introduction

Club Event Calendar API

Code Style: Google

Repository for Club Event Calendar Backend API. Originally built for Busan Developers Club (BGM): BusanDevelopers/BGM-Event-Calendar-API

Refer API Document for supporting API list and features.
Refer this Repository for Frontend webpage.

Scripts

Here is the list for supported npm/yarn scripts. These are used to lint, test, build, and run the code.

  1. lint: lint the code
  2. lint:fix: lint the code and try auto-fix
  3. build: compile typescript codes (destination: dist directory)
  4. clean: remove the compiled code
  5. start: run the codes (Need following Environment Vairables: DB_ENDPOINT, DB_KEY, DB_ID)
  6. test: Run the codes
  7. newAdmin: Register new admin account (Need three CLA - username, password, admin's name)
  8. deleteAdmin: remove admin account (Need one CLA - username)

Use Azure Cosmos DB Emulator while testing the application. Details on install and usage guide of the emulator can be found here.
Microsoft also offers Linux Docker image, but due to the severe performance issue, we recomment to run the emulator on Windows. In this case, developers have to manually enable access on a local network. Refer to the guide provided above.

As of now, Windows Worker of GitHub Action does not support Service Container. Therefore, Azure Cosmos DB Emulator cannot run on the GitHub Action Worker. So, automatic tests are disabled; Need manual test and code review for all features before pull request merge.

Dependencies/Environment

Developed and tested with Ubuntu 20.04.3 LTS and Node v16.13.1.

To configure the typescript development environment easily, gts has been used. Based on the gts style rules, I modified some to enforce rules more strictly. To see the modification, please check .eslintrc.json file.

This project uses Azure Cosmos DB (Core(SQL) API).
It is NoSQL Database without schema; The stored data will look like the Data Diagram located below.

Data Diagram ERD.png

Click to see configurations of each collection.

Configuration of admin Collection

{
  id: 'admin',
  indexingPolicy: {
    indexingMode: 'consistent',
    automatic: true,
    includedPaths: [{path: '/session/token/?'}],
    excludedPaths: [{path: '/*'}, {path: '/"_etag"/?'}],
  },
}

Configuration of event Collection

{
  id: 'event',
  indexingPolicy: {
    indexingMode: 'consistent',
    automatic: true,
    includedPaths: [{path: '/date/?'}],
    excludedPaths: [{path: '/*'}, {path: '/"_etag"/?'}],
  },
}

Configuration of participation Collection

{
  id: 'participation',
  partitionKey: {paths: ['/eventId']},
  uniqueKeyPolicy: {
    uniqueKeys: [{paths: ['/eventId', '/participantName', '/email']}],
  },
  indexingPolicy: {
    indexingMode: 'consistent',
    automatic: true,
    includedPaths: [
      {path: '/eventId/?'},
      {path: '/participantName/?'},
      {path: '/email/?'},
    ],
    excludedPaths: [{path: '/*'}, {path: '/"_etag"/?'}],
  },
}

Express is a web framework for node.js. This project used it to develop and maintain APIs more conveniently.

ajv is used for runtime type checks.

club-event-calendar-api's People

Contributors

hyecheol123 avatar

Stargazers

 avatar

Watchers

 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.