Skip to content

Commit

Permalink
Tml 11 (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
harrytran998 authored May 10, 2024
1 parent ea5d548 commit 8e43fa8
Show file tree
Hide file tree
Showing 19 changed files with 146 additions and 174 deletions.
10 changes: 0 additions & 10 deletions .husky/commit-msg

This file was deleted.

23 changes: 0 additions & 23 deletions .husky/prepare-commit-msg

This file was deleted.

2 changes: 1 addition & 1 deletion .moon/hooks/commit-msg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ set -eo pipefail
# Automatically generated by moon. DO NOT MODIFY!
# https://moonrepo.dev/docs/guides/vcs-hooks

echo "commit msg"
scripts/git/commit-msg.sh

8 changes: 8 additions & 0 deletions .moon/hooks/post-checkout.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -eo pipefail

# Automatically generated by moon. DO NOT MODIFY!
# https://moonrepo.dev/docs/guides/vcs-hooks

scripts/git/post-checkout.sh

2 changes: 1 addition & 1 deletion .moon/hooks/pre-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ set -eo pipefail
# Automatically generated by moon. DO NOT MODIFY!
# https://moonrepo.dev/docs/guides/vcs-hooks

echo "pre commit msg"
scripts/git/pre-commit.sh

2 changes: 1 addition & 1 deletion .moon/hooks/pre-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ set -eo pipefail
# Automatically generated by moon. DO NOT MODIFY!
# https://moonrepo.dev/docs/guides/vcs-hooks

echo "pre push"
scripts/git/pre-push.sh

2 changes: 1 addition & 1 deletion .moon/hooks/prepare-commit-msg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ set -eo pipefail
# Automatically generated by moon. DO NOT MODIFY!
# https://moonrepo.dev/docs/guides/vcs-hooks

echo "prepare commit msg"
scripts/git/commit-msg.sh

6 changes: 0 additions & 6 deletions .moon/tasks/typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,12 @@ tasks:
- "tsconfig.*.json"
- "/tsconfig.base.json"

lint-useless:
command:
- "knip"
local: true

lint:
command: "noop"
deps:
- lint-biome
- lint-circular
- lint-typecheck
- lint-useless

test:
command:
Expand Down
47 changes: 0 additions & 47 deletions Makefile

This file was deleted.

59 changes: 50 additions & 9 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
# https://github.com/sagiegurari/cargo-make

extend = [
{ path = "scripts/api.toml" },
{ path = "scripts/generate.toml" },
{ path = "scripts/git.toml" },
{ path = "scripts/migration.toml" },
{ path = "scripts/mobile.toml" },
# { path = "scripts/api.toml" },
# { path = "scripts/generate.toml" },
# { path = "scripts/migration.toml" },
# { path = "scripts/mobile.toml" },
# { path = "scripts/protobuf.toml" },
# { path = "scripts/docker.toml" },
{ path = "scripts/docker.toml" },
# { path = "scripts/env.toml" },
{ path = "scripts/tests.toml" },
{ path = "scripts/tool.toml" },
{ path = "scripts/web.toml" },
# { path = "scripts/tests.toml" },
# { path = "scripts/tool.toml" },
# { path = "scripts/web.toml" },
]

[config]
Expand All @@ -24,3 +23,45 @@ CARGO_PROFILE = "dev"
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
# CARGO_MAKE_CRATE_FS_NAME = "dart_ffi"
# CARGO_MAKE_CRATE_NAME = "dart-ffi"

# lint-useless:
# command:
# - "knip"
# local: true

# build:
# bun run nx run-many -t build -p

# dev:
# bun run nx run-many -t dev


# lint.useless:
# bun run knip

# test.unit:
# bun run vitest --passWithNoTests

# test.unit.coverage:
# bun run vitest --coverage.all

# test.unit.run:
# bun run vitest run --passWithNoTests

# migration.add:
# node scripts/generateMigrateFileApi.mjs

# migration.run:
# bun run tsx scripts/migrate-db.ts

# docker.build:
# bun run nx run-many -t docker.build

# docker.storage:
# bun run nx run-many -t docker.storage

# docker.up:
# bun run nx run-many -t docker.up

# clean:
# bun run nx run-many -t clean -p
52 changes: 3 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,54 +102,8 @@ _Focus on coding, not publishing._
- Code Snippets say goodbye to the boilerplate
- Team Management manage your team & their permissions

This project mainly write with Typescript + Vue + Rust, so you should learn it to contribute easier 🌷
This project mainly write with React Typescript + Flutter + Rust, so you should learn it to contribute easier 🌷

## How to run project
### Setup + Run projects

1. Install deps `bun install`
1. Run web site + api with command `bun run dev`
1. Have fun with that.

## How to get the icons for project?

1. Go to `https://icones.js.org/collection/all` and search what you needs.
2. Copy the symbol of icons
3. If your icon just specific for one page --> Create a list icons for that page in `/public/svg` folder --> Add page name, EX: post.svg
4. If your icon is a common icon, can use anywhere in app --> add to the last item on `public/svg/common.svg`
5. Use `SvgUse` component to expose the icon on view

## The decided of technical to fit with the business

1. The width of detail blog post

- With the research --> We chosen the width is around 70~80 characters depends on the user-device width + The main language is LATIN(Vietnamese + English).
- So the width is `34rem` to `38rem`.

Here is some research paper:

- <https://baymard.com/blog/line-length-readability>

2.

## Thirst party API

- <https://developers.google.com/youtube/v3/docs/?apix=true>

## Deployment

### Self-host Docker Deployment

1. checkout source `git clone https://github.com/techmely/techmely.git`
1. got into new source dir: `cd tech`
1. build Docker image: `docker build .`
1. create local storage directory for settings: `mkdir tml-storage`
1. adjust permissions of storage dir: `sudo chown 911:911 ./tml-storage`
1. start container: `docker-compose up -d`

```sh
git clone https://github.com/techmely/techmely.git
cd techmely
bun run docker.build # build Docker image for all app
bun run docker.storage # create local storage directory + adjust permissions of storage dir
bun run docker.up # Start container - Enjoy
```
Go to document "apps/handbook/3.products/1.techmely.md" or `https://www.teams.techmely.com/products/techmely`
4 changes: 2 additions & 2 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"url": "https://github.com/techmely"
},
"dependencies": {
"@aws-sdk/client-s3": "3.569.0",
"@aws-sdk/s3-request-presigner": "3.569.0",
"@aws-sdk/client-s3": "3.572.0",
"@aws-sdk/s3-request-presigner": "3.572.0",
"@techmely/auth": "^1.0.1",
"@techmely/cache": "1.0.9",
"@techmely/domain-driven": "1.0.3",
Expand Down
51 changes: 51 additions & 0 deletions apps/handbook/3.products/1.techmely.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Techmely

## How to run project

1. Install deps `bun install`
1. Run web site + api with command `bun run dev`
1. Have fun with that.

## How to get the icons for project?

1. Go to `https://icones.js.org/collection/all` and search what you needs.
2. Copy the symbol of icons
3. If your icon just specific for one page --> Create a list icons for that page in `/public/svg` folder --> Add page name, EX: post.svg
4. If your icon is a common icon, can use anywhere in app --> add to the last item on `public/svg/common.svg`
5. Use `SvgUse` component to expose the icon on view

## The decided of technical to fit with the business

1. The width of detail blog post

- With the research --> We chosen the width is around 70~80 characters depends on the user-device width + The main language is LATIN(Vietnamese + English).
- So the width is `34rem` to `38rem`.

Here is some research paper:

- <https://baymard.com/blog/line-length-readability>

2.

## Thirst party API

- <https://developers.google.com/youtube/v3/docs/?apix=true>

## Deployment

### Self-host Docker Deployment

1. checkout source `git clone https://github.com/techmely/techmely.git`
1. got into new source dir: `cd tech`
1. build Docker image: `docker build .`
1. create local storage directory for settings: `mkdir tml-storage`
1. adjust permissions of storage dir: `sudo chown 911:911 ./tml-storage`
1. start container: `docker-compose up -d`

```sh
git clone https://github.com/techmely/techmely.git
cd techmely
bun run docker.build # build Docker image for all app
bun run docker.storage # create local storage directory + adjust permissions of storage dir
bun run docker.up # Start container - Enjoy
```
Loading

0 comments on commit 8e43fa8

Please sign in to comment.