Skip to content

Open-Source-Bazaar/ActivityHub-service

Repository files navigation

ActivityHub-service

开源的活动筹办系统,基于 KoaTypeScript 和 的 Node.js RESTful API 项目。

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

主要特性

  1. API entry & Health checking
  2. User & Session
    • Email OTP (One Time Password)
  3. OAuth sign in
  4. WebAuthn sign in
  5. Activity logging
  6. File object storage

数据模型

第一版

办完一场小型免费活动的建模,且兼容后续大中型活动的数据结构:

  • User 组织者、讲师、合作方联系人、志愿者等

  • Organization 主办、协办、场地、赞助、媒体、展商等

  • Membership 组织关系(User 与 Organization)

  • Place 会场(会议室、教室、咖啡馆等)

  • Activity 小型沙龙、中型活动、大型会议

  • Cooperation 合作关系(Activity 与 Organization)

  • Session 活动环节(演讲、实训等)

  • Agenda 环节申报(Activity 与 Session)

  • Ticket 门票类别(单 Activity、多 Session)

  • TicketOrder 门票订单(User 与 Ticket)

  • CheckEvent 环节打卡(User 与 Agenda)

第二版

  • Track 分会场、议程轨(相当于分类)

  • Exhibition 外场展位

  • Material 物料

  • Account 账目(赞助、差旅、物料、门票等)

  • Feedback 活动反馈(多 Session、多 Exhibition)

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
APP_SECRET encrypt Password & Token
DATABASE_URL PostgreSQL connection string
SUPABASE_PROJECT_URL Supabase project URL
SUPABASE_ANON_KEY Supabase anon key
AWS_S3_END_POINT AWS S3 endpoint URL
AWS_S3_BUCKET AWS S3 bucket name
AWS_S3_ACCESS_KEY_ID AWS S3 access key id
AWS_S3_SECRET_ACCESS_KEY AWS S3 secret access key
AWS_S3_PUBLIC_HOST AWS S3 public host

本地开发

Installation

npm i pnpm -g
pnpm i

Start Development environment

pnpm dev

or just press F5 key in VS Code.

Migration

pnpm upgrade:dev

手动部署

Start Production environment

npm start

Migration

pnpm upgrade:pro

Docker

pnpm pack-image
pnpm container

自动发版

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

Activity Management System built as Node.js RESTful API based on Koa, TypeScript & LeanCloud

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages