Skip to content

Repository files navigation

ModCom 10 Logo

⚽️ ModCom 10 - WhoAmI 🧐

The official Monorepo for the ModCom 10 - WhoAmI website.

Node.js TypeScript pnpm Express.js Prisma TypeORM PostgreSQL Microsoft OAuth React Email Nodemailer Supabase Biome Husky Docker Docker Compose Traefik Watchtower GitHub Container Registry Next.js React NestJS Tailwind CSS Better Auth Turborepo RustFS

Stacks

  • Node.js
  • pnpm
  • Turborepo
  • NextJS
  • Tailwind CSS
  • Motion
  • NestJS (base on Express.js)
  • TypeScript
  • Supabase (postgreSQL)
  • Prisma
  • JWT
  • Docker
  • Docker compose
  • Better Auth
  • RustFS (S3 Compatible Object Storage)
  • GitHub Container Registry (GHCR)

Prepare Project

  • Clone this repository : git clone https://github.com/cpe-kmutt-student/modcom-10-whoami.git
  • Install Dependencies : pnpm install (pnpm recommend)
  • Config .env by rename or copy from .env.example
  • generate prisma client : pnpm run generate

DB Migration

  • Run Generate : pnpm run generate
  • Run Migration : pnpm run db:migratedev
  • Reset and Re-run Migration : cd ./apps/api && pnpm exec prisma migrate reset

Commit rules

  • feat – New feature
  • fix – Bug fix
  • perf – Performance improvement
  • refactor – Code change without behavior change
  • style – Code style only (no logic change)
  • test – Add or update tests
  • docs – Documentation only
  • build – Build system or dependencies
  • chore – Maintenance tasks
  • ci – CI/CD configuration
  • revert – Revert previous commit

Start Dev

  • Run Dev Server : pnpm run dev

Start Prod

  • Run Prod Project on docker (Build from source) : docker compose -f docker-compose.dev.yml up --build -d
  • Run Prod Project on docker (Pull from GHCR (Recommended)) : docker compose up -d

DB-Diagram (Final)

Open on DB Diagram

DB Diagram

API Flow Design (Prototype)

No Design

Reference & Endpoint & Port

  • Web Server : http://localhost:3000
  • API Server : http://localhost:3010
  • Mentor Web Server : http://localhost:3005
  • Better-Auth : http://localhost:3010/api/auth
  • Docs (Better Auth) : http://localhost:3010/api/auth/reference

Object Storage Server (S3 Complatible)

  • Region : us-east-1 dunt no y
  • Endpoint : https://s3.aboutnon.in.th
  • Console : https://s3.aboutnon.in.th/rustfs/console

วิธีติดตั้ง Deps อื่นๆ

ติดตั้ง dependency เฉพาะ workspace ที่ต้องการ โดยใช้คำสั่งดังนี้
pnpm install [dep] --filter [workspace]
dep: ชื่อของ dependency ที่ต้องการติดตั้ง workspace: ชื่อของ workspace ที่ต้องการติดตั้ง dependency เช่น @repo/my-workspace


ติดตั้ง dependency ที่ root
pnpm install [dep] -w
dep: ชื่อของ dependency ที่ต้องการติดตั้ง


การเรียกใช้งาน Package

ในไฟล์ `package.json` ของแต่ละ workspace จะมีการกำหนดชื่อ package ไว้ที่ `name` ซึ่งสามารถเรียกใช้งานได้ดังนี้
import { functionName } from '@repo/my-workspace'

การ import เข้า dependencies ใน package.json ของ workspace อื่นๆ สามารถทำได้ดังนี้
pnpm add @repo/my-workspace --filter [workspace]
workspace: ชื่อของ workspace ที่ต้องการติดตั้ง dependency เช่น @repo/my-workspace

Cr.

Made with 💚 by CPE39

About

พี่รหัสน้องคือใครเอ่ยยยยยยย 🤨🤔

Resources

Stars

3 stars

Watchers

0 watching

Forks

Contributors

Languages