Skip to content

Commit

Permalink
Merge pull request #16 from lokappio/feat-reviewer-and-status
Browse files Browse the repository at this point in the history
Feat reviewer and status
  • Loading branch information
kwiky authored Mar 18, 2024
2 parents 14f0d10 + f5b49fa commit 5e5795c
Show file tree
Hide file tree
Showing 46 changed files with 9,361 additions and 18,033 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and publish image to Docker Packages

on:
push:
branches: ["main"]
branches: ["main", "feat-reviewer-and-status"]

env:
REGISTRY: ghcr.io
Expand All @@ -17,7 +17,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build and publish image to Docker Packages

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- run: npm ci
- run: npm run build --if-present
- run: npm run test:e2e
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:14 as builder
FROM node:18 as builder

# Create app directory
WORKDIR /app
Expand All @@ -10,8 +10,8 @@ COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:14-alpine
FROM node:18-alpine
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package*.json ./
COPY --from=builder /app/dist ./dist
CMD [ "npm", "run", "start:prod"]
CMD [ "npm", "run", "start:prod"]
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ A Postman's collection can be found [here](postman-collection/).

To try out our product, you can use our [demo](https://demo.lokapp.io).

## Database model

![Database Diagram](./documentation/database-model.png)

## License

Distributed under the Apache 2.0 License. See `LICENSE` for more information.
Expand Down
Binary file added documentation/database-model.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
91 changes: 91 additions & 0 deletions documentation/database-model.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
@startuml
!include dbdiagramtheme.puml

table( projects ) #header:07198C {
primary_key( id, integer )
column( name, "character varying", true )
column( description, "character varying" )
column( color, "character varying", true )
column( createdAt, timestamp, true )
column( updatedAt, timestamp, true )
}

table( users ) #header:F39C1B {
primary_key( id, "character varying" )
column( username, "character varying" )
column( email, "character varying", true )
column( createdAt, timestamp, true )
column( updatedAt, timestamp, true )
}

table( invitations ) #header:F39C1B {
primary_key( id, integer )
foreign_key( projectId, integer )
foreign_key( ownerId, "character varying" )
foreign_key( guestId, "character varying" )
column( role, "character varying", true )
column( createdAt, timestamp )
column( sourceLanguagesIds, "character varying" )
column( targetLanguagesIds, "character varying" )
}

table( users_projects ) #header:F39C1B {
primary_key( projectId, integer )
primary_key( userId, "character varying" )
column( role, "character varying", true )
column( createdAt, timestamp )
column( sourceLanguagesIds, "character varying" )
column( targetLanguagesIds, "character varying" )
}

table( groups ) {
primary_key( id, integer )
foreign_key( projectId, integer, false )
column( name, "character varying", true )
column( createdAt, timestamp, true )
column( updatedAt, timestamp, true )
}

table( project_languages ) {
primary_key( id, integer )
foreign_key( projectId, integer )
column( name, "character varying", true )
column( createdAt, timestamp, true )
column( updatedAt, timestamp, true )
column( isRtl, boolean, true )
}

table( translation_keys ) #header:C0392A {
primary_key( id, integer )
foreign_key( projectId, integer )
foreign_key( groupId, integer, false )
column( name, "character varying", true )
column( isPlural, boolean, true )
column( createdAt, timestamp, true )
column( updatedAt, timestamp, true )
}

table( translation_values ) #header:C0392A {
primary_key( id, integer )
column( name, "character varying", true )
column( quantityString, "character varying", true )
column( createdAt, timestamp, true )
column( updatedAt, timestamp, true )
foreign_key( keyId, integer )
foreign_key( languageId, integer )
column( status, "character varying", true )
}

invitations::ownerId }|-- users::id
invitations::guestId }|-- users::id
invitations::projectId }|-- projects::id
users_projects::userId }|-- users::id
users_projects::projectId }|-- projects::id
groups::projectId }|-- projects::id
translation_keys::groupId }|-- groups::id
translation_keys::projectId }|-- projects::id
project_languages::projectId }|-- projects::id
translation_values::keyId }|-- translation_keys::id
translation_values::languageId }|-- project_languages::id

@enduml
41 changes: 41 additions & 0 deletions documentation/dbdiagramtheme.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
@startuml
left to right direction
skinparam roundcorner 10
skinparam shadowing false
skinparam handwritten false
skinparam BackgroundColor #44444D
skinparam class {
FontColor white
AttributeFontColor white
BackgroundColor #38383F
ArrowColor white
BorderColor #38383F
HeaderBackgroundColor #232323
HeaderFontStyle bold
}

!define table(x) entity x << (T, white) >>

!function primary_key($name, $type, $nonnull=true)
!$nn = ""
!if ($nonnull == true)
!$nn = "<<NN>>"
!endif
!return "<b><color:#b8861b><&key></color> " + $name + ": " + $type + " <<PK>> " + $nn + "</b>"
!endfunction
!function foreign_key($name, $type, $nonnull=true)
!$nn = ""
!if ($nonnull == true)
!$nn = "<<NN>>"
!endif
!return "<color:#aaaaaa><&key></color> " + $name + ": " + $type + " <<FK>> " + $nn
!endfunction
!function column($name, $type, $nonnull=false)
!$nn = ""
!if ($nonnull == true)
!$nn = "<<NN>>"
!endif
!return "<color:#efefef><&media-record></color> " + $name + ": " + $type + " " + $nn
!endfunction

@enduml
Loading

0 comments on commit 5e5795c

Please sign in to comment.