Skip to content

Open Hackathon Platform API service v6 based on Node.js, Koa 2, Routing Controllers & TypeORM

Notifications You must be signed in to change notification settings

kaiyuanshe/OpenHackathon-service

Repository files navigation

Open Hackathon Platform - API service

RESTful API service scaffold based on Node.js & TypeScript, which is a reimplement of OHP API service v4.

Deploy to Production environment

Deploy to Render

Open in GitHub Codespaces Open in Gitpod

Technology stack

  1. HTTP server: Koa
  2. Controller framework: Routing Controllers
  3. Model framework: Class Transformer & Class Validator
  4. ORM framework: TypeORM
  5. API document: Swagger
  6. Mock API: OpenAPI backend
  7. Test framework: Jest

Major features

  1. API entry & Health checking
  2. User management
    1. Session
    2. OAuth sign in
    3. Platform Admin
  3. Activity logging
  4. Hackathon management
    1. Meta
    2. Staff
    3. Organizer
    4. Announcement
    5. Git template
    6. Questionnaire & Standard
    7. Enrollment
  5. Team management
    1. Meta
    2. Member
    3. Work
    4. Evaluation

Best practice

  1. Install GitHub apps in your organization or account:

    1. Probot settings: set up Issue labels & Pull Request rules
    2. PR badge: set up Online VS Code editor entries in Pull Request description
  2. Click the Use this template button on the top of this GitHub repository's home page, then create your own repository in the app-installed namespace above

  3. Click the Open in GitHub codespaces button on the top of ReadMe file, then an online VS Code development environment will be started immediately

  4. Recommend to add a Notification step in GitHub actions for your Team IM app

  5. Remind the PMs & users of your product to submit Feature/Enhancement requests or Bug reports with Issue forms instead of IM messages or Mobile Phone calls

  6. Collect all these issues into Project kanbans, then create Pull requests & add closes #issue_number into its description for automation

API Usage

Environment variables

Name Usage
JWT_SECRET encrypt Password & Token
DATABASE_URL PostgreSQL connection string

Development

Installation

npm i pnpm -g
pnpm i

Start Development environment

pnpm dev

or just press F5 key in VS Code.

Migration

pnpm upgrade:dev

Deployment

Start Production environment

npm start

Migration

pnpm upgrade:pro

Docker

pnpm pack-image
pnpm container

Releasing

Deploy Application

git checkout master
git tag v1.0.0  # this version tag comes from ./package.json
git push origin master --tags

Publish Type Package

git checkout master
git tag type-v1.0.0  # this version tag comes from ./type/package.json
git push origin master --tags

About

Open Hackathon Platform API service v6 based on Node.js, Koa 2, Routing Controllers & TypeORM

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages