feat(monorepo): migrate to typescript monorepo
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
name: backend audit
|
name: api-legacy audit
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: projects/backend
|
working-directory: projects/api-legacy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
@@ -9,13 +9,13 @@ on:
|
|||||||
branches-ignore:
|
branches-ignore:
|
||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- "projects/backend/**"
|
- "../../basango/apps/api-legacy/**"
|
||||||
- ".github/workflows/backend_*.yaml"
|
- ".github/workflows/backend_*.yaml"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- "projects/backend/**"
|
- "../../basango/apps/api-legacy/**"
|
||||||
- ".github/workflows/backend_*.yaml"
|
- ".github/workflows/backend_*.yaml"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -39,7 +39,7 @@ jobs:
|
|||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ env.COMPOSER_CACHE_DIR }}
|
path: ${{ env.COMPOSER_CACHE_DIR }}
|
||||||
key: php8.4-composer-${{ hashFiles('projects/backend/composer.lock') }}
|
key: php8.4-composer-${{ hashFiles('projects/api-legacy/composer.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
php8.4-composer-latest-
|
php8.4-composer-latest-
|
||||||
- name: Update composer
|
- name: Update composer
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
name: backend deploy
|
name: api-legacy deploy
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: projects/backend
|
working-directory: projects/api-legacy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- "projects/backend/**"
|
- "../../basango/apps/api-legacy/**"
|
||||||
- ".github/workflows/backend_*.yaml"
|
- ".github/workflows/backend_*.yaml"
|
||||||
jobs:
|
jobs:
|
||||||
audit:
|
audit:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
name: backend quality
|
name: api-legacy quality
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: projects/backend
|
working-directory: projects/api-legacy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
@@ -9,13 +9,13 @@ on:
|
|||||||
branches-ignore:
|
branches-ignore:
|
||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- "projects/backend/**"
|
- "../../basango/apps/api-legacy/**"
|
||||||
- ".github/workflows/backend_*.yaml"
|
- ".github/workflows/backend_*.yaml"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- "projects/backend/**"
|
- "../../basango/apps/api-legacy/**"
|
||||||
- ".github/workflows/backend_*.yaml"
|
- ".github/workflows/backend_*.yaml"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -39,7 +39,7 @@ jobs:
|
|||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ env.COMPOSER_CACHE_DIR }}
|
path: ${{ env.COMPOSER_CACHE_DIR }}
|
||||||
key: php8.4-composer-${{ hashFiles('projects/backend/composer.lock') }}
|
key: php8.4-composer-${{ hashFiles('projects/api-legacy/composer.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
php8.4-composer-latest-
|
php8.4-composer-latest-
|
||||||
- name: Update composer
|
- name: Update composer
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
name: backend tests
|
name: api-legacy tests
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: projects/backend
|
working-directory: projects/api-legacy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
@@ -9,13 +9,13 @@ on:
|
|||||||
branches-ignore:
|
branches-ignore:
|
||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- "projects/backend/**"
|
- "../../basango/apps/api-legacy/**"
|
||||||
- ".github/workflows/backend_*.yaml"
|
- ".github/workflows/backend_*.yaml"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- "projects/backend/**"
|
- "../../basango/apps/api-legacy/**"
|
||||||
- ".github/workflows/backend_*.yaml"
|
- ".github/workflows/backend_*.yaml"
|
||||||
jobs:
|
jobs:
|
||||||
functional:
|
functional:
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ defaults:
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- "projects/mobile/**"
|
- "../../basango/apps/mobile/**"
|
||||||
- ".github/workflows/mobile_*.yaml"
|
- ".github/workflows/mobile_*.yaml"
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- "projects/mobile/**"
|
- "../../basango/apps/mobile/**"
|
||||||
- ".github/workflows/mobile_*.yaml"
|
- ".github/workflows/mobile_*.yaml"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
+43
-64
@@ -1,10 +1,50 @@
|
|||||||
|
node_modules
|
||||||
|
.pnp
|
||||||
|
.pnp.js
|
||||||
|
coverage
|
||||||
|
.next/
|
||||||
|
out/
|
||||||
|
next-env.d.ts
|
||||||
|
.expo/
|
||||||
|
dist/
|
||||||
|
build
|
||||||
|
.DS_Store
|
||||||
|
*.pem
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
.pnpm-debug.log*
|
||||||
|
|
||||||
|
.env.local
|
||||||
|
.env.*.local
|
||||||
|
.env.*.local.*
|
||||||
|
.vercel
|
||||||
|
*.tsbuildinfo
|
||||||
|
.turbo
|
||||||
|
|
||||||
|
storybook-static
|
||||||
|
tailwind.css
|
||||||
|
.branches
|
||||||
|
.temp
|
||||||
|
.trigger
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
pnpm-debug.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
dist
|
||||||
|
dist-ssr
|
||||||
|
*.local
|
||||||
.idea
|
.idea
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
||||||
|
|
||||||
/data/
|
/data/
|
||||||
.deptrac.cache
|
.deptrac.cache
|
||||||
.nohup.out
|
.nohup.out
|
||||||
.*.out
|
.*.out
|
||||||
.DS_Store
|
|
||||||
###> symfony/framework-bundle ###
|
|
||||||
/.env.local
|
/.env.local
|
||||||
/.env.local.php
|
/.env.local.php
|
||||||
/.env.*.local
|
/.env.*.local
|
||||||
@@ -12,83 +52,22 @@
|
|||||||
/public/bundles/
|
/public/bundles/
|
||||||
/var/
|
/var/
|
||||||
/vendor/
|
/vendor/
|
||||||
###< symfony/framework-bundle ###
|
|
||||||
|
|
||||||
###> phpstan/phpstan ###
|
|
||||||
phpstan.neon
|
phpstan.neon
|
||||||
###< phpstan/phpstan ###
|
|
||||||
|
|
||||||
###> phpunit/phpunit ###
|
|
||||||
/phpunit.xml
|
/phpunit.xml
|
||||||
.phpunit.result.cache
|
.phpunit.result.cache
|
||||||
###< phpunit/phpunit ###
|
|
||||||
|
|
||||||
###> lexik/jwt-authentication-bundle ###
|
|
||||||
/config/jwt/*.pem
|
/config/jwt/*.pem
|
||||||
###< lexik/jwt-authentication-bundle ###
|
|
||||||
|
|
||||||
.idea/
|
.idea/
|
||||||
.vscode/
|
|
||||||
.ipynb_checkpoints/
|
.ipynb_checkpoints/
|
||||||
*.pyc
|
*.pyc
|
||||||
.env.local
|
|
||||||
.env.*.local
|
|
||||||
var/
|
var/
|
||||||
var/volumes/
|
var/volumes/
|
||||||
var/volums/
|
var/volums/
|
||||||
.DS_Store
|
|
||||||
|
|
||||||
# Python-generated files
|
# Python-generated files
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[oc]
|
*.py[oc]
|
||||||
build/
|
build/
|
||||||
dist/
|
|
||||||
wheels/
|
wheels/
|
||||||
*.egg-info
|
*.egg-info
|
||||||
|
.venv/
|
||||||
# Virtual environments
|
|
||||||
.venv
|
|
||||||
|
|
||||||
data/
|
|
||||||
|
|
||||||
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
|
|
||||||
|
|
||||||
# dependencies
|
|
||||||
node_modules/
|
|
||||||
|
|
||||||
# Expo
|
|
||||||
.expo/
|
|
||||||
dist/
|
|
||||||
web-build/
|
|
||||||
expo-env.d.ts
|
|
||||||
|
|
||||||
# Native
|
|
||||||
*.orig.*
|
|
||||||
*.jks
|
|
||||||
*.p8
|
|
||||||
*.p12
|
|
||||||
*.key
|
|
||||||
*.mobileprovision
|
|
||||||
|
|
||||||
# Metro
|
|
||||||
.metro-health-check*
|
|
||||||
|
|
||||||
# debug
|
|
||||||
npm-debug.*
|
|
||||||
yarn-debug.*
|
|
||||||
yarn-error.*
|
|
||||||
|
|
||||||
# macOS
|
|
||||||
.idea
|
|
||||||
.DS_Store
|
|
||||||
*.pem
|
|
||||||
|
|
||||||
# local env files
|
|
||||||
.env*.local
|
|
||||||
|
|
||||||
# typescript
|
|
||||||
*.tsbuildinfo
|
|
||||||
|
|
||||||
app-example
|
|
||||||
|
|
||||||
.env.local
|
|
||||||
|
|||||||
Vendored
+8
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"expo.vscode-expo-tools",
|
||||||
|
"bradlc.vscode-tailwindcss",
|
||||||
|
"expo.vscode-expo-tools",
|
||||||
|
"yoavbls.pretty-ts-errors"
|
||||||
|
]
|
||||||
|
}
|
||||||
Vendored
+30
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"editor.defaultFormatter": "biomejs.biome",
|
||||||
|
"[javascript]": {
|
||||||
|
"editor.defaultFormatter": "biomejs.biome"
|
||||||
|
},
|
||||||
|
"[typescript]": {
|
||||||
|
"editor.defaultFormatter": "biomejs.biome"
|
||||||
|
},
|
||||||
|
"[typescriptreact]": {
|
||||||
|
"editor.defaultFormatter": "biomejs.biome"
|
||||||
|
},
|
||||||
|
"editor.codeActionsOnSave": {
|
||||||
|
"quickfix.biome": "explicit",
|
||||||
|
"source.organizeImports.biome": "explicit",
|
||||||
|
"source.fixAll": "explicit",
|
||||||
|
"source.organizeImports": "explicit",
|
||||||
|
"source.sortMembers": "explicit"
|
||||||
|
},
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"typescript.enablePromptUseWorkspaceTsdk": true,
|
||||||
|
"typescript.tsdk": "node_modules/typescript/lib",
|
||||||
|
"typescript.preferences.autoImportFileExcludePatterns": [
|
||||||
|
"next/router.d.ts",
|
||||||
|
"next/dist/client/router.d.ts"
|
||||||
|
],
|
||||||
|
"terminal.integrated.localEchoStyle": "dim",
|
||||||
|
"search.exclude": {
|
||||||
|
"**/node_modules": true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
# porting to Typescript (./basango)
|
|
||||||
- when working on a porting feature (working directory is basango, refer to docs/ for more instructions)
|
|
||||||
- make sure to use `bun` 1.3 as runtime not `node`
|
|
||||||
- prefer `const fn = () => {}` instead of `function`
|
|
||||||
|
|
||||||
# legacy (./projects)
|
|
||||||
- when working on a legacy feature (working director is projects)
|
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
# Basango: Towards a scalable and intelligent system for Congolese News curation
|
# Basango
|
||||||
|
## Towards a scalable and intelligent system for Congolese News curation
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
[](https://github.com/bernard-ng/basango/actions/workflows/backend_audit.yaml)
|
[](https://github.com/bernard-ng/basango/actions/workflows/backend_audit.yaml)
|
||||||
[](https://github.com/bernard-ng/basango/actions/workflows/backend_deploy.yaml)
|
[](https://github.com/bernard-ng/basango/actions/workflows/backend_deploy.yaml)
|
||||||
@@ -9,6 +12,8 @@
|
|||||||
[](https://github.com/bernard-ng/basango/actions/workflows/crawler_tests.yml)
|
[](https://github.com/bernard-ng/basango/actions/workflows/crawler_tests.yml)
|
||||||
[](https://github.com/bernard-ng/basango/actions/workflows/mobile_quality.yaml)
|
[](https://github.com/bernard-ng/basango/actions/workflows/mobile_quality.yaml)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
| Scope | Link |
|
| Scope | Link |
|
||||||
|-------------------|-------------------------------------------|
|
|-------------------|-------------------------------------------|
|
||||||
| Crawler | [README.md](./projects/crawler/README.md) |
|
| Crawler | [README.md](./projects/crawler/README.md) |
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Security
|
# Security
|
||||||
|
|
||||||
Contact: [security@basango.com](mailto:security@basango.com)
|
Contact: [security@basango.io](mailto:security@basango.io)
|
||||||
|
|
||||||
Based on [https://supabase.com/.well-known/security.txt](https://supabase.com/.well-known/security.txt)
|
Based on [https://supabase.com/.well-known/security.txt](https://supabase.com/.well-known/security.txt)
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ better protect our clients and our systems.
|
|||||||
|
|
||||||
## Please do the following
|
## Please do the following
|
||||||
|
|
||||||
- E-mail your findings to [security@basango.com](mailto:security@mbasango.com).
|
- E-mail your findings to [security@basango.io](mailto:security@mbasango.io).
|
||||||
- Do not run automated scanners on our infrastructure or dashboard. If you wish
|
- Do not run automated scanners on our infrastructure or dashboard. If you wish
|
||||||
to do this, contact us and we will set up a sandbox for you.
|
to do this, contact us and we will set up a sandbox for you.
|
||||||
- Do not take advantage of the vulnerability or problem you have discovered,
|
- Do not take advantage of the vulnerability or problem you have discovered,
|
||||||
@@ -18,7 +18,7 @@ help:
|
|||||||
# -----------------------------------
|
# -----------------------------------
|
||||||
FORCE:
|
FORCE:
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: ## Build & start docker containers for development
|
build: ## Build & start .docker containers for development
|
||||||
$(dc) build && \
|
$(dc) build && \
|
||||||
$(dc) up -d
|
$(dc) up -d
|
||||||
$(dc) run --rm php composer install && \
|
$(dc) run --rm php composer install && \
|
||||||
@@ -29,23 +29,23 @@ ssh: ## SSH into container
|
|||||||
$(dc) exec php bash
|
$(dc) exec php bash
|
||||||
|
|
||||||
.PHONY: start
|
.PHONY: start
|
||||||
start: ## Start docker containers
|
start: ## Start .docker containers
|
||||||
$(dc) --env-file .env.local up -d
|
$(dc) --env-file .env.local up -d
|
||||||
|
|
||||||
.PHONY: restart
|
.PHONY: restart
|
||||||
restart: ## Restart docker containers
|
restart: ## Restart .docker containers
|
||||||
$(dc) restart
|
$(dc) restart
|
||||||
|
|
||||||
.PHONY: stop
|
.PHONY: stop
|
||||||
stop: ## Stop docker containers
|
stop: ## Stop .docker containers
|
||||||
$(dc) stop
|
$(dc) stop
|
||||||
|
|
||||||
.PHONY: logs
|
.PHONY: logs
|
||||||
logs: ## Show logs of docker containers
|
logs: ## Show logs of .docker containers
|
||||||
@$(dc) logs --tail=0 --follow
|
@$(dc) logs --tail=0 --follow
|
||||||
|
|
||||||
.PHONY: destroy
|
.PHONY: destroy
|
||||||
destroy: ## Destroy docker containers
|
destroy: ## Destroy .docker containers
|
||||||
$(dc) kill && \
|
$(dc) kill && \
|
||||||
$(dc) rm -f
|
$(dc) rm -f
|
||||||
|
|
||||||
Executable → Regular
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user